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