/// <summary>
        /// Updates the customer's billing profile.
        /// </summary>
        /// <param name="billingProfile">A customer billing profile with updated fields.</param>
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        /// <returns>The updated customer billing profile.</returns>
        public async Task <CustomerBillingProfile> UpdateAsync(CustomerBillingProfile entity, CancellationToken cancellationToken = default)
        {
            entity.AssertNotNull(nameof(entity));

            return(await Partner.ServiceClient.PutAsync <CustomerBillingProfile, CustomerBillingProfile>(
                       new Uri(
                           string.Format(
                               CultureInfo.InvariantCulture,
                               $"/{PartnerService.Instance.ApiVersion}/{PartnerService.Instance.Configuration.Apis.UpdateCustomerBillingProfile.Path}",
                               Context),
                           UriKind.Relative),
                       entity,
                       cancellationToken).ConfigureAwait(false));
        }
Example #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PSCustomerBillingProfile" /> class.
 /// </summary>
 /// <param name="profile">The base customer for this instance.</param>
 public PSCustomerBillingProfile(CustomerBillingProfile profile)
 {
     this.CopyFrom(profile);
 }