NAV

<back to all web services

ProfileUpdate

The following routes are available for this service:
PUT/profile/{BeeNumber}
import 'package:servicestack/servicestack.dart';

class ProfileUpdateResponse implements IConvertible
{
    ResponseStatus? responseStatus;

    ProfileUpdateResponse({this.responseStatus});
    ProfileUpdateResponse.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() => "ProfileUpdateResponse";
    TypeContext? context = _ctx;
}

class NAVAddressUpdate implements IConvertible
{
    String? firstName;
    String? lastName;
    String? addressLine1;
    String? addressLine2;
    String? addressLine3;
    String? addressLine4;
    String? addressLine5;
    String? city;
    String? stateCode;
    String? postalCode;
    String? countryCode;

    NAVAddressUpdate({this.firstName,this.lastName,this.addressLine1,this.addressLine2,this.addressLine3,this.addressLine4,this.addressLine5,this.city,this.stateCode,this.postalCode,this.countryCode});
    NAVAddressUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        firstName = json['firstName'];
        lastName = json['lastName'];
        addressLine1 = json['addressLine1'];
        addressLine2 = json['addressLine2'];
        addressLine3 = json['addressLine3'];
        addressLine4 = json['addressLine4'];
        addressLine5 = json['addressLine5'];
        city = json['city'];
        stateCode = json['stateCode'];
        postalCode = json['postalCode'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'firstName': firstName,
        'lastName': lastName,
        'addressLine1': addressLine1,
        'addressLine2': addressLine2,
        'addressLine3': addressLine3,
        'addressLine4': addressLine4,
        'addressLine5': addressLine5,
        'city': city,
        'stateCode': stateCode,
        'postalCode': postalCode,
        'countryCode': countryCode
    };

    getTypeName() => "NAVAddressUpdate";
    TypeContext? context = _ctx;
}

class NAVPhoneUpdate implements IConvertible
{
    String? number;
    String? extension;
    String? codeIdPhoneType;
    String? countryCode;

    NAVPhoneUpdate({this.number,this.extension,this.codeIdPhoneType,this.countryCode});
    NAVPhoneUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        number = json['number'];
        extension = json['extension'];
        codeIdPhoneType = json['codeIdPhoneType'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'number': number,
        'extension': extension,
        'codeIdPhoneType': codeIdPhoneType,
        'countryCode': countryCode
    };

    getTypeName() => "NAVPhoneUpdate";
    TypeContext? context = _ctx;
}

class NAVBankAccountUpdate implements IConvertible
{
    String? accountName;
    String? bankName;
    String? accountNumber;
    String? routingNumber;

    NAVBankAccountUpdate({this.accountName,this.bankName,this.accountNumber,this.routingNumber});
    NAVBankAccountUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        accountName = json['accountName'];
        bankName = json['bankName'];
        accountNumber = json['accountNumber'];
        routingNumber = json['routingNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'accountName': accountName,
        'bankName': bankName,
        'accountNumber': accountNumber,
        'routingNumber': routingNumber
    };

    getTypeName() => "NAVBankAccountUpdate";
    TypeContext? context = _ctx;
}

class NAVTermsUpdate implements IConvertible
{
    String? version;
    DateTime? date;

    NAVTermsUpdate({this.version,this.date});
    NAVTermsUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        version = json['version'];
        date = JsonConverters.fromJson(json['date'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'version': version,
        'date': JsonConverters.toJson(date,'DateTime',context!)
    };

    getTypeName() => "NAVTermsUpdate";
    TypeContext? context = _ctx;
}

class NAVCASLTermsUpdate implements IConvertible
{
    String? agree;
    DateTime? date;

    NAVCASLTermsUpdate({this.agree,this.date});
    NAVCASLTermsUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        agree = json['agree'];
        date = JsonConverters.fromJson(json['date'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'agree': agree,
        'date': JsonConverters.toJson(date,'DateTime',context!)
    };

    getTypeName() => "NAVCASLTermsUpdate";
    TypeContext? context = _ctx;
}

class ProfileUpdate implements IPut, IConvertible
{
    double? beeNumber;
    String? firstName;
    String? lastName;
    String? nickname;
    DateTime? birthDate;
    NAVAddressUpdate? billingAddress;
    NAVAddressUpdate? shippingAddress;
    String? governmentId;
    String? emailAddress;
    NAVPhoneUpdate? primaryPhone;
    NAVPhoneUpdate? additionalPhone;
    String? onlineStoreAddress;
    String? language;
    String? publicityPermission;
    bool? findMeOnline;
    String? oldPassword;
    String? newPassword;
    String? passwordHint;
    NAVBankAccountUpdate? bankAccount;
    NAVTermsUpdate? termsAgreement;
    NAVTermsUpdate? electronicAgreement;
    String? agentId;
    String? taxExemptCode;
    String? customerType;
    DateTime? customerTypeEffectiveDate;
    double? repAttachmentNumber;
    String? repRelationship;
    String? preferredDeliveryMethod;
    String? noCode21;
    String? noCode30;
    NAVTermsUpdate? privacyPolicyAgreement;
    NAVTermsUpdate? websiteTermsOfUseAgreement;
    NAVTermsUpdate? ageVerificationAgreement;
    NAVCASLTermsUpdate? caslStatementAgreement;

    ProfileUpdate({this.beeNumber,this.firstName,this.lastName,this.nickname,this.birthDate,this.billingAddress,this.shippingAddress,this.governmentId,this.emailAddress,this.primaryPhone,this.additionalPhone,this.onlineStoreAddress,this.language,this.publicityPermission,this.findMeOnline,this.oldPassword,this.newPassword,this.passwordHint,this.bankAccount,this.termsAgreement,this.electronicAgreement,this.agentId,this.taxExemptCode,this.customerType,this.customerTypeEffectiveDate,this.repAttachmentNumber,this.repRelationship,this.preferredDeliveryMethod,this.noCode21,this.noCode30,this.privacyPolicyAgreement,this.websiteTermsOfUseAgreement,this.ageVerificationAgreement,this.caslStatementAgreement});
    ProfileUpdate.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        beeNumber = JsonConverters.toDouble(json['beeNumber']);
        firstName = json['firstName'];
        lastName = json['lastName'];
        nickname = json['nickname'];
        birthDate = JsonConverters.fromJson(json['birthDate'],'DateTime',context!);
        billingAddress = JsonConverters.fromJson(json['billingAddress'],'NAVAddressUpdate',context!);
        shippingAddress = JsonConverters.fromJson(json['shippingAddress'],'NAVAddressUpdate',context!);
        governmentId = json['governmentId'];
        emailAddress = json['emailAddress'];
        primaryPhone = JsonConverters.fromJson(json['primaryPhone'],'NAVPhoneUpdate',context!);
        additionalPhone = JsonConverters.fromJson(json['additionalPhone'],'NAVPhoneUpdate',context!);
        onlineStoreAddress = json['onlineStoreAddress'];
        language = json['language'];
        publicityPermission = json['publicityPermission'];
        findMeOnline = json['findMeOnline'];
        oldPassword = json['oldPassword'];
        newPassword = json['newPassword'];
        passwordHint = json['passwordHint'];
        bankAccount = JsonConverters.fromJson(json['bankAccount'],'NAVBankAccountUpdate',context!);
        termsAgreement = JsonConverters.fromJson(json['termsAgreement'],'NAVTermsUpdate',context!);
        electronicAgreement = JsonConverters.fromJson(json['electronicAgreement'],'NAVTermsUpdate',context!);
        agentId = json['agentId'];
        taxExemptCode = json['taxExemptCode'];
        customerType = json['customerType'];
        customerTypeEffectiveDate = JsonConverters.fromJson(json['customerTypeEffectiveDate'],'DateTime',context!);
        repAttachmentNumber = JsonConverters.toDouble(json['repAttachmentNumber']);
        repRelationship = json['repRelationship'];
        preferredDeliveryMethod = json['preferredDeliveryMethod'];
        noCode21 = json['noCode21'];
        noCode30 = json['noCode30'];
        privacyPolicyAgreement = JsonConverters.fromJson(json['privacyPolicyAgreement'],'NAVTermsUpdate',context!);
        websiteTermsOfUseAgreement = JsonConverters.fromJson(json['websiteTermsOfUseAgreement'],'NAVTermsUpdate',context!);
        ageVerificationAgreement = JsonConverters.fromJson(json['ageVerificationAgreement'],'NAVTermsUpdate',context!);
        caslStatementAgreement = JsonConverters.fromJson(json['caslStatementAgreement'],'NAVCASLTermsUpdate',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'beeNumber': beeNumber,
        'firstName': firstName,
        'lastName': lastName,
        'nickname': nickname,
        'birthDate': JsonConverters.toJson(birthDate,'DateTime',context!),
        'billingAddress': JsonConverters.toJson(billingAddress,'NAVAddressUpdate',context!),
        'shippingAddress': JsonConverters.toJson(shippingAddress,'NAVAddressUpdate',context!),
        'governmentId': governmentId,
        'emailAddress': emailAddress,
        'primaryPhone': JsonConverters.toJson(primaryPhone,'NAVPhoneUpdate',context!),
        'additionalPhone': JsonConverters.toJson(additionalPhone,'NAVPhoneUpdate',context!),
        'onlineStoreAddress': onlineStoreAddress,
        'language': language,
        'publicityPermission': publicityPermission,
        'findMeOnline': findMeOnline,
        'oldPassword': oldPassword,
        'newPassword': newPassword,
        'passwordHint': passwordHint,
        'bankAccount': JsonConverters.toJson(bankAccount,'NAVBankAccountUpdate',context!),
        'termsAgreement': JsonConverters.toJson(termsAgreement,'NAVTermsUpdate',context!),
        'electronicAgreement': JsonConverters.toJson(electronicAgreement,'NAVTermsUpdate',context!),
        'agentId': agentId,
        'taxExemptCode': taxExemptCode,
        'customerType': customerType,
        'customerTypeEffectiveDate': JsonConverters.toJson(customerTypeEffectiveDate,'DateTime',context!),
        'repAttachmentNumber': repAttachmentNumber,
        'repRelationship': repRelationship,
        'preferredDeliveryMethod': preferredDeliveryMethod,
        'noCode21': noCode21,
        'noCode30': noCode30,
        'privacyPolicyAgreement': JsonConverters.toJson(privacyPolicyAgreement,'NAVTermsUpdate',context!),
        'websiteTermsOfUseAgreement': JsonConverters.toJson(websiteTermsOfUseAgreement,'NAVTermsUpdate',context!),
        'ageVerificationAgreement': JsonConverters.toJson(ageVerificationAgreement,'NAVTermsUpdate',context!),
        'caslStatementAgreement': JsonConverters.toJson(caslStatementAgreement,'NAVCASLTermsUpdate',context!)
    };

    getTypeName() => "ProfileUpdate";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'extensions.avon.ca', types: <String, TypeInfo> {
    'ProfileUpdateResponse': TypeInfo(TypeOf.Class, create:() => ProfileUpdateResponse()),
    'NAVAddressUpdate': TypeInfo(TypeOf.Class, create:() => NAVAddressUpdate()),
    'NAVPhoneUpdate': TypeInfo(TypeOf.Class, create:() => NAVPhoneUpdate()),
    'NAVBankAccountUpdate': TypeInfo(TypeOf.Class, create:() => NAVBankAccountUpdate()),
    'NAVTermsUpdate': TypeInfo(TypeOf.Class, create:() => NAVTermsUpdate()),
    'NAVCASLTermsUpdate': TypeInfo(TypeOf.Class, create:() => NAVCASLTermsUpdate()),
    'ProfileUpdate': TypeInfo(TypeOf.Class, create:() => ProfileUpdate()),
});

Dart ProfileUpdate DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /profile/{BeeNumber} HTTP/1.1 
Host: extensions.avon.ca 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ProfileUpdate xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel">
  <AdditionalPhone>
    <CodeIdPhoneType>String</CodeIdPhoneType>
    <CountryCode>String</CountryCode>
    <Extension>String</Extension>
    <Number>String</Number>
  </AdditionalPhone>
  <AgeVerificationAgreement>
    <Date>0001-01-01T00:00:00</Date>
    <Version>String</Version>
  </AgeVerificationAgreement>
  <AgentId>String</AgentId>
  <BankAccount>
    <AccountName>String</AccountName>
    <AccountNumber>String</AccountNumber>
    <BankName>String</BankName>
    <RoutingNumber>String</RoutingNumber>
  </BankAccount>
  <BeeNumber>0</BeeNumber>
  <BillingAddress>
    <AddressLine1>String</AddressLine1>
    <AddressLine2>String</AddressLine2>
    <AddressLine3>String</AddressLine3>
    <AddressLine4>String</AddressLine4>
    <AddressLine5>String</AddressLine5>
    <City>String</City>
    <CountryCode>String</CountryCode>
    <FirstName>String</FirstName>
    <LastName>String</LastName>
    <PostalCode>String</PostalCode>
    <StateCode>String</StateCode>
  </BillingAddress>
  <BirthDate>0001-01-01T00:00:00</BirthDate>
  <CASLStatementAgreement>
    <Agree>String</Agree>
    <Date>0001-01-01T00:00:00</Date>
  </CASLStatementAgreement>
  <CustomerType>String</CustomerType>
  <CustomerTypeEffectiveDate>0001-01-01T00:00:00</CustomerTypeEffectiveDate>
  <ElectronicAgreement>
    <Date>0001-01-01T00:00:00</Date>
    <Version>String</Version>
  </ElectronicAgreement>
  <EmailAddress>String</EmailAddress>
  <FindMeOnline>false</FindMeOnline>
  <FirstName>String</FirstName>
  <GovernmentId>String</GovernmentId>
  <Language>String</Language>
  <LastName>String</LastName>
  <NewPassword>String</NewPassword>
  <Nickname>String</Nickname>
  <NoCode21>String</NoCode21>
  <NoCode30>String</NoCode30>
  <OldPassword>String</OldPassword>
  <OnlineStoreAddress>String</OnlineStoreAddress>
  <PasswordHint>String</PasswordHint>
  <PreferredDeliveryMethod>String</PreferredDeliveryMethod>
  <PrimaryPhone>
    <CodeIdPhoneType>String</CodeIdPhoneType>
    <CountryCode>String</CountryCode>
    <Extension>String</Extension>
    <Number>String</Number>
  </PrimaryPhone>
  <PrivacyPolicyAgreement>
    <Date>0001-01-01T00:00:00</Date>
    <Version>String</Version>
  </PrivacyPolicyAgreement>
  <PublicityPermission>String</PublicityPermission>
  <RepAttachmentNumber>0</RepAttachmentNumber>
  <RepRelationship>String</RepRelationship>
  <ShippingAddress>
    <AddressLine1>String</AddressLine1>
    <AddressLine2>String</AddressLine2>
    <AddressLine3>String</AddressLine3>
    <AddressLine4>String</AddressLine4>
    <AddressLine5>String</AddressLine5>
    <City>String</City>
    <CountryCode>String</CountryCode>
    <FirstName>String</FirstName>
    <LastName>String</LastName>
    <PostalCode>String</PostalCode>
    <StateCode>String</StateCode>
  </ShippingAddress>
  <TaxExemptCode>String</TaxExemptCode>
  <TermsAgreement>
    <Date>0001-01-01T00:00:00</Date>
    <Version>String</Version>
  </TermsAgreement>
  <WebsiteTermsOfUseAgreement>
    <Date>0001-01-01T00:00:00</Date>
    <Version>String</Version>
  </WebsiteTermsOfUseAgreement>
</ProfileUpdate>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ProfileUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/NAV.ServiceModel">
  <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>
</ProfileUpdateResponse>