public BillingInfoResponse UpdateBillingInfo(string sAccountCode, BillingInfoRequest billingInfo) { IRestRequest request = this.CreateRequest(this.Resource + "/{AccountCode}/billing_info", Method.PUT); request.AddUrlSegment("AccountCode", sAccountCode); request.AddBody(billingInfo); return(this.ExecuteRequest <BillingInfoResponse>(request).Data); }
public void UpdateBillingInfoTest() { var firstCustomer = GetCustomers().Customers.First(); var billingInfo = new BillingInfoRequest() { CreditCard = new CreditCard() { HolderName = "Novo Nome", Number = "5555666677778884", ExpirationMonth = DateTime.Now.ToString("MM"), ExpirationYear = DateTime.Now.AddYears(5).ToString("yy") } }; var retorno = assinaturasClient.UpdateBillingInfo(firstCustomer.Code, billingInfo); Assert.AreEqual("Dados alterados com sucesso", retorno.Message); }