/// <summary> /// Creates a <see cref="ShopifyCharge"/>. /// </summary> /// <param name="charge">The <see cref="ShopifyCharge"/> to create.</param> /// <returns>The new <see cref="ShopifyCharge"/>.</returns> public async Task<ShopifyCharge> CreateAsync(ShopifyCharge charge) { IRestRequest req = RequestEngine.CreateRequest("application_charges.json", Method.POST, "application_charge"); req.AddJsonBody(new { application_charge = charge }); return await RequestEngine.ExecuteRequestAsync<ShopifyCharge>(_RestClient, req); }
/// <summary> /// Creates a <see cref="ShopifyCharge"/>. /// </summary> /// <param name="charge">The <see cref="ShopifyCharge"/> to create.</param> /// <returns>The new <see cref="ShopifyCharge"/>.</returns> public async Task <ShopifyCharge> CreateAsync(ShopifyCharge charge) { IRestRequest req = RequestEngine.CreateRequest("application_charges.json", Method.POST, "application_charge"); req.AddJsonBody(new { application_charge = charge }); return(await RequestEngine.ExecuteRequestAsync <ShopifyCharge>(_RestClient, req)); }