Exemplo n.º 1
0
        /// <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);
        }
Exemplo n.º 2
0
        /// <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));
        }