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 java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class PaymentProfileUpdateEndpoint extends PaymentProfileUpdateRequestDto
{
/**
* Grants access to resources
*/
@ApiMember(Description="Grants access to resources", IsRequired=true)
public String ApiKey = null;
/**
* AcctToken to update
*/
@ApiMember(Description="AcctToken to update", IsRequired=true)
public String AcctToken = null;
/**
* UserId that is updating profile
*/
@ApiMember(Description="UserId that is updating profile", IsRequired=true)
public Integer ModifiedBy = null;
/**
* Expiry Month: 1 = January, 12 = December
*/
@ApiMember(Description="Expiry Month: 1 = January, 12 = December")
public Short CcExpMonth = null;
/**
* Expiry Year: Two digit year
*/
@ApiMember(Description="Expiry Year: Two digit year")
public Short CcExpYear = null;
/**
* 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.")
public String FullName = null;
@ApiMember()
public String PrefixName = null;
@ApiMember()
public String FirstName = null;
@ApiMember()
public String MiddleName = null;
@ApiMember()
public String LastName = null;
@ApiMember()
public String SuffixName = null;
@ApiMember()
public String Address1 = null;
@ApiMember()
public String Address2 = null;
@ApiMember()
public String Urbanization = null;
@ApiMember()
public String City = null;
@ApiMember()
public String State = null;
@ApiMember()
public String PostalCode = null;
/**
* Disable (or Enabled) the Payment Profile
*/
@ApiMember(Description="Disable (or Enabled) the Payment Profile")
public Boolean IsDisabled = null;
/**
* Exclude (or Include) from Account Updater
*/
@ApiMember(Description="Exclude (or Include) from Account Updater")
public Boolean ExcludeFromAcctUpdater = null;
public String getApiKey() { return ApiKey; }
public PaymentProfileUpdateEndpoint setApiKey(String value) { this.ApiKey = value; return this; }
public String getAcctToken() { return AcctToken; }
public PaymentProfileUpdateEndpoint setAcctToken(String value) { this.AcctToken = value; return this; }
public Integer getModifiedBy() { return ModifiedBy; }
public PaymentProfileUpdateEndpoint setModifiedBy(Integer value) { this.ModifiedBy = value; return this; }
public Short getCcExpMonth() { return CcExpMonth; }
public PaymentProfileUpdateEndpoint setCcExpMonth(Short value) { this.CcExpMonth = value; return this; }
public Short getCcExpYear() { return CcExpYear; }
public PaymentProfileUpdateEndpoint setCcExpYear(Short value) { this.CcExpYear = value; return this; }
public String getFullName() { return FullName; }
public PaymentProfileUpdateEndpoint setFullName(String value) { this.FullName = value; return this; }
public String getPrefixName() { return PrefixName; }
public PaymentProfileUpdateEndpoint setPrefixName(String value) { this.PrefixName = value; return this; }
public String getFirstName() { return FirstName; }
public PaymentProfileUpdateEndpoint setFirstName(String value) { this.FirstName = value; return this; }
public String getMiddleName() { return MiddleName; }
public PaymentProfileUpdateEndpoint setMiddleName(String value) { this.MiddleName = value; return this; }
public String getLastName() { return LastName; }
public PaymentProfileUpdateEndpoint setLastName(String value) { this.LastName = value; return this; }
public String getSuffixName() { return SuffixName; }
public PaymentProfileUpdateEndpoint setSuffixName(String value) { this.SuffixName = value; return this; }
public String getAddress1() { return Address1; }
public PaymentProfileUpdateEndpoint setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public PaymentProfileUpdateEndpoint setAddress2(String value) { this.Address2 = value; return this; }
public String getUrbanization() { return Urbanization; }
public PaymentProfileUpdateEndpoint setUrbanization(String value) { this.Urbanization = value; return this; }
public String getCity() { return City; }
public PaymentProfileUpdateEndpoint setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public PaymentProfileUpdateEndpoint setState(String value) { this.State = value; return this; }
public String getPostalCode() { return PostalCode; }
public PaymentProfileUpdateEndpoint setPostalCode(String value) { this.PostalCode = value; return this; }
public Boolean getIsDisabled() { return IsDisabled; }
public PaymentProfileUpdateEndpoint setIsDisabled(Boolean value) { this.IsDisabled = value; return this; }
public Boolean isExcludeFromAcctUpdater() { return ExcludeFromAcctUpdater; }
public PaymentProfileUpdateEndpoint setExcludeFromAcctUpdater(Boolean value) { this.ExcludeFromAcctUpdater = value; return this; }
}
public static class PaymentProfileUpdateRequestDto extends ApiDtoBase
{
public String AcctToken = null;
public Integer ModifiedBy = null;
public Short CcExpMonth = null;
public Short CcExpYear = null;
public String FullName = null;
public String PrefixName = null;
public String FirstName = null;
public String MiddleName = null;
public String LastName = null;
public String SuffixName = null;
public String Address1 = null;
public String Address2 = null;
public String Urbanization = null;
public String City = null;
public String State = null;
public String PostalCode = null;
public Boolean IsDisabled = null;
public Boolean ExcludeFromAcctUpdater = null;
public String getAcctToken() { return AcctToken; }
public PaymentProfileUpdateRequestDto setAcctToken(String value) { this.AcctToken = value; return this; }
public Integer getModifiedBy() { return ModifiedBy; }
public PaymentProfileUpdateRequestDto setModifiedBy(Integer value) { this.ModifiedBy = value; return this; }
public Short getCcExpMonth() { return CcExpMonth; }
public PaymentProfileUpdateRequestDto setCcExpMonth(Short value) { this.CcExpMonth = value; return this; }
public Short getCcExpYear() { return CcExpYear; }
public PaymentProfileUpdateRequestDto setCcExpYear(Short value) { this.CcExpYear = value; return this; }
public String getFullName() { return FullName; }
public PaymentProfileUpdateRequestDto setFullName(String value) { this.FullName = value; return this; }
public String getPrefixName() { return PrefixName; }
public PaymentProfileUpdateRequestDto setPrefixName(String value) { this.PrefixName = value; return this; }
public String getFirstName() { return FirstName; }
public PaymentProfileUpdateRequestDto setFirstName(String value) { this.FirstName = value; return this; }
public String getMiddleName() { return MiddleName; }
public PaymentProfileUpdateRequestDto setMiddleName(String value) { this.MiddleName = value; return this; }
public String getLastName() { return LastName; }
public PaymentProfileUpdateRequestDto setLastName(String value) { this.LastName = value; return this; }
public String getSuffixName() { return SuffixName; }
public PaymentProfileUpdateRequestDto setSuffixName(String value) { this.SuffixName = value; return this; }
public String getAddress1() { return Address1; }
public PaymentProfileUpdateRequestDto setAddress1(String value) { this.Address1 = value; return this; }
public String getAddress2() { return Address2; }
public PaymentProfileUpdateRequestDto setAddress2(String value) { this.Address2 = value; return this; }
public String getUrbanization() { return Urbanization; }
public PaymentProfileUpdateRequestDto setUrbanization(String value) { this.Urbanization = value; return this; }
public String getCity() { return City; }
public PaymentProfileUpdateRequestDto setCity(String value) { this.City = value; return this; }
public String getState() { return State; }
public PaymentProfileUpdateRequestDto setState(String value) { this.State = value; return this; }
public String getPostalCode() { return PostalCode; }
public PaymentProfileUpdateRequestDto setPostalCode(String value) { this.PostalCode = value; return this; }
public Boolean getIsDisabled() { return IsDisabled; }
public PaymentProfileUpdateRequestDto setIsDisabled(Boolean value) { this.IsDisabled = value; return this; }
public Boolean isExcludeFromAcctUpdater() { return ExcludeFromAcctUpdater; }
public PaymentProfileUpdateRequestDto setExcludeFromAcctUpdater(Boolean value) { this.ExcludeFromAcctUpdater = value; return this; }
}
public static class ApiDtoBase
{
public String ApiKey = null;
public Integer StoreId = null;
public Integer ChainId = null;
public String getApiKey() { return ApiKey; }
public ApiDtoBase setApiKey(String value) { this.ApiKey = value; return this; }
public Integer getStoreId() { return StoreId; }
public ApiDtoBase setStoreId(Integer value) { this.StoreId = value; return this; }
public Integer getChainId() { return ChainId; }
public ApiDtoBase setChainId(Integer value) { this.ChainId = value; return this; }
}
public static class PaymentProfileUpdateResponse extends PaymentProfileUpdateResponseDto
{
}
public static class PaymentProfileUpdateResponseDto extends ApiResponseBase
{
}
public static class ApiResponseBase
{
public Boolean Success = null;
public String Message = null;
public Boolean isSuccess() { return Success; }
public ApiResponseBase setSuccess(Boolean value) { this.Success = value; return this; }
public String getMessage() { return Message; }
public ApiResponseBase setMessage(String value) { this.Message = value; return this; }
}
}
Java PaymentProfileUpdateEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=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: 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>