ClubReady Api

<back to all web services

PaymentProfileUpdateEndpoint

The following routes are available for this service:
PUT/sales/wallet/paymentprofileupdateUpdate the personal information of a Payment ProfileOmitting fields or providing `null` will not update that field.
Providing an empty or whitespace string will remove the data from the field.
To update the account information (Account Number, Last4, Country, etc), create a new Payment Profile.
import 'package:servicestack/servicestack.dart';

class ApiDtoBase implements IConvertible
{
    String? ApiKey;
    int? StoreId;
    int? ChainId;

    ApiDtoBase({this.ApiKey,this.StoreId,this.ChainId});
    ApiDtoBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        StoreId = json['StoreId'];
        ChainId = json['ChainId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'StoreId': StoreId,
        'ChainId': ChainId
    };

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

class PaymentProfileUpdateRequestDto extends ApiDtoBase implements IConvertible
{
    String? AcctToken;
    int? ModifiedBy;
    int? CcExpMonth;
    int? CcExpYear;
    String? FullName;
    String? PrefixName;
    String? FirstName;
    String? MiddleName;
    String? LastName;
    String? SuffixName;
    String? Address1;
    String? Address2;
    String? Urbanization;
    String? City;
    String? State;
    String? PostalCode;
    bool? IsDisabled;
    bool? ExcludeFromAcctUpdater;

    PaymentProfileUpdateRequestDto({this.AcctToken,this.ModifiedBy,this.CcExpMonth,this.CcExpYear,this.FullName,this.PrefixName,this.FirstName,this.MiddleName,this.LastName,this.SuffixName,this.Address1,this.Address2,this.Urbanization,this.City,this.State,this.PostalCode,this.IsDisabled,this.ExcludeFromAcctUpdater});
    PaymentProfileUpdateRequestDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        AcctToken = json['AcctToken'];
        ModifiedBy = json['ModifiedBy'];
        CcExpMonth = json['CcExpMonth'];
        CcExpYear = json['CcExpYear'];
        FullName = json['FullName'];
        PrefixName = json['PrefixName'];
        FirstName = json['FirstName'];
        MiddleName = json['MiddleName'];
        LastName = json['LastName'];
        SuffixName = json['SuffixName'];
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        Urbanization = json['Urbanization'];
        City = json['City'];
        State = json['State'];
        PostalCode = json['PostalCode'];
        IsDisabled = json['IsDisabled'];
        ExcludeFromAcctUpdater = json['ExcludeFromAcctUpdater'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'AcctToken': AcctToken,
        'ModifiedBy': ModifiedBy,
        'CcExpMonth': CcExpMonth,
        'CcExpYear': CcExpYear,
        'FullName': FullName,
        'PrefixName': PrefixName,
        'FirstName': FirstName,
        'MiddleName': MiddleName,
        'LastName': LastName,
        'SuffixName': SuffixName,
        'Address1': Address1,
        'Address2': Address2,
        'Urbanization': Urbanization,
        'City': City,
        'State': State,
        'PostalCode': PostalCode,
        'IsDisabled': IsDisabled,
        'ExcludeFromAcctUpdater': ExcludeFromAcctUpdater
    });

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

class ApiResponseBase implements IConvertible
{
    bool? Success;
    String? Message;

    ApiResponseBase({this.Success,this.Message});
    ApiResponseBase.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Success = json['Success'];
        Message = json['Message'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Success': Success,
        'Message': Message
    };

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

class PaymentProfileUpdateResponseDto extends ApiResponseBase implements IConvertible
{
    PaymentProfileUpdateResponseDto();
    PaymentProfileUpdateResponseDto.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "PaymentProfileUpdateResponseDto";
    TypeContext? context = _ctx;
}

class PaymentProfileUpdateResponse extends PaymentProfileUpdateResponseDto implements IConvertible
{
    PaymentProfileUpdateResponse();
    PaymentProfileUpdateResponse.fromJson(Map<String, dynamic> json) : super.fromJson(json);
    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson();
    getTypeName() => "PaymentProfileUpdateResponse";
    TypeContext? context = _ctx;
}

class PaymentProfileUpdateEndpoint extends PaymentProfileUpdateRequestDto implements IConvertible
{
    /**
    * Grants access to resources
    */
    // @ApiMember(Description="Grants access to resources", IsRequired=true)
    String? ApiKey;

    /**
    * AcctToken to update
    */
    // @ApiMember(Description="AcctToken to update", IsRequired=true)
    String? AcctToken;

    /**
    * UserId that is updating profile
    */
    // @ApiMember(Description="UserId that is updating profile", IsRequired=true)
    int? ModifiedBy;

    /**
    * Expiry Month: 1 = January, 12 = December
    */
    // @ApiMember(Description="Expiry Month: 1 = January, 12 = December")
    int? CcExpMonth;

    /**
    * Expiry Year: Two digit year
    */
    // @ApiMember(Description="Expiry Year: Two digit year")
    int? CcExpYear;

    /**
    * The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).<br />Providing both will cause an error.
    */
    // @ApiMember(Description="The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).<br />Providing both will cause an error.")
    String? FullName;

    // @ApiMember()
    String? PrefixName;

    // @ApiMember()
    String? FirstName;

    // @ApiMember()
    String? MiddleName;

    // @ApiMember()
    String? LastName;

    // @ApiMember()
    String? SuffixName;

    // @ApiMember()
    String? Address1;

    // @ApiMember()
    String? Address2;

    // @ApiMember()
    String? Urbanization;

    // @ApiMember()
    String? City;

    // @ApiMember()
    String? State;

    // @ApiMember()
    String? PostalCode;

    /**
    * Disable (or Enabled) the Payment Profile
    */
    // @ApiMember(Description="Disable (or Enabled) the Payment Profile")
    bool? IsDisabled;

    /**
    * Exclude (or Include) from Account Updater
    */
    // @ApiMember(Description="Exclude (or Include) from Account Updater")
    bool? ExcludeFromAcctUpdater;

    PaymentProfileUpdateEndpoint({this.ApiKey,this.AcctToken,this.ModifiedBy,this.CcExpMonth,this.CcExpYear,this.FullName,this.PrefixName,this.FirstName,this.MiddleName,this.LastName,this.SuffixName,this.Address1,this.Address2,this.Urbanization,this.City,this.State,this.PostalCode,this.IsDisabled,this.ExcludeFromAcctUpdater});
    PaymentProfileUpdateEndpoint.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        ApiKey = json['ApiKey'];
        AcctToken = json['AcctToken'];
        ModifiedBy = json['ModifiedBy'];
        CcExpMonth = json['CcExpMonth'];
        CcExpYear = json['CcExpYear'];
        FullName = json['FullName'];
        PrefixName = json['PrefixName'];
        FirstName = json['FirstName'];
        MiddleName = json['MiddleName'];
        LastName = json['LastName'];
        SuffixName = json['SuffixName'];
        Address1 = json['Address1'];
        Address2 = json['Address2'];
        Urbanization = json['Urbanization'];
        City = json['City'];
        State = json['State'];
        PostalCode = json['PostalCode'];
        IsDisabled = json['IsDisabled'];
        ExcludeFromAcctUpdater = json['ExcludeFromAcctUpdater'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'ApiKey': ApiKey,
        'AcctToken': AcctToken,
        'ModifiedBy': ModifiedBy,
        'CcExpMonth': CcExpMonth,
        'CcExpYear': CcExpYear,
        'FullName': FullName,
        'PrefixName': PrefixName,
        'FirstName': FirstName,
        'MiddleName': MiddleName,
        'LastName': LastName,
        'SuffixName': SuffixName,
        'Address1': Address1,
        'Address2': Address2,
        'Urbanization': Urbanization,
        'City': City,
        'State': State,
        'PostalCode': PostalCode,
        'IsDisabled': IsDisabled,
        'ExcludeFromAcctUpdater': ExcludeFromAcctUpdater
    });

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

TypeContext _ctx = TypeContext(library: 'www.clubready.com', types: <String, TypeInfo> {
    'ApiDtoBase': TypeInfo(TypeOf.Class, create:() => ApiDtoBase()),
    'PaymentProfileUpdateRequestDto': TypeInfo(TypeOf.Class, create:() => PaymentProfileUpdateRequestDto()),
    'ApiResponseBase': TypeInfo(TypeOf.Class, create:() => ApiResponseBase()),
    'PaymentProfileUpdateResponseDto': TypeInfo(TypeOf.Class, create:() => PaymentProfileUpdateResponseDto()),
    'PaymentProfileUpdateResponse': TypeInfo(TypeOf.Class, create:() => PaymentProfileUpdateResponse()),
    'PaymentProfileUpdateEndpoint': TypeInfo(TypeOf.Class, create:() => PaymentProfileUpdateEndpoint()),
});

Dart PaymentProfileUpdateEndpoint 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 /sales/wallet/paymentprofileupdate HTTP/1.1 
Host: www.clubready.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<PaymentProfileUpdateEndpoint xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Wallet">
  <ApiKey xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</ApiKey>
  <ChainId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</ChainId>
  <StoreId xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">0</StoreId>
  <AcctToken xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</AcctToken>
  <Address1 xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</Address1>
  <Address2 xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</Address2>
  <CcExpMonth xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">0</CcExpMonth>
  <CcExpYear xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">0</CcExpYear>
  <City xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</City>
  <ExcludeFromAcctUpdater xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">false</ExcludeFromAcctUpdater>
  <FirstName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</FirstName>
  <FullName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</FullName>
  <IsDisabled xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">false</IsDisabled>
  <LastName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</LastName>
  <MiddleName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</MiddleName>
  <ModifiedBy xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">0</ModifiedBy>
  <PostalCode xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</PostalCode>
  <PrefixName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</PrefixName>
  <State xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</State>
  <SuffixName xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</SuffixName>
  <Urbanization xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Sales.Wallet">String</Urbanization>
</PaymentProfileUpdateEndpoint>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<PaymentProfileUpdateResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Web.Api.Sales.Wallet">
  <Message xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">String</Message>
  <Success xmlns="http://schemas.datacontract.org/2004/07/ClubReady.Core.Api.Models">false</Success>
</PaymentProfileUpdateResponse>