Exemplo n.º 1
0
 //Sync
 public virtual StripeCharge Create(StripeChargeCreateOptions createOptions, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeCharge> .MapFromJson(
                Requestor.PostString(Infrastructure.ParameterBuilder.ApplyAllParameters(this, createOptions, Urls.Charges, false),
                                     SetupRequestOptions(requestOptions))
                ));
 }
Exemplo n.º 2
0
 //Async
 public virtual async Task <StripeCharge> CreateAsync(StripeChargeCreateOptions createOptions, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeCharge> .MapFromJson(
                await Requestor.PostStringAsync(Infrastructure.ParameterBuilder.ApplyAllParameters(this, createOptions, Urls.Charges, false),
                                                SetupRequestOptions(requestOptions),
                                                cancellationToken)
                ));
 }