Пример #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
 // Update A Customer
 public Customer Update(int customerId, Customer newData)
 {
     return Put(apiEndpoint: String.Format("customers/{0}", customerId), toSerialize: new CustomerBundle { Content = newData }).Content;
 }
Пример #3
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;
 }
Пример #4
0
 // Create A Customer
 public Customer Create(Customer orderData)
 {
     return Post(apiEndpoint: "customers", toSerialize: new CustomerBundle { Content = orderData }).Content;
 }