示例#1
0
 //Sync
 public virtual StripeToken Create(StripeTokenCreateOptions createOptions, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeToken> .MapFromJson(
                Requestor.PostString(this.ApplyAllParameters(createOptions, Urls.Tokens, false),
                                     SetupRequestOptions(requestOptions))
                ));
 }
示例#2
0
 //Async
 public virtual async Task <StripeToken> CreateAsync(StripeTokenCreateOptions createOptions, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeToken> .MapFromJson(
                await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, Urls.Tokens, false),
                                                SetupRequestOptions(requestOptions),
                                                cancellationToken)
                ));
 }