コード例 #1
0
 /// <summary>
 /// Update a Customer
 /// </summary>
 /// <param name="customerId">The identifier of customer</param>
 /// <param name="newData">Customer object to be updated</param>
 /// <returns></returns>
 public async Task<Customer> Update(int customerId, Customer newData)
 {
     var endPoint = String.Format("customers/{0}", customerId);
     var bundle = new CustomerBundle { Content = newData };
     return (await Put(endPoint, toSerialize: bundle)).Content;
 }
コード例 #2
0
 /// <summary>
 /// Create a Customer
 /// </summary>
 /// <param name="orderData"></param>
 /// <returns></returns>
 public async Task<Customer> Create(Customer orderData)
 {
     var bundle = new CustomerBundle { Content = orderData };
     return (await Post(apiEndpoint: "customers", toSerialize: bundle)).Content;
 }