POST | /profile/{BeeNumber}/basic-information |
---|
import 'package:servicestack/servicestack.dart';
class ProfileBasicInformationCreateResponse implements IConvertible
{
ResponseStatus? responseStatus;
ProfileBasicInformationCreateResponse({this.responseStatus});
ProfileBasicInformationCreateResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
responseStatus = JsonConverters.fromJson(json['responseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'responseStatus': JsonConverters.toJson(responseStatus,'ResponseStatus',context!)
};
getTypeName() => "ProfileBasicInformationCreateResponse";
TypeContext? context = _ctx;
}
class AddressCreateViewModel implements IConvertible
{
String? addressLine1;
String? addressLine2;
String? addressLine3;
String? city;
String? stateCode;
String? postalCode;
String? countryCode;
AddressCreateViewModel({this.addressLine1,this.addressLine2,this.addressLine3,this.city,this.stateCode,this.postalCode,this.countryCode});
AddressCreateViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
addressLine1 = json['addressLine1'];
addressLine2 = json['addressLine2'];
addressLine3 = json['addressLine3'];
city = json['city'];
stateCode = json['stateCode'];
postalCode = json['postalCode'];
countryCode = json['countryCode'];
return this;
}
Map<String, dynamic> toJson() => {
'addressLine1': addressLine1,
'addressLine2': addressLine2,
'addressLine3': addressLine3,
'city': city,
'stateCode': stateCode,
'postalCode': postalCode,
'countryCode': countryCode
};
getTypeName() => "AddressCreateViewModel";
TypeContext? context = _ctx;
}
class ProfileBasicInformationCreate implements IPost, IConvertible
{
double? beeNumber;
String? primaryPhone;
DateTime? birthDate;
AddressCreateViewModel? address;
double? beeNumberMentor;
ProfileBasicInformationCreate({this.beeNumber,this.primaryPhone,this.birthDate,this.address,this.beeNumberMentor});
ProfileBasicInformationCreate.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
beeNumber = JsonConverters.toDouble(json['beeNumber']);
primaryPhone = json['primaryPhone'];
birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
address = JsonConverters.fromJson(json['address'],'AddressCreateViewModel',context!);
beeNumberMentor = JsonConverters.toDouble(json['beeNumberMentor']);
return this;
}
Map<String, dynamic> toJson() => {
'beeNumber': beeNumber,
'primaryPhone': primaryPhone,
'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
'address': JsonConverters.toJson(address,'AddressCreateViewModel',context!),
'beeNumberMentor': beeNumberMentor
};
getTypeName() => "ProfileBasicInformationCreate";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'extensions.avon.ca', types: <String, TypeInfo> {
'ProfileBasicInformationCreateResponse': TypeInfo(TypeOf.Class, create:() => ProfileBasicInformationCreateResponse()),
'AddressCreateViewModel': TypeInfo(TypeOf.Class, create:() => AddressCreateViewModel()),
'ProfileBasicInformationCreate': TypeInfo(TypeOf.Class, create:() => ProfileBasicInformationCreate()),
});
Dart ProfileBasicInformationCreate DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /profile/{BeeNumber}/basic-information HTTP/1.1
Host: extensions.avon.ca
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"beeNumber":0,"primaryPhone":"String","birthDate":"0001-01-01T00:00:00.0000000","address":{"addressLine1":"String","addressLine2":"String","addressLine3":"String","city":"String","stateCode":"String","postalCode":"String","countryCode":"String"},"beeNumberMentor":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}