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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiDtoBase:
    api_key: Optional[str] = None
    store_id: Optional[int] = None
    chain_id: Optional[int] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentProfileUpdateRequestDto(ApiDtoBase):
    acct_token: Optional[str] = None
    modified_by: Optional[int] = None
    cc_exp_month: Optional[int] = None
    cc_exp_year: Optional[int] = None
    full_name: Optional[str] = None
    prefix_name: Optional[str] = None
    first_name: Optional[str] = None
    middle_name: Optional[str] = None
    last_name: Optional[str] = None
    suffix_name: Optional[str] = None
    address1: Optional[str] = None
    address2: Optional[str] = None
    urbanization: Optional[str] = None
    city: Optional[str] = None
    state: Optional[str] = None
    postal_code: Optional[str] = None
    is_disabled: Optional[bool] = None
    exclude_from_acct_updater: Optional[bool] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ApiResponseBase:
    success: bool = False
    message: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentProfileUpdateResponseDto(ApiResponseBase):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentProfileUpdateResponse(PaymentProfileUpdateResponseDto):
    pass


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentProfileUpdateEndpoint(PaymentProfileUpdateRequestDto):
    # @ApiMember(Description="Grants access to resources", IsRequired=true)
    api_key: Optional[str] = None
    """
    Grants access to resources
    """


    # @ApiMember(Description="AcctToken to update", IsRequired=true)
    acct_token: Optional[str] = None
    """
    AcctToken to update
    """


    # @ApiMember(Description="UserId that is updating profile", IsRequired=true)
    modified_by: Optional[int] = None
    """
    UserId that is updating profile
    """


    # @ApiMember(Description="Expiry Month: 1 = January, 12 = December")
    cc_exp_month: Optional[int] = None
    """
    Expiry Month: 1 = January, 12 = December
    """


    # @ApiMember(Description="Expiry Year: Two digit year")
    cc_exp_year: Optional[int] = None
    """
    Expiry Year: Two digit year
    """


    # @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.")
    full_name: Optional[str] = None
    """
    The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).<br />Providing both will cause an error.
    """


    # @ApiMember()
    prefix_name: Optional[str] = None

    # @ApiMember()
    first_name: Optional[str] = None

    # @ApiMember()
    middle_name: Optional[str] = None

    # @ApiMember()
    last_name: Optional[str] = None

    # @ApiMember()
    suffix_name: Optional[str] = None

    # @ApiMember()
    address1: Optional[str] = None

    # @ApiMember()
    address2: Optional[str] = None

    # @ApiMember()
    urbanization: Optional[str] = None

    # @ApiMember()
    city: Optional[str] = None

    # @ApiMember()
    state: Optional[str] = None

    # @ApiMember()
    postal_code: Optional[str] = None

    # @ApiMember(Description="Disable (or Enabled) the Payment Profile")
    is_disabled: Optional[bool] = None
    """
    Disable (or Enabled) the Payment Profile
    """


    # @ApiMember(Description="Exclude (or Include) from Account Updater")
    exclude_from_acct_updater: Optional[bool] = None
    """
    Exclude (or Include) from Account Updater
    """

Python 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>