本文整理汇总了C#中Stripe.StripeRequestOptions类的典型用法代码示例。如果您正苦于以下问题:C# StripeRequestOptions类的具体用法?C# StripeRequestOptions怎么用?C# StripeRequestOptions使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StripeRequestOptions类属于Stripe命名空间,在下文中一共展示了StripeRequestOptions类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Get
public virtual StripeRecipient Get(string recipientId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeRecipient>.MapFromJson(
Requestor.GetString(this.ApplyAllParameters(null, $"{Urls.Recipients}/{recipientId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeRecipientService.cs
示例2: Pay
public virtual StripeInvoice Pay(string invoiceId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeInvoice>.MapFromJson(
Requestor.PostString(this.ApplyAllParameters(null, $"{Urls.Invoices}/{invoiceId}/pay", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeInvoiceService.cs
示例3: Get
//Sync
public virtual StripeEvent Get(string eventId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeEvent>.MapFromJson(
Requestor.GetString($"{Urls.Events}/{eventId}",
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:8,代码来源:StripeEventService.cs
示例4: Create
//Sync
public virtual StripeTransfer Create(StripeTransferCreateOptions createOptions, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeTransfer>.MapFromJson(
Requestor.PostString(this.ApplyAllParameters(createOptions, Urls.Transfers, false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:8,代码来源:StripeTransferService.cs
示例5: GetWebRequest
internal static WebRequest GetWebRequest(string url, string method, StripeRequestOptions requestOptions, bool useBearer = false)
{
requestOptions.ApiKey = requestOptions.ApiKey ?? StripeConfiguration.GetApiKey();
var request = (HttpWebRequest)WebRequest.Create(url);
request.Method = method;
if(!useBearer)
request.Headers.Add("Authorization", GetAuthorizationHeaderValue(requestOptions.ApiKey));
else
request.Headers.Add("Authorization", GetAuthorizationHeaderValueBearer(requestOptions.ApiKey));
request.Headers.Add("Stripe-Version", StripeConfiguration.ApiVersion);
if (requestOptions.StripeConnectAccountId != null)
request.Headers.Add("Stripe-Account", requestOptions.StripeConnectAccountId);
if (requestOptions.IdempotencyKey != null)
request.Headers.Add("Idempotency-Key", requestOptions.IdempotencyKey);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Stripe.net (https://github.com/jaymedavis/stripe.net)";
return request;
}
开发者ID:shirley-truong-volusion,项目名称:stripe.net,代码行数:25,代码来源:Requestor.cs
示例6: ListAsync
public virtual async Task<IEnumerable<StripeInvoiceLineItem>> ListAsync(StripeInvoiceItemListOptions listOptions = null, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeInvoiceLineItem>.MapCollectionFromJson(
await Requestor.GetStringAsync(this.ApplyAllParameters(listOptions, Urls.InvoiceItems, true),
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeInvoiceItemService.cs
示例7: Update
public virtual StripeCustomer Update(string customerId, StripeCustomerUpdateOptions updateOptions, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeCustomer>.MapFromJson(
Requestor.PostString(this.ApplyAllParameters(updateOptions, $"{Urls.Customers}/{customerId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeCustomerService.cs
示例8: Delete
public virtual StripeDeleted Delete(string accountId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeDeleted>.MapFromJson(
Requestor.Delete(this.ApplyAllParameters(null, $"{Urls.Accounts}/{accountId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeAccountService.cs
示例9: Get
public virtual StripeBalanceTransaction Get(string id, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeBalanceTransaction>.MapFromJson(
Requestor.GetString(this.ApplyAllParameters(null, $"{Urls.BalanceTransactions}/{id}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:richardlawley,项目名称:stripe.net,代码行数:7,代码来源:StripeBalanceService.cs
示例10: Get
public virtual StripeCoupon Get(string couponId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeCoupon>.MapFromJson(
Requestor.GetString(this.ApplyAllParameters(null, $"{Urls.Coupons}/{couponId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeCouponService.cs
示例11: Update
public virtual StripeAccount Update(string accountId, StripeAccountUpdateOptions updateOptions, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeAccount>.MapFromJson(
Requestor.PostString(this.ApplyAllParameters(updateOptions, $"{Urls.Accounts}/{accountId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeAccountService.cs
示例12: Delete
public virtual void Delete(string customerId, string bankAccountId, StripeRequestOptions requestOptions = null)
{
Requestor.Delete(
this.ApplyAllParameters(null, $"{Urls.BaseUrl}/customers/{customerId}/sources/{bankAccountId}"),
SetupRequestOptions(requestOptions)
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:BankAccountService.cs
示例13: GetAsync
public virtual async Task<StripeEvent> GetAsync(string eventId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeEvent>.MapFromJson(
await Requestor.GetStringAsync($"{Urls.Events}/{eventId}",
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeEventService.cs
示例14: Delete
public virtual StripeDeleted Delete(string recipientId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeDeleted>.MapFromJson(
Requestor.Delete($"{Urls.Recipients}/{recipientId}",
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeRecipientService.cs
示例15: CreateAsync
public virtual async Task<StripeInvoiceLineItem> CreateAsync(StripeInvoiceItemCreateOptions createOptions, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeInvoiceLineItem>.MapFromJson(
await Requestor.PostStringAsync(this.ApplyAllParameters(createOptions, Urls.InvoiceItems, false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeInvoiceItemService.cs
示例16: List
public virtual IEnumerable<StripeBalanceTransaction> List(StripeBalanceTransactionListOptions options = null, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeBalanceTransaction>.MapCollectionFromJson(
Requestor.GetString(this.ApplyAllParameters(options, Urls.BalanceTransactions, true),
SetupRequestOptions(requestOptions))
);
}
开发者ID:richardlawley,项目名称:stripe.net,代码行数:7,代码来源:StripeBalanceService.cs
示例17: GetAsync
public virtual async Task<StripeInvoiceLineItem> GetAsync(string invoiceItemId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeInvoiceLineItem>.MapFromJson(
await Requestor.GetStringAsync(this.ApplyAllParameters(null, $"{Urls.InvoiceItems}/{invoiceItemId}", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeInvoiceItemService.cs
示例18: GetAsync
public virtual async Task<StripeToken> GetAsync(string tokenId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeToken>.MapFromJson(
await Requestor.GetStringAsync($"{Urls.Tokens}/{tokenId}",
SetupRequestOptions(requestOptions))
);
}
开发者ID:Xordal,项目名称:stripe.net,代码行数:7,代码来源:StripeTokenService.cs
示例19: Create
//Sync
public virtual StripeRefund Create(string chargeId, StripeRefundCreateOptions createOptions = null, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeRefund>.MapFromJson(
Requestor.PostString(this.ApplyAllParameters(createOptions, $"{Urls.Charges}/{chargeId}/refunds", false),
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:8,代码来源:StripeRefundService.cs
示例20: Delete
public virtual StripeDeleted Delete(string invoiceItemId, StripeRequestOptions requestOptions = null)
{
return Mapper<StripeDeleted>.MapFromJson(
Requestor.Delete($"{Urls.InvoiceItems}/{invoiceItemId}",
SetupRequestOptions(requestOptions))
);
}
开发者ID:jaymedavis,项目名称:stripe.net,代码行数:7,代码来源:StripeInvoiceItemService.cs
注:本文中的Stripe.StripeRequestOptions类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论