| GET,POST,PUT,OPTIONS | /v1/BusinessCard |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class Address implements IConvertible
{
int? ID;
int? AddressTypeID;
String? AddressContact;
String? AttentionTo;
String? AddressLine1;
String? AddressLine2;
String? AddressLine3;
String? AddressCity;
String? AddressState;
String? AddressZip;
String? AddressCountry;
String? PhoneNumber;
String? FaxNumber;
String? UID;
String? Name;
Address({this.ID,this.AddressTypeID,this.AddressContact,this.AttentionTo,this.AddressLine1,this.AddressLine2,this.AddressLine3,this.AddressCity,this.AddressState,this.AddressZip,this.AddressCountry,this.PhoneNumber,this.FaxNumber,this.UID,this.Name});
Address.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
AddressTypeID = json['AddressTypeID'];
AddressContact = json['AddressContact'];
AttentionTo = json['AttentionTo'];
AddressLine1 = json['AddressLine1'];
AddressLine2 = json['AddressLine2'];
AddressLine3 = json['AddressLine3'];
AddressCity = json['AddressCity'];
AddressState = json['AddressState'];
AddressZip = json['AddressZip'];
AddressCountry = json['AddressCountry'];
PhoneNumber = json['PhoneNumber'];
FaxNumber = json['FaxNumber'];
UID = json['UID'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'AddressTypeID': AddressTypeID,
'AddressContact': AddressContact,
'AttentionTo': AttentionTo,
'AddressLine1': AddressLine1,
'AddressLine2': AddressLine2,
'AddressLine3': AddressLine3,
'AddressCity': AddressCity,
'AddressState': AddressState,
'AddressZip': AddressZip,
'AddressCountry': AddressCountry,
'PhoneNumber': PhoneNumber,
'FaxNumber': FaxNumber,
'UID': UID,
'Name': Name
};
getTypeName() => "Address";
TypeContext? context = _ctx;
}
class BusinessCard implements IConvertible
{
int? CardId;
int? AgentId;
int? NumRows;
String? Name;
String? Title;
String? Phone;
String? Fax;
String? Cell;
String? Email;
String? Address;
String? License;
DateTime? SubmittedDate;
DateTime? OrderedDate;
DateTime? ProofApprovedDate;
String? AdminApproved;
DateTime? AdminApprovedDate;
int? Quantity;
String? Notes;
int? ShippingAddressId;
int? BusinessCardFrontTypeId;
int? BusinessCardBackTypeId;
String? ArtURL;
String? OrderedURL;
Address? OrderedAddress;
String? OrderedUser;
BusinessCard({this.CardId,this.AgentId,this.NumRows,this.Name,this.Title,this.Phone,this.Fax,this.Cell,this.Email,this.Address,this.License,this.SubmittedDate,this.OrderedDate,this.ProofApprovedDate,this.AdminApproved,this.AdminApprovedDate,this.Quantity,this.Notes,this.ShippingAddressId,this.BusinessCardFrontTypeId,this.BusinessCardBackTypeId,this.ArtURL,this.OrderedURL,this.OrderedAddress,this.OrderedUser});
BusinessCard.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CardId = json['CardId'];
AgentId = json['AgentId'];
NumRows = json['NumRows'];
Name = json['Name'];
Title = json['Title'];
Phone = json['Phone'];
Fax = json['Fax'];
Cell = json['Cell'];
Email = json['Email'];
Address = json['Address'];
License = json['License'];
SubmittedDate = JsonConverters.fromJson(json['SubmittedDate'],'DateTime',context!);
OrderedDate = JsonConverters.fromJson(json['OrderedDate'],'DateTime',context!);
ProofApprovedDate = JsonConverters.fromJson(json['ProofApprovedDate'],'DateTime',context!);
AdminApproved = json['AdminApproved'];
AdminApprovedDate = JsonConverters.fromJson(json['AdminApprovedDate'],'DateTime',context!);
Quantity = json['Quantity'];
Notes = json['Notes'];
ShippingAddressId = json['ShippingAddressId'];
BusinessCardFrontTypeId = json['BusinessCardFrontTypeId'];
BusinessCardBackTypeId = json['BusinessCardBackTypeId'];
ArtURL = json['ArtURL'];
OrderedURL = json['OrderedURL'];
OrderedAddress = JsonConverters.fromJson(json['OrderedAddress'],'Address',context!);
OrderedUser = json['OrderedUser'];
return this;
}
Map<String, dynamic> toJson() => {
'CardId': CardId,
'AgentId': AgentId,
'NumRows': NumRows,
'Name': Name,
'Title': Title,
'Phone': Phone,
'Fax': Fax,
'Cell': Cell,
'Email': Email,
'Address': Address,
'License': License,
'SubmittedDate': JsonConverters.toJson(SubmittedDate,'DateTime',context!),
'OrderedDate': JsonConverters.toJson(OrderedDate,'DateTime',context!),
'ProofApprovedDate': JsonConverters.toJson(ProofApprovedDate,'DateTime',context!),
'AdminApproved': AdminApproved,
'AdminApprovedDate': JsonConverters.toJson(AdminApprovedDate,'DateTime',context!),
'Quantity': Quantity,
'Notes': Notes,
'ShippingAddressId': ShippingAddressId,
'BusinessCardFrontTypeId': BusinessCardFrontTypeId,
'BusinessCardBackTypeId': BusinessCardBackTypeId,
'ArtURL': ArtURL,
'OrderedURL': OrderedURL,
'OrderedAddress': JsonConverters.toJson(OrderedAddress,'Address',context!),
'OrderedUser': OrderedUser
};
getTypeName() => "BusinessCard";
TypeContext? context = _ctx;
}
class BusinessCardResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<BusinessCard>? BusinessCard = [];
BusinessCardResponse({this.ResponseStatus,this.BusinessCard});
BusinessCardResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
BusinessCard = JsonConverters.fromJson(json['BusinessCard'],'List<BusinessCard>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'BusinessCard': JsonConverters.toJson(BusinessCard,'List<BusinessCard>',context!)
};
getTypeName() => "BusinessCardResponse";
TypeContext? context = _ctx;
}
class BusinessCardRequest implements IConvertible
{
List<BusinessCard>? BusinessCard = [];
BusinessCardRequest({this.BusinessCard});
BusinessCardRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
BusinessCard = JsonConverters.fromJson(json['BusinessCard'],'List<BusinessCard>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'BusinessCard': JsonConverters.toJson(BusinessCard,'List<BusinessCard>',context!)
};
getTypeName() => "BusinessCardRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'Address': TypeInfo(TypeOf.Class, create:() => Address()),
'BusinessCard': TypeInfo(TypeOf.Class, create:() => BusinessCard()),
'BusinessCardResponse': TypeInfo(TypeOf.Class, create:() => BusinessCardResponse()),
'List<BusinessCard>': TypeInfo(TypeOf.Class, create:() => <BusinessCard>[]),
'BusinessCardRequest': TypeInfo(TypeOf.Class, create:() => BusinessCardRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/BusinessCard HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<BusinessCardRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal.Routes">
<BusinessCard xmlns:d2p1="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal.Objects">
<d2p1:BusinessCard>
<d2p1:Address>String</d2p1:Address>
<d2p1:AdminApproved>String</d2p1:AdminApproved>
<d2p1:AdminApprovedDate>0001-01-01T00:00:00</d2p1:AdminApprovedDate>
<d2p1:AgentId>0</d2p1:AgentId>
<d2p1:ArtURL>String</d2p1:ArtURL>
<d2p1:BusinessCardBackTypeId>0</d2p1:BusinessCardBackTypeId>
<d2p1:BusinessCardFrontTypeId>0</d2p1:BusinessCardFrontTypeId>
<d2p1:CardId>0</d2p1:CardId>
<d2p1:Cell>String</d2p1:Cell>
<d2p1:Email>String</d2p1:Email>
<d2p1:Fax>String</d2p1:Fax>
<d2p1:License>String</d2p1:License>
<d2p1:Name>String</d2p1:Name>
<d2p1:Notes>String</d2p1:Notes>
<d2p1:NumRows>0</d2p1:NumRows>
<d2p1:OrderedAddress xmlns:d4p1="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<d4p1:AddressCity>String</d4p1:AddressCity>
<d4p1:AddressContact>String</d4p1:AddressContact>
<d4p1:AddressCountry>String</d4p1:AddressCountry>
<d4p1:AddressLine1>String</d4p1:AddressLine1>
<d4p1:AddressLine2>String</d4p1:AddressLine2>
<d4p1:AddressLine3>String</d4p1:AddressLine3>
<d4p1:AddressState>String</d4p1:AddressState>
<d4p1:AddressTypeID>0</d4p1:AddressTypeID>
<d4p1:AddressZip>String</d4p1:AddressZip>
<d4p1:AttentionTo>String</d4p1:AttentionTo>
<d4p1:FaxNumber>String</d4p1:FaxNumber>
<d4p1:ID>0</d4p1:ID>
<d4p1:Name>String</d4p1:Name>
<d4p1:PhoneNumber>String</d4p1:PhoneNumber>
<d4p1:UID>00000000-0000-0000-0000-000000000000</d4p1:UID>
</d2p1:OrderedAddress>
<d2p1:OrderedDate>0001-01-01T00:00:00</d2p1:OrderedDate>
<d2p1:OrderedURL>String</d2p1:OrderedURL>
<d2p1:OrderedUser>String</d2p1:OrderedUser>
<d2p1:Phone>String</d2p1:Phone>
<d2p1:ProofApprovedDate>0001-01-01T00:00:00</d2p1:ProofApprovedDate>
<d2p1:Quantity>0</d2p1:Quantity>
<d2p1:ShippingAddressId>0</d2p1:ShippingAddressId>
<d2p1:SubmittedDate>0001-01-01T00:00:00</d2p1:SubmittedDate>
<d2p1:Title>String</d2p1:Title>
</d2p1:BusinessCard>
</BusinessCard>
</BusinessCardRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<BusinessCardResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal.Routes">
<BusinessCard xmlns:d2p1="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal.Objects">
<d2p1:BusinessCard>
<d2p1:Address>String</d2p1:Address>
<d2p1:AdminApproved>String</d2p1:AdminApproved>
<d2p1:AdminApprovedDate>0001-01-01T00:00:00</d2p1:AdminApprovedDate>
<d2p1:AgentId>0</d2p1:AgentId>
<d2p1:ArtURL>String</d2p1:ArtURL>
<d2p1:BusinessCardBackTypeId>0</d2p1:BusinessCardBackTypeId>
<d2p1:BusinessCardFrontTypeId>0</d2p1:BusinessCardFrontTypeId>
<d2p1:CardId>0</d2p1:CardId>
<d2p1:Cell>String</d2p1:Cell>
<d2p1:Email>String</d2p1:Email>
<d2p1:Fax>String</d2p1:Fax>
<d2p1:License>String</d2p1:License>
<d2p1:Name>String</d2p1:Name>
<d2p1:Notes>String</d2p1:Notes>
<d2p1:NumRows>0</d2p1:NumRows>
<d2p1:OrderedAddress xmlns:d4p1="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<d4p1:AddressCity>String</d4p1:AddressCity>
<d4p1:AddressContact>String</d4p1:AddressContact>
<d4p1:AddressCountry>String</d4p1:AddressCountry>
<d4p1:AddressLine1>String</d4p1:AddressLine1>
<d4p1:AddressLine2>String</d4p1:AddressLine2>
<d4p1:AddressLine3>String</d4p1:AddressLine3>
<d4p1:AddressState>String</d4p1:AddressState>
<d4p1:AddressTypeID>0</d4p1:AddressTypeID>
<d4p1:AddressZip>String</d4p1:AddressZip>
<d4p1:AttentionTo>String</d4p1:AttentionTo>
<d4p1:FaxNumber>String</d4p1:FaxNumber>
<d4p1:ID>0</d4p1:ID>
<d4p1:Name>String</d4p1:Name>
<d4p1:PhoneNumber>String</d4p1:PhoneNumber>
<d4p1:UID>00000000-0000-0000-0000-000000000000</d4p1:UID>
</d2p1:OrderedAddress>
<d2p1:OrderedDate>0001-01-01T00:00:00</d2p1:OrderedDate>
<d2p1:OrderedURL>String</d2p1:OrderedURL>
<d2p1:OrderedUser>String</d2p1:OrderedUser>
<d2p1:Phone>String</d2p1:Phone>
<d2p1:ProofApprovedDate>0001-01-01T00:00:00</d2p1:ProofApprovedDate>
<d2p1:Quantity>0</d2p1:Quantity>
<d2p1:ShippingAddressId>0</d2p1:ShippingAddressId>
<d2p1:SubmittedDate>0001-01-01T00:00:00</d2p1:SubmittedDate>
<d2p1:Title>String</d2p1:Title>
</d2p1:BusinessCard>
</BusinessCard>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
</BusinessCardResponse>