| GET,OPTIONS | /v1/BusinessCardAdmin |
|---|
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 BusinessCardAdminRequest implements IConvertible
{
List<BusinessCard>? BusinessCard = [];
BusinessCardAdminRequest({this.BusinessCard});
BusinessCardAdminRequest.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() => "BusinessCardAdminRequest";
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>[]),
'BusinessCardAdminRequest': TypeInfo(TypeOf.Class, create:() => BusinessCardAdminRequest()),
});
Dart BusinessCardAdminRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/BusinessCardAdmin HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"BusinessCard":[{"CardId":0,"AgentId":0,"NumRows":0,"Name":"String","Title":"String","Phone":"String","Fax":"String","Cell":"String","Email":"String","Address":"String","License":"String","SubmittedDate":"0001-01-01T00:00:00.0000000","OrderedDate":"0001-01-01T00:00:00.0000000","ProofApprovedDate":"0001-01-01T00:00:00.0000000","AdminApproved":"String","AdminApprovedDate":"0001-01-01T00:00:00.0000000","Quantity":0,"Notes":"String","ShippingAddressId":0,"BusinessCardFrontTypeId":0,"BusinessCardBackTypeId":0,"ArtURL":"String","OrderedURL":"String","OrderedAddress":{"ID":0,"AddressTypeID":0,"AddressContact":"String","AttentionTo":"String","AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","AddressCity":"String","AddressState":"String","AddressZip":"String","AddressCountry":"String","PhoneNumber":"String","FaxNumber":"String","UID":"00000000000000000000000000000000","Name":"String"},"OrderedUser":"String"}]}