PUT | /sales/wallet/paymentprofileupdate | Update the personal information of a Payment Profile | Omitting 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 .csv suffix or ?format=csv
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: clubready.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ApiKey":"String","AcctToken":"String","ModifiedBy":0,"CcExpMonth":0,"CcExpYear":0,"FullName":"String","PrefixName":"String","FirstName":"String","MiddleName":"String","LastName":"String","SuffixName":"String","Address1":"String","Address2":"String","Urbanization":"String","City":"String","State":"String","PostalCode":"String","IsDisabled":false,"ExcludeFromAcctUpdater":false,"StoreId":0,"ChainId":0}
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Success":false,"Message":"String"}