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. |
---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using ClubReady.Web.Api.Sales.Wallet;
using ClubReady.Sales.Wallet;
using ClubReady.Core.Api.Models;
namespace ClubReady.Core.Api.Models
{
public partial class ApiDtoBase
{
public virtual string ApiKey { get; set; }
public virtual int? StoreId { get; set; }
public virtual int? ChainId { get; set; }
}
public partial class ApiResponseBase
{
public virtual bool Success { get; set; }
public virtual string Message { get; set; }
}
}
namespace ClubReady.Sales.Wallet
{
public partial class PaymentProfileUpdateRequestDto
: ApiDtoBase
{
public virtual string AcctToken { get; set; }
public virtual int? ModifiedBy { get; set; }
public virtual byte? CcExpMonth { get; set; }
public virtual byte? CcExpYear { get; set; }
public virtual string FullName { get; set; }
public virtual string PrefixName { get; set; }
public virtual string FirstName { get; set; }
public virtual string MiddleName { get; set; }
public virtual string LastName { get; set; }
public virtual string SuffixName { get; set; }
public virtual string Address1 { get; set; }
public virtual string Address2 { get; set; }
public virtual string Urbanization { get; set; }
public virtual string City { get; set; }
public virtual string State { get; set; }
public virtual string PostalCode { get; set; }
public virtual bool? IsDisabled { get; set; }
public virtual bool? ExcludeFromAcctUpdater { get; set; }
}
public partial class PaymentProfileUpdateResponseDto
: ApiResponseBase
{
}
}
namespace ClubReady.Web.Api.Sales.Wallet
{
public partial class PaymentProfileUpdateEndpoint
: PaymentProfileUpdateRequestDto
{
///<summary>
///Grants access to resources
///</summary>
[ApiMember(Description="Grants access to resources", IsRequired=true)]
public virtual string ApiKey { get; set; }
///<summary>
///AcctToken to update
///</summary>
[ApiMember(Description="AcctToken to update", IsRequired=true)]
public virtual string AcctToken { get; set; }
///<summary>
///UserId that is updating profile
///</summary>
[ApiMember(Description="UserId that is updating profile", IsRequired=true)]
public virtual int? ModifiedBy { get; set; }
///<summary>
///Expiry Month: 1 = January, 12 = December
///</summary>
[ApiMember(Description="Expiry Month: 1 = January, 12 = December")]
public virtual byte? CcExpMonth { get; set; }
///<summary>
///Expiry Year: Two digit year
///</summary>
[ApiMember(Description="Expiry Year: Two digit year")]
public virtual byte? CcExpYear { get; set; }
///<summary>
///The name can be provided with FullName OR as separate fields (PrefixName, FirstName, MiddleName, LastName, SuffixName).<br />Providing both will cause an error.
///</summary>
[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 virtual string FullName { get; set; }
[ApiMember]
public virtual string PrefixName { get; set; }
[ApiMember]
public virtual string FirstName { get; set; }
[ApiMember]
public virtual string MiddleName { get; set; }
[ApiMember]
public virtual string LastName { get; set; }
[ApiMember]
public virtual string SuffixName { get; set; }
[ApiMember]
public virtual string Address1 { get; set; }
[ApiMember]
public virtual string Address2 { get; set; }
[ApiMember]
public virtual string Urbanization { get; set; }
[ApiMember]
public virtual string City { get; set; }
[ApiMember]
public virtual string State { get; set; }
[ApiMember]
public virtual string PostalCode { get; set; }
///<summary>
///Disable (or Enabled) the Payment Profile
///</summary>
[ApiMember(Description="Disable (or Enabled) the Payment Profile")]
public virtual bool? IsDisabled { get; set; }
///<summary>
///Exclude (or Include) from Account Updater
///</summary>
[ApiMember(Description="Exclude (or Include) from Account Updater")]
public virtual bool? ExcludeFromAcctUpdater { get; set; }
}
public partial class PaymentProfileUpdateResponse
: PaymentProfileUpdateResponseDto
{
}
}
C# PaymentProfileUpdateEndpoint DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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/jsv
Content-Type: text/jsv
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/jsv Content-Length: length { Success: False, Message: String }