From 17a1c2b87ff9600b21205f80ace1574e9c52115b Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Thu, 6 Jun 2019 09:24:06 -0700 Subject: [PATCH] Add options classes for Get/GetAsync methods (#1644) --- .../Services/Account/AccountGetOptions.cs | 6 ++++++ .../Services/Account/AccountService.cs | 10 +++++----- .../ApplePayDomains/ApplePayDomainGetOptions.cs | 6 ++++++ .../ApplePayDomains/ApplePayDomainService.cs | 10 +++++----- .../ApplicationFeeRefundGetOptions.cs | 6 ++++++ .../ApplicationFeeRefundListOptions.cs | 2 -- .../ApplicationFeeRefundService.cs | 10 +++++----- .../ApplicationFees/ApplicationFeeGetOptions.cs | 6 ++++++ .../ApplicationFees/ApplicationFeeService.cs | 10 +++++----- .../BalanceTransactionGetOptions.cs | 6 ++++++ .../BalanceTransactionService.cs | 10 +++++----- .../BankAccounts/BankAccountGetOptions.cs | 6 ++++++ .../Services/BankAccounts/BankAccountService.cs | 10 +++++----- .../Capabilities/CapabilityGetOptions.cs | 6 ++++++ .../Capabilities/CapabilityListOptions.cs | 2 -- .../Services/Capabilities/CapabilityService.cs | 10 +++++----- src/Stripe.net/Services/Cards/CardGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Cards/CardService.cs | 10 +++++----- .../Services/Charges/ChargeGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Charges/ChargeService.cs | 10 +++++----- .../Services/Checkout/SessionGetOptions.cs | 6 ++++++ .../Services/Checkout/SessionService.cs | 8 ++++---- .../CountrySpecs/CountrySpecGetOptions.cs | 6 ++++++ .../Services/CountrySpecs/CountrySpecService.cs | 10 +++++----- .../Services/Coupons/CouponGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Coupons/CouponService.cs | 10 +++++----- .../CreditNotes/CreditNoteCreateOptions.cs | 2 -- .../Services/CreditNotes/CreditNoteGetOptions.cs | 6 ++++++ .../CreditNotes/CreditNoteListOptions.cs | 1 - .../Services/CreditNotes/CreditNoteService.cs | 10 +++++----- .../Services/Customers/CustomerGetOptions.cs | 6 ++++++ .../Services/Customers/CustomerService.cs | 10 +++++----- .../Services/Disputes/DisputeGetOptions.cs | 6 ++++++ .../Services/Disputes/DisputeService.cs | 10 +++++----- .../Services/Events/EventGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Events/EventService.cs | 10 +++++----- .../ExchangeRates/ExchangeRateGetOptions.cs | 6 ++++++ .../ExchangeRates/ExchangeRateListOptions.cs | 2 -- .../ExchangeRates/ExchangeRateService.cs | 10 +++++----- .../ExternalAccountGetOptions.cs | 6 ++++++ .../ExternalAccountListOptions.cs | 2 -- .../ExternalAccounts/ExternalAccountService.cs | 10 +++++----- .../Services/FileLinks/FileLinkGetOptions.cs | 6 ++++++ .../Services/FileLinks/FileLinkService.cs | 10 +++++----- src/Stripe.net/Services/Files/FileGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Files/FileService.cs | 10 +++++----- .../InvoiceItems/InvoiceItemGetOptions.cs | 6 ++++++ .../Services/InvoiceItems/InvoiceItemService.cs | 10 +++++----- .../Services/Invoices/InvoiceGetOptions.cs | 6 ++++++ .../Services/Invoices/InvoiceService.cs | 10 +++++----- .../Authorizations/AuthorizationGetOptions.cs | 6 ++++++ .../Authorizations/AuthorizationService.cs | 10 +++++----- .../Issuing/Cardholders/CardholderGetOptions.cs | 6 ++++++ .../Issuing/Cardholders/CardholderService.cs | 10 +++++----- .../Services/Issuing/Cards/CardGetOptions.cs | 6 ++++++ .../Services/Issuing/Cards/CardService.cs | 10 +++++----- .../Issuing/Disputes/DisputeGetOptions.cs | 6 ++++++ .../Services/Issuing/Disputes/DisputeService.cs | 10 +++++----- .../Transactions/TransactionGetOptions.cs | 6 ++++++ .../Issuing/Transactions/TransactionService.cs | 10 +++++----- .../Services/Orders/OrderGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Orders/OrderService.cs | 10 +++++----- .../PaymentIntents/PaymentIntentGetOptions.cs | 1 - .../PaymentIntents/PaymentIntentListOptions.cs | 2 -- .../PaymentIntents/PaymentIntentService.cs | 16 +++------------- .../PaymentMethods/PaymentMethodGetOptions.cs | 6 ++++++ .../PaymentMethods/PaymentMethodListOptions.cs | 1 - .../PaymentMethods/PaymentMethodService.cs | 10 +++++----- .../Services/Payouts/PayoutGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Payouts/PayoutService.cs | 10 +++++----- .../Services/Persons/PersonGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Persons/PersonService.cs | 10 +++++----- src/Stripe.net/Services/Plans/PlanGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Plans/PlanService.cs | 10 +++++----- .../Services/Products/ProductGetOptions.cs | 6 ++++++ .../Services/Products/ProductService.cs | 10 +++++----- .../EarlyFraudWarningGetOptions.cs | 6 ++++++ .../EarlyFraudWarningService.cs | 10 +++++----- .../ValueListItems/ValueListItemGetOptions.cs | 6 ++++++ .../Radar/ValueListItems/ValueListItemService.cs | 10 +++++----- .../Radar/ValueLists/ValueListGetOptions.cs | 6 ++++++ .../Radar/ValueLists/ValueListService.cs | 10 +++++----- .../Services/Refunds/RefundGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Refunds/RefundService.cs | 10 +++++----- .../Reporting/ReportRuns/ReportRunGetOptions.cs | 6 ++++++ .../Reporting/ReportRuns/ReportRunService.cs | 10 +++++----- .../ReportTypes/ReportTypeGetOptions.cs | 6 ++++++ .../ReportTypes/ReportTypeListOptions.cs | 2 -- .../Reporting/ReportTypes/ReportTypeService.cs | 10 +++++----- .../Services/Reviews/ReviewGetOptions.cs | 6 ++++++ .../Services/Reviews/ReviewListOptions.cs | 2 -- src/Stripe.net/Services/Reviews/ReviewService.cs | 10 +++++----- .../ScheduledQueryRunGetOptions.cs | 6 ++++++ .../ScheduledQueryRunListOptions.cs | 4 ---- .../ScheduledQueryRunService.cs | 10 +++++----- src/Stripe.net/Services/Skus/SkuGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Skus/SkuService.cs | 10 +++++----- .../SourceTransactionsGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Sources/SourceService.cs | 16 +++------------- .../SubscriptionItemGetOptions.cs | 6 ++++++ .../SubscriptionItems/SubscriptionItemService.cs | 10 +++++----- .../SubscriptionScheduleRevisionGetOptions.cs | 6 ++++++ .../SubscriptionScheduleRevisionListOptions.cs | 2 -- .../SubscriptionScheduleRevisionService.cs | 10 +++++----- .../SubscriptionScheduleGetOptions.cs | 6 ++++++ .../SubscriptionScheduleService.cs | 10 +++++----- .../Subscriptions/SubscriptionGetOptions.cs | 6 ++++++ .../Subscriptions/SubscriptionService.cs | 10 +++++----- .../Services/TaxIds/TaxIdGetOptions.cs | 6 ++++++ .../Services/TaxIds/TaxIdListOptions.cs | 2 -- src/Stripe.net/Services/TaxIds/TaxIdService.cs | 10 +++++----- .../Services/TaxRates/TaxRateGetOptions.cs | 6 ++++++ .../Services/TaxRates/TaxRateListOptions.cs | 1 - .../Services/TaxRates/TaxRateService.cs | 10 +++++----- .../Terminal/Locations/LocationGetOptions.cs | 6 ++++++ .../Terminal/Locations/LocationService.cs | 8 ++++---- .../Terminal/Readers/ReaderGetOptions.cs | 6 ++++++ .../Services/Terminal/Readers/ReaderService.cs | 8 ++++---- .../Services/Tokens/TokenGetOptions.cs | 6 ++++++ src/Stripe.net/Services/Tokens/TokenService.cs | 10 +++++----- .../Services/Topups/TopupGetOptions.cs | 6 ++++++ .../Services/Topups/TopupListOptions.cs | 2 -- src/Stripe.net/Services/Topups/TopupService.cs | 10 +++++----- .../TransferReversalGetOptions.cs | 6 ++++++ .../TransferReversalListOptions.cs | 2 -- .../TransferReversals/TransferReversalService.cs | 10 +++++----- .../Services/Transfers/TransferGetOptions.cs | 6 ++++++ .../Services/Transfers/TransferService.cs | 10 +++++----- .../WebhookEndpointGetOptions.cs | 6 ++++++ .../WebhookEndpointListOptions.cs | 2 -- .../WebhookEndpoints/WebhookEndpointService.cs | 10 +++++----- .../Services/_interfaces/INestedRetrievable.cs | 7 ++++--- .../Services/_interfaces/IRetrievable.cs | 7 ++++--- src/StripeTests/Services/_base/ServiceTest.cs | 10 +++++----- 134 files changed, 627 insertions(+), 343 deletions(-) create mode 100644 src/Stripe.net/Services/Account/AccountGetOptions.cs create mode 100644 src/Stripe.net/Services/ApplePayDomains/ApplePayDomainGetOptions.cs create mode 100644 src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundGetOptions.cs create mode 100644 src/Stripe.net/Services/ApplicationFees/ApplicationFeeGetOptions.cs create mode 100644 src/Stripe.net/Services/BalanceTransactions/BalanceTransactionGetOptions.cs create mode 100644 src/Stripe.net/Services/BankAccounts/BankAccountGetOptions.cs create mode 100644 src/Stripe.net/Services/Capabilities/CapabilityGetOptions.cs create mode 100644 src/Stripe.net/Services/Cards/CardGetOptions.cs create mode 100644 src/Stripe.net/Services/Charges/ChargeGetOptions.cs create mode 100644 src/Stripe.net/Services/Checkout/SessionGetOptions.cs create mode 100644 src/Stripe.net/Services/CountrySpecs/CountrySpecGetOptions.cs create mode 100644 src/Stripe.net/Services/Coupons/CouponGetOptions.cs create mode 100644 src/Stripe.net/Services/CreditNotes/CreditNoteGetOptions.cs create mode 100644 src/Stripe.net/Services/Customers/CustomerGetOptions.cs create mode 100644 src/Stripe.net/Services/Disputes/DisputeGetOptions.cs create mode 100644 src/Stripe.net/Services/Events/EventGetOptions.cs create mode 100644 src/Stripe.net/Services/ExchangeRates/ExchangeRateGetOptions.cs create mode 100644 src/Stripe.net/Services/ExternalAccounts/ExternalAccountGetOptions.cs create mode 100644 src/Stripe.net/Services/FileLinks/FileLinkGetOptions.cs create mode 100644 src/Stripe.net/Services/Files/FileGetOptions.cs create mode 100644 src/Stripe.net/Services/InvoiceItems/InvoiceItemGetOptions.cs create mode 100644 src/Stripe.net/Services/Invoices/InvoiceGetOptions.cs create mode 100644 src/Stripe.net/Services/Issuing/Authorizations/AuthorizationGetOptions.cs create mode 100644 src/Stripe.net/Services/Issuing/Cardholders/CardholderGetOptions.cs create mode 100644 src/Stripe.net/Services/Issuing/Cards/CardGetOptions.cs create mode 100644 src/Stripe.net/Services/Issuing/Disputes/DisputeGetOptions.cs create mode 100644 src/Stripe.net/Services/Issuing/Transactions/TransactionGetOptions.cs create mode 100644 src/Stripe.net/Services/Orders/OrderGetOptions.cs create mode 100644 src/Stripe.net/Services/PaymentMethods/PaymentMethodGetOptions.cs create mode 100644 src/Stripe.net/Services/Payouts/PayoutGetOptions.cs create mode 100644 src/Stripe.net/Services/Persons/PersonGetOptions.cs create mode 100644 src/Stripe.net/Services/Plans/PlanGetOptions.cs create mode 100644 src/Stripe.net/Services/Products/ProductGetOptions.cs create mode 100644 src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningGetOptions.cs create mode 100644 src/Stripe.net/Services/Radar/ValueListItems/ValueListItemGetOptions.cs create mode 100644 src/Stripe.net/Services/Radar/ValueLists/ValueListGetOptions.cs create mode 100644 src/Stripe.net/Services/Refunds/RefundGetOptions.cs create mode 100644 src/Stripe.net/Services/Reporting/ReportRuns/ReportRunGetOptions.cs create mode 100644 src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeGetOptions.cs create mode 100644 src/Stripe.net/Services/Reviews/ReviewGetOptions.cs create mode 100644 src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunGetOptions.cs create mode 100644 src/Stripe.net/Services/Skus/SkuGetOptions.cs create mode 100644 src/Stripe.net/Services/SourceTransactions/SourceTransactionsGetOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionItems/SubscriptionItemGetOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionGetOptions.cs create mode 100644 src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleGetOptions.cs create mode 100644 src/Stripe.net/Services/Subscriptions/SubscriptionGetOptions.cs create mode 100644 src/Stripe.net/Services/TaxIds/TaxIdGetOptions.cs create mode 100644 src/Stripe.net/Services/TaxRates/TaxRateGetOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/Locations/LocationGetOptions.cs create mode 100644 src/Stripe.net/Services/Terminal/Readers/ReaderGetOptions.cs create mode 100644 src/Stripe.net/Services/Tokens/TokenGetOptions.cs create mode 100644 src/Stripe.net/Services/Topups/TopupGetOptions.cs create mode 100644 src/Stripe.net/Services/TransferReversals/TransferReversalGetOptions.cs create mode 100644 src/Stripe.net/Services/Transfers/TransferGetOptions.cs create mode 100644 src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointGetOptions.cs diff --git a/src/Stripe.net/Services/Account/AccountGetOptions.cs b/src/Stripe.net/Services/Account/AccountGetOptions.cs new file mode 100644 index 0000000000..fa040958bb --- /dev/null +++ b/src/Stripe.net/Services/Account/AccountGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class AccountGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Account/AccountService.cs b/src/Stripe.net/Services/Account/AccountService.cs index 156a64fe56..7f975c1efd 100644 --- a/src/Stripe.net/Services/Account/AccountService.cs +++ b/src/Stripe.net/Services/Account/AccountService.cs @@ -9,7 +9,7 @@ public class AccountService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public AccountService() @@ -46,14 +46,14 @@ public virtual Account Delete(string accountId, RequestOptions requestOptions = return this.DeleteEntityAsync(accountId, null, requestOptions, cancellationToken); } - public virtual Account Get(string accountId, RequestOptions requestOptions = null) + public virtual Account Get(string accountId, AccountGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(accountId, null, requestOptions); + return this.GetEntity(accountId, options, requestOptions); } - public virtual Task GetAsync(string accountId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string accountId, AccountGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(accountId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(accountId, options, requestOptions, cancellationToken); } public virtual Account GetSelf(RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainGetOptions.cs b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainGetOptions.cs new file mode 100644 index 0000000000..7462b3ff77 --- /dev/null +++ b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ApplePayDomainGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainService.cs b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainService.cs index 6929af44ad..bbbf58ca06 100644 --- a/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainService.cs +++ b/src/Stripe.net/Services/ApplePayDomains/ApplePayDomainService.cs @@ -8,7 +8,7 @@ public class ApplePayDomainService : Service, ICreatable, IDeletable, IListable, - IRetrievable + IRetrievable { public ApplePayDomainService() : base(null) @@ -42,14 +42,14 @@ public virtual ApplePayDomain Delete(string domainId, RequestOptions requestOpti return this.DeleteEntityAsync(domainId, null, requestOptions, cancellationToken); } - public virtual ApplePayDomain Get(string domainId, RequestOptions requestOptions = null) + public virtual ApplePayDomain Get(string domainId, ApplePayDomainGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(domainId, null, requestOptions); + return this.GetEntity(domainId, options, requestOptions); } - public virtual Task GetAsync(string domainId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string domainId, ApplePayDomainGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(domainId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(domainId, options, requestOptions, cancellationToken); } public virtual StripeList List(ApplePayDomainListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundGetOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundGetOptions.cs new file mode 100644 index 0000000000..102a00c174 --- /dev/null +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ApplicationFeeRefundGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundListOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundListOptions.cs index 4dca704ffb..5bd3183cc0 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundListOptions.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class ApplicationFeeRefundListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs index 55ca4ef14f..3a2527ea8b 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundService.cs @@ -7,7 +7,7 @@ namespace Stripe public class ApplicationFeeRefundService : ServiceNested, INestedCreatable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public ApplicationFeeRefundService() @@ -36,14 +36,14 @@ public virtual ApplicationFeeRefund Create(string applicationFeeId, ApplicationF return this.CreateNestedEntityAsync(applicationFeeId, options, requestOptions, cancellationToken); } - public virtual ApplicationFeeRefund Get(string applicationFeeId, string refundId, RequestOptions requestOptions = null) + public virtual ApplicationFeeRefund Get(string applicationFeeId, string refundId, ApplicationFeeRefundGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(applicationFeeId, refundId, null, requestOptions); + return this.GetNestedEntity(applicationFeeId, refundId, options, requestOptions); } - public virtual Task GetAsync(string applicationFeeId, string refundId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string applicationFeeId, string refundId, ApplicationFeeRefundGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(applicationFeeId, refundId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(applicationFeeId, refundId, options, requestOptions, cancellationToken); } public virtual StripeList List(string applicationFeeId, ApplicationFeeRefundListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeGetOptions.cs b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeGetOptions.cs new file mode 100644 index 0000000000..4d4f345ec4 --- /dev/null +++ b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ApplicationFeeGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs index 83014e492f..2bfffbc470 100644 --- a/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs +++ b/src/Stripe.net/Services/ApplicationFees/ApplicationFeeService.cs @@ -6,7 +6,7 @@ namespace Stripe public class ApplicationFeeService : Service, IListable, - IRetrievable + IRetrievable { public ApplicationFeeService() : base(null) @@ -30,14 +30,14 @@ public ApplicationFeeService(IStripeClient client) public bool ExpandOriginatingTransaction { get; set; } - public virtual ApplicationFee Get(string applicationFeeId, RequestOptions requestOptions = null) + public virtual ApplicationFee Get(string applicationFeeId, ApplicationFeeGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(applicationFeeId, null, requestOptions); + return this.GetEntity(applicationFeeId, options, requestOptions); } - public virtual Task GetAsync(string applicationFeeId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string applicationFeeId, ApplicationFeeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(applicationFeeId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(applicationFeeId, options, requestOptions, cancellationToken); } public virtual StripeList List(ApplicationFeeListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionGetOptions.cs b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionGetOptions.cs new file mode 100644 index 0000000000..a261cf5b72 --- /dev/null +++ b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class BalanceTransactionGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs index c9fcfbf662..77f3913877 100644 --- a/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs +++ b/src/Stripe.net/Services/BalanceTransactions/BalanceTransactionService.cs @@ -6,7 +6,7 @@ namespace Stripe public class BalanceTransactionService : Service, IListable, - IRetrievable + IRetrievable { public BalanceTransactionService() : base(null) @@ -22,14 +22,14 @@ public BalanceTransactionService(IStripeClient client) public bool ExpandSource { get; set; } - public virtual BalanceTransaction Get(string balanceTransactionId, RequestOptions requestOptions = null) + public virtual BalanceTransaction Get(string balanceTransactionId, BalanceTransactionGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(balanceTransactionId, null, requestOptions); + return this.GetEntity(balanceTransactionId, options, requestOptions); } - public virtual Task GetAsync(string balanceTransactionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string balanceTransactionId, BalanceTransactionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(balanceTransactionId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(balanceTransactionId, options, requestOptions, cancellationToken); } public virtual StripeList List(BalanceTransactionListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountGetOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountGetOptions.cs new file mode 100644 index 0000000000..82a6a0e183 --- /dev/null +++ b/src/Stripe.net/Services/BankAccounts/BankAccountGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class BankAccountGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountService.cs b/src/Stripe.net/Services/BankAccounts/BankAccountService.cs index 55c124a8f5..834c2c193f 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountService.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountService.cs @@ -9,7 +9,7 @@ public class BankAccountService : ServiceNested, INestedCreatable, INestedDeletable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public BankAccountService() @@ -46,14 +46,14 @@ public virtual BankAccount Delete(string customerId, string bankAccountId, Reque return this.DeleteNestedEntityAsync(customerId, bankAccountId, null, requestOptions, cancellationToken); } - public virtual BankAccount Get(string customerId, string bankAccountId, RequestOptions requestOptions = null) + public virtual BankAccount Get(string customerId, string bankAccountId, BankAccountGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(customerId, bankAccountId, null, requestOptions); + return this.GetNestedEntity(customerId, bankAccountId, options, requestOptions); } - public virtual Task GetAsync(string customerId, string bankAccountId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string customerId, string bankAccountId, BankAccountGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(customerId, bankAccountId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(customerId, bankAccountId, options, requestOptions, cancellationToken); } public virtual StripeList List(string customerId, BankAccountListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Capabilities/CapabilityGetOptions.cs b/src/Stripe.net/Services/Capabilities/CapabilityGetOptions.cs new file mode 100644 index 0000000000..7ea4ffcf18 --- /dev/null +++ b/src/Stripe.net/Services/Capabilities/CapabilityGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CapabilityGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Capabilities/CapabilityListOptions.cs b/src/Stripe.net/Services/Capabilities/CapabilityListOptions.cs index 7eaf4e65fa..7477abd5e3 100644 --- a/src/Stripe.net/Services/Capabilities/CapabilityListOptions.cs +++ b/src/Stripe.net/Services/Capabilities/CapabilityListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class CapabilityListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/Capabilities/CapabilityService.cs b/src/Stripe.net/Services/Capabilities/CapabilityService.cs index 9ec7174be1..9271a45752 100644 --- a/src/Stripe.net/Services/Capabilities/CapabilityService.cs +++ b/src/Stripe.net/Services/Capabilities/CapabilityService.cs @@ -6,7 +6,7 @@ namespace Stripe public class CapabilityService : ServiceNested, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public CapabilityService() @@ -23,14 +23,14 @@ public CapabilityService(IStripeClient client) public bool ExpandAccount { get; set; } - public virtual Capability Get(string accountId, string capabilityId, RequestOptions requestOptions = null) + public virtual Capability Get(string accountId, string capabilityId, CapabilityGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(accountId, capabilityId, null, requestOptions); + return this.GetNestedEntity(accountId, capabilityId, options, requestOptions); } - public virtual Task GetAsync(string accountId, string capabilityId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string accountId, string capabilityId, CapabilityGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(accountId, capabilityId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(accountId, capabilityId, options, requestOptions, cancellationToken); } public virtual StripeList List(string accountId, CapabilityListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Cards/CardGetOptions.cs b/src/Stripe.net/Services/Cards/CardGetOptions.cs new file mode 100644 index 0000000000..e1efc2de81 --- /dev/null +++ b/src/Stripe.net/Services/Cards/CardGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CardGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Cards/CardService.cs b/src/Stripe.net/Services/Cards/CardService.cs index 3a96ba388e..45ce54c93b 100644 --- a/src/Stripe.net/Services/Cards/CardService.cs +++ b/src/Stripe.net/Services/Cards/CardService.cs @@ -8,7 +8,7 @@ public class CardService : ServiceNested, INestedCreatable, INestedDeletable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public CardService() @@ -47,14 +47,14 @@ public virtual Card Delete(string customerId, string cardId, RequestOptions requ return this.DeleteNestedEntityAsync(customerId, cardId, null, requestOptions, cancellationToken); } - public virtual Card Get(string customerId, string cardId, RequestOptions requestOptions = null) + public virtual Card Get(string customerId, string cardId, CardGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(customerId, cardId, null, requestOptions); + return this.GetNestedEntity(customerId, cardId, options, requestOptions); } - public virtual Task GetAsync(string customerId, string cardId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string customerId, string cardId, CardGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(customerId, cardId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(customerId, cardId, options, requestOptions, cancellationToken); } public virtual StripeList List(string customerId, CardListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Charges/ChargeGetOptions.cs b/src/Stripe.net/Services/Charges/ChargeGetOptions.cs new file mode 100644 index 0000000000..d57b7295b6 --- /dev/null +++ b/src/Stripe.net/Services/Charges/ChargeGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ChargeGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Charges/ChargeService.cs b/src/Stripe.net/Services/Charges/ChargeService.cs index 9305f63010..e5aa6325cf 100644 --- a/src/Stripe.net/Services/Charges/ChargeService.cs +++ b/src/Stripe.net/Services/Charges/ChargeService.cs @@ -8,7 +8,7 @@ namespace Stripe public class ChargeService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public ChargeService() @@ -69,14 +69,14 @@ public virtual Charge Create(ChargeCreateOptions options, RequestOptions request return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Charge Get(string chargeId, RequestOptions requestOptions = null) + public virtual Charge Get(string chargeId, ChargeGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(chargeId, null, requestOptions); + return this.GetEntity(chargeId, options, requestOptions); } - public virtual Task GetAsync(string chargeId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string chargeId, ChargeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(chargeId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(chargeId, options, requestOptions, cancellationToken); } public virtual StripeList List(ChargeListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Checkout/SessionGetOptions.cs b/src/Stripe.net/Services/Checkout/SessionGetOptions.cs new file mode 100644 index 0000000000..c0ad566a63 --- /dev/null +++ b/src/Stripe.net/Services/Checkout/SessionGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Checkout +{ + public class SessionGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Checkout/SessionService.cs b/src/Stripe.net/Services/Checkout/SessionService.cs index e61d7b4148..a8a7b4dd81 100644 --- a/src/Stripe.net/Services/Checkout/SessionService.cs +++ b/src/Stripe.net/Services/Checkout/SessionService.cs @@ -31,14 +31,14 @@ public virtual Session Create(SessionCreateOptions options, RequestOptions reque return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Session Get(string sessionId, RequestOptions requestOptions = null) + public virtual Session Get(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(sessionId, null, requestOptions); + return this.GetEntity(sessionId, options, requestOptions); } - public virtual Task GetAsync(string sessionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string sessionId, SessionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(sessionId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(sessionId, options, requestOptions, cancellationToken); } } } diff --git a/src/Stripe.net/Services/CountrySpecs/CountrySpecGetOptions.cs b/src/Stripe.net/Services/CountrySpecs/CountrySpecGetOptions.cs new file mode 100644 index 0000000000..501d66f9e1 --- /dev/null +++ b/src/Stripe.net/Services/CountrySpecs/CountrySpecGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CountrySpecGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs b/src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs index 2bc0ed5f80..22d5eadf51 100644 --- a/src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs +++ b/src/Stripe.net/Services/CountrySpecs/CountrySpecService.cs @@ -6,7 +6,7 @@ namespace Stripe public class CountrySpecService : Service, IListable, - IRetrievable + IRetrievable { public CountrySpecService() : base(null) @@ -20,14 +20,14 @@ public CountrySpecService(IStripeClient client) public override string BasePath => "/v1/country_specs"; - public virtual CountrySpec Get(string country, RequestOptions requestOptions = null) + public virtual CountrySpec Get(string country, CountrySpecGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(country, null, requestOptions); + return this.GetEntity(country, options, requestOptions); } - public virtual Task GetAsync(string country, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string country, CountrySpecGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(country, null, requestOptions, cancellationToken); + return this.GetEntityAsync(country, options, requestOptions, cancellationToken); } public virtual StripeList List(CountrySpecListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Coupons/CouponGetOptions.cs b/src/Stripe.net/Services/Coupons/CouponGetOptions.cs new file mode 100644 index 0000000000..a3ec4964c7 --- /dev/null +++ b/src/Stripe.net/Services/Coupons/CouponGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CouponGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Coupons/CouponService.cs b/src/Stripe.net/Services/Coupons/CouponService.cs index f0af757265..1bc36e2052 100644 --- a/src/Stripe.net/Services/Coupons/CouponService.cs +++ b/src/Stripe.net/Services/Coupons/CouponService.cs @@ -8,7 +8,7 @@ public class CouponService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public CouponService() @@ -43,14 +43,14 @@ public virtual Coupon Delete(string couponId, RequestOptions requestOptions = nu return this.DeleteEntityAsync(couponId, null, requestOptions, cancellationToken); } - public virtual Coupon Get(string couponId, RequestOptions requestOptions = null) + public virtual Coupon Get(string couponId, CouponGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(couponId, null, requestOptions); + return this.GetEntity(couponId, options, requestOptions); } - public virtual Task GetAsync(string couponId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string couponId, CouponGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(couponId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(couponId, options, requestOptions, cancellationToken); } public virtual StripeList List(CouponListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs index 5c30fe9609..ef169ae476 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteCreateOptions.cs @@ -1,9 +1,7 @@ namespace Stripe { - using System; using System.Collections.Generic; using Newtonsoft.Json; - using Stripe.Infrastructure; public class CreditNoteCreateOptions : BaseOptions { diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteGetOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteGetOptions.cs new file mode 100644 index 0000000000..b5b7554610 --- /dev/null +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CreditNoteGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs index dede1506fa..b09ef7602f 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteListOptions.cs @@ -1,6 +1,5 @@ namespace Stripe { - using System; using Newtonsoft.Json; public class CreditNoteListOptions : ListOptions diff --git a/src/Stripe.net/Services/CreditNotes/CreditNoteService.cs b/src/Stripe.net/Services/CreditNotes/CreditNoteService.cs index 73370f9c1f..8b438af82a 100644 --- a/src/Stripe.net/Services/CreditNotes/CreditNoteService.cs +++ b/src/Stripe.net/Services/CreditNotes/CreditNoteService.cs @@ -8,7 +8,7 @@ namespace Stripe public class CreditNoteService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public CreditNoteService() @@ -33,14 +33,14 @@ public virtual CreditNote Create(CreditNoteCreateOptions options, RequestOptions return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual CreditNote Get(string creditNoteId, RequestOptions requestOptions = null) + public virtual CreditNote Get(string creditNoteId, CreditNoteGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(creditNoteId, null, requestOptions); + return this.GetEntity(creditNoteId, options, requestOptions); } - public virtual Task GetAsync(string creditNoteId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string creditNoteId, CreditNoteGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(creditNoteId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(creditNoteId, options, requestOptions, cancellationToken); } public virtual StripeList List(CreditNoteListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Customers/CustomerGetOptions.cs b/src/Stripe.net/Services/Customers/CustomerGetOptions.cs new file mode 100644 index 0000000000..4a8e4746dd --- /dev/null +++ b/src/Stripe.net/Services/Customers/CustomerGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class CustomerGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Customers/CustomerService.cs b/src/Stripe.net/Services/Customers/CustomerService.cs index d30b1ea1dc..88f32e7b90 100644 --- a/src/Stripe.net/Services/Customers/CustomerService.cs +++ b/src/Stripe.net/Services/Customers/CustomerService.cs @@ -8,7 +8,7 @@ public class CustomerService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public CustomerService() @@ -47,14 +47,14 @@ public virtual Customer Delete(string customerId, RequestOptions requestOptions return this.DeleteEntityAsync(customerId, null, requestOptions, cancellationToken); } - public virtual Customer Get(string customerId, RequestOptions requestOptions = null) + public virtual Customer Get(string customerId, CustomerGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(customerId, null, requestOptions); + return this.GetEntity(customerId, options, requestOptions); } - public virtual Task GetAsync(string customerId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string customerId, CustomerGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(customerId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(customerId, options, requestOptions, cancellationToken); } public virtual StripeList List(CustomerListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Disputes/DisputeGetOptions.cs b/src/Stripe.net/Services/Disputes/DisputeGetOptions.cs new file mode 100644 index 0000000000..342a442b49 --- /dev/null +++ b/src/Stripe.net/Services/Disputes/DisputeGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class DisputeGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Disputes/DisputeService.cs b/src/Stripe.net/Services/Disputes/DisputeService.cs index 295088044c..6a0956e444 100644 --- a/src/Stripe.net/Services/Disputes/DisputeService.cs +++ b/src/Stripe.net/Services/Disputes/DisputeService.cs @@ -7,7 +7,7 @@ namespace Stripe public class DisputeService : Service, IListable, - IRetrievable, + IRetrievable, IUpdatable { public DisputeService() @@ -34,14 +34,14 @@ public virtual Dispute Close(string disputeId, RequestOptions requestOptions = n return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(disputeId)}/close", null, requestOptions, cancellationToken); } - public virtual Dispute Get(string disputeId, RequestOptions requestOptions = null) + public virtual Dispute Get(string disputeId, DisputeGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(disputeId, null, requestOptions); + return this.GetEntity(disputeId, options, requestOptions); } - public virtual Task GetAsync(string disputeId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string disputeId, DisputeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(disputeId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(disputeId, options, requestOptions, cancellationToken); } public virtual StripeList List(DisputeListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Events/EventGetOptions.cs b/src/Stripe.net/Services/Events/EventGetOptions.cs new file mode 100644 index 0000000000..57b5b19cea --- /dev/null +++ b/src/Stripe.net/Services/Events/EventGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class EventGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Events/EventService.cs b/src/Stripe.net/Services/Events/EventService.cs index 7d1e6b0082..c8f72c094d 100644 --- a/src/Stripe.net/Services/Events/EventService.cs +++ b/src/Stripe.net/Services/Events/EventService.cs @@ -6,7 +6,7 @@ namespace Stripe public class EventService : Service, IListable, - IRetrievable + IRetrievable { public EventService() : base(null) @@ -20,14 +20,14 @@ public EventService(IStripeClient client) public override string BasePath => "/v1/events"; - public virtual Event Get(string eventId, RequestOptions requestOptions = null) + public virtual Event Get(string eventId, EventGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(eventId, null, requestOptions); + return this.GetEntity(eventId, options, requestOptions); } - public virtual Task GetAsync(string eventId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string eventId, EventGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(eventId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(eventId, options, requestOptions, cancellationToken); } public virtual StripeList List(EventListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/ExchangeRates/ExchangeRateGetOptions.cs b/src/Stripe.net/Services/ExchangeRates/ExchangeRateGetOptions.cs new file mode 100644 index 0000000000..6b8a0a7a00 --- /dev/null +++ b/src/Stripe.net/Services/ExchangeRates/ExchangeRateGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ExchangeRateGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/ExchangeRates/ExchangeRateListOptions.cs b/src/Stripe.net/Services/ExchangeRates/ExchangeRateListOptions.cs index 7069a616e0..211055a217 100644 --- a/src/Stripe.net/Services/ExchangeRates/ExchangeRateListOptions.cs +++ b/src/Stripe.net/Services/ExchangeRates/ExchangeRateListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class ExchangeRateListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/ExchangeRates/ExchangeRateService.cs b/src/Stripe.net/Services/ExchangeRates/ExchangeRateService.cs index ef319b11cd..5d2d7e9fbb 100644 --- a/src/Stripe.net/Services/ExchangeRates/ExchangeRateService.cs +++ b/src/Stripe.net/Services/ExchangeRates/ExchangeRateService.cs @@ -6,7 +6,7 @@ namespace Stripe public class ExchangeRateService : Service, IListable, - IRetrievable + IRetrievable { public ExchangeRateService() : base(null) @@ -20,14 +20,14 @@ public ExchangeRateService(IStripeClient client) public override string BasePath => "/v1/exchange_rates"; - public virtual ExchangeRate Get(string currency, RequestOptions requestOptions = null) + public virtual ExchangeRate Get(string currency, ExchangeRateGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(currency, null, requestOptions); + return this.GetEntity(currency, options, requestOptions); } - public virtual Task GetAsync(string currency, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string currency, ExchangeRateGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(currency, null, requestOptions, cancellationToken); + return this.GetEntityAsync(currency, options, requestOptions, cancellationToken); } public virtual StripeList List(ExchangeRateListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountGetOptions.cs b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountGetOptions.cs new file mode 100644 index 0000000000..228650cd26 --- /dev/null +++ b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ExternalAccountGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountListOptions.cs b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountListOptions.cs index fe2f6c5a32..112882ec06 100644 --- a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountListOptions.cs +++ b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class ExternalAccountListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountService.cs b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountService.cs index d257fefde3..26a94bdcbe 100644 --- a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountService.cs +++ b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountService.cs @@ -8,7 +8,7 @@ public class ExternalAccountService : ServiceNested, INestedCreatable, INestedDeletable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public ExternalAccountService() @@ -43,14 +43,14 @@ public virtual IExternalAccount Delete(string accountId, string externalAccountI return this.DeleteNestedEntityAsync(accountId, externalAccountId, null, requestOptions, cancellationToken); } - public virtual IExternalAccount Get(string accountId, string externalAccountId, RequestOptions requestOptions = null) + public virtual IExternalAccount Get(string accountId, string externalAccountId, ExternalAccountGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(accountId, externalAccountId, null, requestOptions); + return this.GetNestedEntity(accountId, externalAccountId, options, requestOptions); } - public virtual Task GetAsync(string accountId, string externalAccountId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string accountId, string externalAccountId, ExternalAccountGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(accountId, externalAccountId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(accountId, externalAccountId, options, requestOptions, cancellationToken); } public virtual StripeList List(string accountId, ExternalAccountListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/FileLinks/FileLinkGetOptions.cs b/src/Stripe.net/Services/FileLinks/FileLinkGetOptions.cs new file mode 100644 index 0000000000..fc86da4404 --- /dev/null +++ b/src/Stripe.net/Services/FileLinks/FileLinkGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class FileLinkGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/FileLinks/FileLinkService.cs b/src/Stripe.net/Services/FileLinks/FileLinkService.cs index 4df620acb8..3ba131ca75 100644 --- a/src/Stripe.net/Services/FileLinks/FileLinkService.cs +++ b/src/Stripe.net/Services/FileLinks/FileLinkService.cs @@ -7,7 +7,7 @@ namespace Stripe public class FileLinkService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public FileLinkService() @@ -32,14 +32,14 @@ public virtual FileLink Create(FileLinkCreateOptions options, RequestOptions req return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual FileLink Get(string fileLinkId, RequestOptions requestOptions = null) + public virtual FileLink Get(string fileLinkId, FileLinkGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(fileLinkId, null, requestOptions); + return this.GetEntity(fileLinkId, options, requestOptions); } - public virtual Task GetAsync(string fileLinkId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string fileLinkId, FileLinkGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(fileLinkId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(fileLinkId, options, requestOptions, cancellationToken); } public virtual StripeList List(FileLinkListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Files/FileGetOptions.cs b/src/Stripe.net/Services/Files/FileGetOptions.cs new file mode 100644 index 0000000000..48d17114c1 --- /dev/null +++ b/src/Stripe.net/Services/Files/FileGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class FileGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Files/FileService.cs b/src/Stripe.net/Services/Files/FileService.cs index 1e7429c877..3ceaa0d5a2 100644 --- a/src/Stripe.net/Services/Files/FileService.cs +++ b/src/Stripe.net/Services/Files/FileService.cs @@ -7,7 +7,7 @@ namespace Stripe public class FileService : Service, ICreatable, IListable, - IRetrievable + IRetrievable { public FileService() : base(null) @@ -35,14 +35,14 @@ public virtual File Create(FileCreateOptions options, RequestOptions requestOpti return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual File Get(string fileId, RequestOptions requestOptions = null) + public virtual File Get(string fileId, FileGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(fileId, null, requestOptions); + return this.GetEntity(fileId, options, requestOptions); } - public virtual Task GetAsync(string fileId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string fileId, FileGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(fileId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(fileId, options, requestOptions, cancellationToken); } public virtual StripeList List(FileListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemGetOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemGetOptions.cs new file mode 100644 index 0000000000..8d33e15504 --- /dev/null +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class InvoiceItemGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs index d57fdef3c0..fde050c899 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemService.cs @@ -8,7 +8,7 @@ public class InvoiceItemService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public InvoiceItemService() @@ -49,14 +49,14 @@ public virtual InvoiceItem Delete(string invoiceitemId, RequestOptions requestOp return this.DeleteEntityAsync(invoiceitemId, null, requestOptions, cancellationToken); } - public virtual InvoiceItem Get(string invoiceitemId, RequestOptions requestOptions = null) + public virtual InvoiceItem Get(string invoiceitemId, InvoiceItemGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(invoiceitemId, null, requestOptions); + return this.GetEntity(invoiceitemId, options, requestOptions); } - public virtual Task GetAsync(string invoiceitemId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string invoiceitemId, InvoiceItemGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(invoiceitemId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(invoiceitemId, options, requestOptions, cancellationToken); } public virtual StripeList List(InvoiceItemListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Invoices/InvoiceGetOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceGetOptions.cs new file mode 100644 index 0000000000..651adef057 --- /dev/null +++ b/src/Stripe.net/Services/Invoices/InvoiceGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class InvoiceGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Invoices/InvoiceService.cs b/src/Stripe.net/Services/Invoices/InvoiceService.cs index 9c117346c4..f6fc94f7d5 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceService.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceService.cs @@ -8,7 +8,7 @@ namespace Stripe public class InvoiceService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public InvoiceService() @@ -61,14 +61,14 @@ public virtual Invoice FinalizeInvoice(string invoiceId, InvoiceFinalizeOptions return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(invoiceId)}/finalize", options, requestOptions, cancellationToken); } - public virtual Invoice Get(string invoiceId, RequestOptions requestOptions = null) + public virtual Invoice Get(string invoiceId, InvoiceGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(invoiceId, null, requestOptions); + return this.GetEntity(invoiceId, options, requestOptions); } - public virtual Task GetAsync(string invoiceId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string invoiceId, InvoiceGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(invoiceId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(invoiceId, options, requestOptions, cancellationToken); } public virtual StripeList List(InvoiceListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationGetOptions.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationGetOptions.cs new file mode 100644 index 0000000000..a85dd9c2c1 --- /dev/null +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Issuing +{ + public class AuthorizationGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationService.cs b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationService.cs index fde602119d..1fb2be1730 100644 --- a/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationService.cs +++ b/src/Stripe.net/Services/Issuing/Authorizations/AuthorizationService.cs @@ -7,7 +7,7 @@ namespace Stripe.Issuing public class AuthorizationService : Service, IListable, - IRetrievable, + IRetrievable, IUpdatable { public AuthorizationService() @@ -42,14 +42,14 @@ public virtual Authorization Decline(string authorizationId, AuthorizationDeclin return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(authorizationId)}/decline", options, requestOptions, cancellationToken); } - public virtual Authorization Get(string authorizationId, RequestOptions requestOptions = null) + public virtual Authorization Get(string authorizationId, AuthorizationGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(authorizationId, null, requestOptions); + return this.GetEntity(authorizationId, options, requestOptions); } - public virtual Task GetAsync(string authorizationId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string authorizationId, AuthorizationGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(authorizationId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(authorizationId, options, requestOptions, cancellationToken); } public virtual StripeList List(AuthorizationListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderGetOptions.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderGetOptions.cs new file mode 100644 index 0000000000..66df75fe08 --- /dev/null +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Issuing +{ + public class CardholderGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Issuing/Cardholders/CardholderService.cs b/src/Stripe.net/Services/Issuing/Cardholders/CardholderService.cs index 5eb9b1f20d..6cc8ee85f7 100644 --- a/src/Stripe.net/Services/Issuing/Cardholders/CardholderService.cs +++ b/src/Stripe.net/Services/Issuing/Cardholders/CardholderService.cs @@ -7,7 +7,7 @@ namespace Stripe.Issuing public class CardholderService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public CardholderService() @@ -32,14 +32,14 @@ public virtual Cardholder Create(CardholderCreateOptions options, RequestOptions return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Cardholder Get(string cardholderId, RequestOptions requestOptions = null) + public virtual Cardholder Get(string cardholderId, CardholderGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(cardholderId, null, requestOptions); + return this.GetEntity(cardholderId, options, requestOptions); } - public virtual Task GetAsync(string cardholderId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string cardholderId, CardholderGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(cardholderId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(cardholderId, options, requestOptions, cancellationToken); } public virtual StripeList List(CardholderListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Issuing/Cards/CardGetOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardGetOptions.cs new file mode 100644 index 0000000000..95ad738a77 --- /dev/null +++ b/src/Stripe.net/Services/Issuing/Cards/CardGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Issuing +{ + public class CardGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Issuing/Cards/CardService.cs b/src/Stripe.net/Services/Issuing/Cards/CardService.cs index 79e357e1c7..e17e8da6e2 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardService.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardService.cs @@ -8,7 +8,7 @@ namespace Stripe.Issuing public class CardService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public CardService() @@ -43,14 +43,14 @@ public virtual CardDetails Details(string cardId, RequestOptions requestOptions return this.RequestAsync(HttpMethod.Get, $"{this.InstanceUrl(cardId)}/details", null, requestOptions, cancellationToken); } - public virtual Card Get(string cardId, RequestOptions requestOptions = null) + public virtual Card Get(string cardId, CardGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(cardId, null, requestOptions); + return this.GetEntity(cardId, options, requestOptions); } - public virtual Task GetAsync(string cardId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string cardId, CardGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(cardId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(cardId, options, requestOptions, cancellationToken); } public virtual StripeList List(CardListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeGetOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeGetOptions.cs new file mode 100644 index 0000000000..fd94ccd1ae --- /dev/null +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Issuing +{ + public class DisputeGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeService.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeService.cs index 009612b449..893691d90a 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeService.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeService.cs @@ -7,7 +7,7 @@ namespace Stripe.Issuing public class DisputeService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public DisputeService() @@ -32,14 +32,14 @@ public virtual Dispute Create(DisputeCreateOptions options, RequestOptions reque return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Dispute Get(string disputeId, RequestOptions requestOptions = null) + public virtual Dispute Get(string disputeId, DisputeGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(disputeId, null, requestOptions); + return this.GetEntity(disputeId, options, requestOptions); } - public virtual Task GetAsync(string disputeId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string disputeId, DisputeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(disputeId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(disputeId, options, requestOptions, cancellationToken); } public virtual StripeList List(DisputeListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Issuing/Transactions/TransactionGetOptions.cs b/src/Stripe.net/Services/Issuing/Transactions/TransactionGetOptions.cs new file mode 100644 index 0000000000..abbd0ba542 --- /dev/null +++ b/src/Stripe.net/Services/Issuing/Transactions/TransactionGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Issuing +{ + public class TransactionGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Issuing/Transactions/TransactionService.cs b/src/Stripe.net/Services/Issuing/Transactions/TransactionService.cs index fb9b33ba49..ea9074209c 100644 --- a/src/Stripe.net/Services/Issuing/Transactions/TransactionService.cs +++ b/src/Stripe.net/Services/Issuing/Transactions/TransactionService.cs @@ -6,7 +6,7 @@ namespace Stripe.Issuing public class TransactionService : Service, IListable, - IRetrievable, + IRetrievable, IUpdatable { public TransactionService() @@ -21,14 +21,14 @@ public TransactionService(IStripeClient client) public override string BasePath => "/v1/issuing/transactions"; - public virtual Transaction Get(string transactionId, RequestOptions requestOptions = null) + public virtual Transaction Get(string transactionId, TransactionGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(transactionId, null, requestOptions); + return this.GetEntity(transactionId, options, requestOptions); } - public virtual Task GetAsync(string transactionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string transactionId, TransactionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(transactionId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(transactionId, options, requestOptions, cancellationToken); } public virtual StripeList List(TransactionListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Orders/OrderGetOptions.cs b/src/Stripe.net/Services/Orders/OrderGetOptions.cs new file mode 100644 index 0000000000..b7b35d6e8d --- /dev/null +++ b/src/Stripe.net/Services/Orders/OrderGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class OrderGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Orders/OrderService.cs b/src/Stripe.net/Services/Orders/OrderService.cs index c3fb82ece1..43342264e2 100644 --- a/src/Stripe.net/Services/Orders/OrderService.cs +++ b/src/Stripe.net/Services/Orders/OrderService.cs @@ -8,7 +8,7 @@ namespace Stripe public class OrderService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public OrderService() @@ -37,14 +37,14 @@ public virtual Order Create(OrderCreateOptions options, RequestOptions requestOp return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Order Get(string orderId, RequestOptions requestOptions = null) + public virtual Order Get(string orderId, OrderGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(orderId, null, requestOptions); + return this.GetEntity(orderId, options, requestOptions); } - public virtual Task GetAsync(string orderId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string orderId, OrderGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(orderId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(orderId, options, requestOptions, cancellationToken); } public virtual StripeList List(OrderListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs index c204b14a17..990ae7e519 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentGetOptions.cs @@ -1,6 +1,5 @@ namespace Stripe { - using System.Collections.Generic; using Newtonsoft.Json; public class PaymentIntentGetOptions : BaseOptions diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs index 6644a31a6f..8e3c2a6015 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentListOptions.cs @@ -1,8 +1,6 @@ namespace Stripe { - using System; using Newtonsoft.Json; - using Stripe.Infrastructure; public class PaymentIntentListOptions : ListOptionsWithCreated { diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs index bc9e44a8fe..bd4c9cc0b6 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentService.cs @@ -8,7 +8,7 @@ namespace Stripe public class PaymentIntentService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public PaymentIntentService() @@ -75,22 +75,12 @@ public virtual PaymentIntent Create(PaymentIntentCreateOptions options, RequestO return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual PaymentIntent Get(string paymentIntentId, RequestOptions requestOptions = null) - { - return this.Get(paymentIntentId, null, requestOptions); - } - - public virtual Task GetAsync(string paymentIntentId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) - { - return this.GetAsync(paymentIntentId, null, requestOptions, cancellationToken); - } - - public virtual PaymentIntent Get(string paymentIntentId, PaymentIntentGetOptions options, RequestOptions requestOptions = null) + public virtual PaymentIntent Get(string paymentIntentId, PaymentIntentGetOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(paymentIntentId, options, requestOptions); } - public virtual Task GetAsync(string paymentIntentId, PaymentIntentGetOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string paymentIntentId, PaymentIntentGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { return this.GetEntityAsync(paymentIntentId, options, requestOptions, cancellationToken); } diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodGetOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodGetOptions.cs new file mode 100644 index 0000000000..cb3a68cd19 --- /dev/null +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class PaymentMethodGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs index 1d52d242ef..50c147c96f 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodListOptions.cs @@ -1,6 +1,5 @@ namespace Stripe { - using System; using Newtonsoft.Json; public class PaymentMethodListOptions : ListOptions diff --git a/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs b/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs index 0bfa146846..8fbf1dcc23 100644 --- a/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs +++ b/src/Stripe.net/Services/PaymentMethods/PaymentMethodService.cs @@ -8,7 +8,7 @@ namespace Stripe public class PaymentMethodService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public PaymentMethodService() @@ -55,14 +55,14 @@ public virtual PaymentMethod Detach(string paymentMethodId, PaymentMethodDetachO return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(paymentMethodId)}/detach", options, requestOptions, cancellationToken); } - public virtual PaymentMethod Get(string paymentMethodId, RequestOptions requestOptions = null) + public virtual PaymentMethod Get(string paymentMethodId, PaymentMethodGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(paymentMethodId, null, requestOptions); + return this.GetEntity(paymentMethodId, options, requestOptions); } - public virtual Task GetAsync(string paymentMethodId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string paymentMethodId, PaymentMethodGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(paymentMethodId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(paymentMethodId, options, requestOptions, cancellationToken); } public virtual StripeList List(PaymentMethodListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Payouts/PayoutGetOptions.cs b/src/Stripe.net/Services/Payouts/PayoutGetOptions.cs new file mode 100644 index 0000000000..2683251509 --- /dev/null +++ b/src/Stripe.net/Services/Payouts/PayoutGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class PayoutGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Payouts/PayoutService.cs b/src/Stripe.net/Services/Payouts/PayoutService.cs index ec33403a33..9ed6a95278 100644 --- a/src/Stripe.net/Services/Payouts/PayoutService.cs +++ b/src/Stripe.net/Services/Payouts/PayoutService.cs @@ -8,7 +8,7 @@ namespace Stripe public class PayoutService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public PayoutService() @@ -49,14 +49,14 @@ public virtual Payout Create(PayoutCreateOptions options, RequestOptions request return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Payout Get(string payoutId, RequestOptions requestOptions = null) + public virtual Payout Get(string payoutId, PayoutGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(payoutId, null, requestOptions); + return this.GetEntity(payoutId, options, requestOptions); } - public virtual Task GetAsync(string payoutId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string payoutId, PayoutGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(payoutId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(payoutId, options, requestOptions, cancellationToken); } public virtual StripeList List(PayoutListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Persons/PersonGetOptions.cs b/src/Stripe.net/Services/Persons/PersonGetOptions.cs new file mode 100644 index 0000000000..bd9068e572 --- /dev/null +++ b/src/Stripe.net/Services/Persons/PersonGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class PersonGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Persons/PersonService.cs b/src/Stripe.net/Services/Persons/PersonService.cs index 5e4a15fb84..2557e74a21 100644 --- a/src/Stripe.net/Services/Persons/PersonService.cs +++ b/src/Stripe.net/Services/Persons/PersonService.cs @@ -7,7 +7,7 @@ namespace Stripe public class PersonService : ServiceNested, INestedCreatable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public PersonService() @@ -46,14 +46,14 @@ public virtual Person Delete(string accountId, string personId, RequestOptions r return this.DeleteNestedEntityAsync(accountId, personId, null, requestOptions, cancellationToken); } - public virtual Person Get(string accountId, string personId, RequestOptions requestOptions = null) + public virtual Person Get(string accountId, string personId, PersonGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(accountId, personId, null, requestOptions); + return this.GetNestedEntity(accountId, personId, options, requestOptions); } - public virtual Task GetAsync(string accountId, string personId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string accountId, string personId, PersonGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(accountId, personId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(accountId, personId, options, requestOptions, cancellationToken); } public virtual StripeList List(string accountId, PersonListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Plans/PlanGetOptions.cs b/src/Stripe.net/Services/Plans/PlanGetOptions.cs new file mode 100644 index 0000000000..2b8ba4930f --- /dev/null +++ b/src/Stripe.net/Services/Plans/PlanGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class PlanGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Plans/PlanService.cs b/src/Stripe.net/Services/Plans/PlanService.cs index 5c9e64d149..f7da0c9480 100644 --- a/src/Stripe.net/Services/Plans/PlanService.cs +++ b/src/Stripe.net/Services/Plans/PlanService.cs @@ -8,7 +8,7 @@ public class PlanService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public PlanService() @@ -45,14 +45,14 @@ public virtual Plan Delete(string planId, RequestOptions requestOptions = null) return this.DeleteEntityAsync(planId, null, requestOptions, cancellationToken); } - public virtual Plan Get(string planId, RequestOptions requestOptions = null) + public virtual Plan Get(string planId, PlanGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(planId, null, requestOptions); + return this.GetEntity(planId, options, requestOptions); } - public virtual Task GetAsync(string planId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string planId, PlanGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(planId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(planId, options, requestOptions, cancellationToken); } public virtual StripeList List(PlanListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Products/ProductGetOptions.cs b/src/Stripe.net/Services/Products/ProductGetOptions.cs new file mode 100644 index 0000000000..2ca655e601 --- /dev/null +++ b/src/Stripe.net/Services/Products/ProductGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ProductGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Products/ProductService.cs b/src/Stripe.net/Services/Products/ProductService.cs index fc1b0ce8e5..fa76e6d3bc 100644 --- a/src/Stripe.net/Services/Products/ProductService.cs +++ b/src/Stripe.net/Services/Products/ProductService.cs @@ -8,7 +8,7 @@ public class ProductService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public ProductService() @@ -43,14 +43,14 @@ public virtual Product Delete(string productId, RequestOptions requestOptions = return this.DeleteEntityAsync(productId, null, requestOptions, cancellationToken); } - public virtual Product Get(string productId, RequestOptions requestOptions = null) + public virtual Product Get(string productId, ProductGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(productId, null, requestOptions); + return this.GetEntity(productId, options, requestOptions); } - public virtual Task GetAsync(string productId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string productId, ProductGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(productId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(productId, options, requestOptions, cancellationToken); } public virtual StripeList List(ProductListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningGetOptions.cs b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningGetOptions.cs new file mode 100644 index 0000000000..16f36be0ac --- /dev/null +++ b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Radar +{ + public class EarlyFraudWarningGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningService.cs b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningService.cs index 6b369662e3..45296ca66d 100644 --- a/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningService.cs +++ b/src/Stripe.net/Services/Radar/EarlyFraudWarnings/EarlyFraudWarningService.cs @@ -6,7 +6,7 @@ namespace Stripe.Radar public class EarlyFraudWarningService : Service, IListable, - IRetrievable + IRetrievable { public EarlyFraudWarningService() : base(null) @@ -20,14 +20,14 @@ public EarlyFraudWarningService(IStripeClient client) public override string BasePath => "/v1/radar/early_fraud_warnings"; - public virtual EarlyFraudWarning Get(string earlyFraudWarningId, RequestOptions requestOptions = null) + public virtual EarlyFraudWarning Get(string earlyFraudWarningId, EarlyFraudWarningGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(earlyFraudWarningId, null, requestOptions); + return this.GetEntity(earlyFraudWarningId, options, requestOptions); } - public virtual Task GetAsync(string earlyFraudWarningId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string earlyFraudWarningId, EarlyFraudWarningGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(earlyFraudWarningId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(earlyFraudWarningId, options, requestOptions, cancellationToken); } public virtual StripeList List(EarlyFraudWarningListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemGetOptions.cs b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemGetOptions.cs new file mode 100644 index 0000000000..4506ebfbd8 --- /dev/null +++ b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Radar +{ + public class ValueListItemGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemService.cs b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemService.cs index fdb07075fc..0808fea662 100644 --- a/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemService.cs +++ b/src/Stripe.net/Services/Radar/ValueListItems/ValueListItemService.cs @@ -7,7 +7,7 @@ namespace Stripe.Radar public class ValueListItemService : Service, ICreatable, IListable, - IRetrievable + IRetrievable { public ValueListItemService() : base(null) @@ -41,14 +41,14 @@ public virtual ValueListItem Delete(string valueListItemId, RequestOptions reque return this.DeleteEntityAsync(valueListItemId, null, requestOptions, cancellationToken); } - public virtual ValueListItem Get(string valueListItemId, RequestOptions requestOptions = null) + public virtual ValueListItem Get(string valueListItemId, ValueListItemGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(valueListItemId, null, requestOptions); + return this.GetEntity(valueListItemId, options, requestOptions); } - public virtual Task GetAsync(string valueListItemId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string valueListItemId, ValueListItemGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(valueListItemId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(valueListItemId, options, requestOptions, cancellationToken); } public virtual StripeList List(ValueListItemListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Radar/ValueLists/ValueListGetOptions.cs b/src/Stripe.net/Services/Radar/ValueLists/ValueListGetOptions.cs new file mode 100644 index 0000000000..3da5b025ce --- /dev/null +++ b/src/Stripe.net/Services/Radar/ValueLists/ValueListGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Radar +{ + public class ValueListGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Radar/ValueLists/ValueListService.cs b/src/Stripe.net/Services/Radar/ValueLists/ValueListService.cs index 7f75e24470..4f5b0785d5 100644 --- a/src/Stripe.net/Services/Radar/ValueLists/ValueListService.cs +++ b/src/Stripe.net/Services/Radar/ValueLists/ValueListService.cs @@ -7,7 +7,7 @@ namespace Stripe.Radar public class ValueListService : Service, ICreatable, IListable, - IRetrievable + IRetrievable { public ValueListService() : base(null) @@ -41,14 +41,14 @@ public virtual ValueList Delete(string valueListId, RequestOptions requestOption return this.DeleteEntityAsync(valueListId, null, requestOptions, cancellationToken); } - public virtual ValueList Get(string valueListId, RequestOptions requestOptions = null) + public virtual ValueList Get(string valueListId, ValueListGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(valueListId, null, requestOptions); + return this.GetEntity(valueListId, options, requestOptions); } - public virtual Task GetAsync(string valueListId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string valueListId, ValueListGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(valueListId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(valueListId, options, requestOptions, cancellationToken); } public virtual StripeList List(ValueListListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Refunds/RefundGetOptions.cs b/src/Stripe.net/Services/Refunds/RefundGetOptions.cs new file mode 100644 index 0000000000..dcd4f67523 --- /dev/null +++ b/src/Stripe.net/Services/Refunds/RefundGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class RefundGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Refunds/RefundService.cs b/src/Stripe.net/Services/Refunds/RefundService.cs index 1ecb8dc8bd..880b888f0a 100644 --- a/src/Stripe.net/Services/Refunds/RefundService.cs +++ b/src/Stripe.net/Services/Refunds/RefundService.cs @@ -7,7 +7,7 @@ namespace Stripe public class RefundService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public RefundService() @@ -38,14 +38,14 @@ public virtual Refund Create(RefundCreateOptions options, RequestOptions request return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Refund Get(string refundId, RequestOptions requestOptions = null) + public virtual Refund Get(string refundId, RefundGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(refundId, null, requestOptions); + return this.GetEntity(refundId, options, requestOptions); } - public virtual Task GetAsync(string refundId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string refundId, RefundGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(refundId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(refundId, options, requestOptions, cancellationToken); } public virtual StripeList List(RefundListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunGetOptions.cs b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunGetOptions.cs new file mode 100644 index 0000000000..2accc0c6f0 --- /dev/null +++ b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Reporting +{ + public class ReportRunGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunService.cs b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunService.cs index 58ab4c0b84..6f7e51823b 100644 --- a/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunService.cs +++ b/src/Stripe.net/Services/Reporting/ReportRuns/ReportRunService.cs @@ -7,7 +7,7 @@ namespace Stripe.Reporting public class ReportRunService : Service, ICreatable, IListable, - IRetrievable + IRetrievable { public ReportRunService() : base(null) @@ -31,14 +31,14 @@ public virtual ReportRun Create(ReportRunCreateOptions options, RequestOptions r return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual ReportRun Get(string reportRunId, RequestOptions requestOptions = null) + public virtual ReportRun Get(string reportRunId, ReportRunGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(reportRunId, null, requestOptions); + return this.GetEntity(reportRunId, options, requestOptions); } - public virtual Task GetAsync(string reportRunId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string reportRunId, ReportRunGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(reportRunId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(reportRunId, options, requestOptions, cancellationToken); } public virtual StripeList List(ReportRunListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeGetOptions.cs b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeGetOptions.cs new file mode 100644 index 0000000000..f1c6e28495 --- /dev/null +++ b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Reporting +{ + public class ReportTypeGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeListOptions.cs b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeListOptions.cs index 8af3d4e31f..20e062443d 100644 --- a/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeListOptions.cs +++ b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe.Reporting { - using Newtonsoft.Json; - public class ReportTypeListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeService.cs b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeService.cs index 56e1c3d515..5721f9deb8 100644 --- a/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeService.cs +++ b/src/Stripe.net/Services/Reporting/ReportTypes/ReportTypeService.cs @@ -6,7 +6,7 @@ namespace Stripe.Reporting public class ReportTypeService : Service, IListable, - IRetrievable + IRetrievable { public ReportTypeService() : base(null) @@ -20,14 +20,14 @@ public ReportTypeService(IStripeClient client) public override string BasePath => "/v1/reporting/report_types"; - public virtual ReportType Get(string reportTypeId, RequestOptions requestOptions = null) + public virtual ReportType Get(string reportTypeId, ReportTypeGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(reportTypeId, null, requestOptions); + return this.GetEntity(reportTypeId, options, requestOptions); } - public virtual Task GetAsync(string reportTypeId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string reportTypeId, ReportTypeGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(reportTypeId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(reportTypeId, options, requestOptions, cancellationToken); } public virtual StripeList List(ReportTypeListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Reviews/ReviewGetOptions.cs b/src/Stripe.net/Services/Reviews/ReviewGetOptions.cs new file mode 100644 index 0000000000..74e2a1b9fb --- /dev/null +++ b/src/Stripe.net/Services/Reviews/ReviewGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class ReviewGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Reviews/ReviewListOptions.cs b/src/Stripe.net/Services/Reviews/ReviewListOptions.cs index 8af2fbd17a..abf4177165 100644 --- a/src/Stripe.net/Services/Reviews/ReviewListOptions.cs +++ b/src/Stripe.net/Services/Reviews/ReviewListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class ReviewListOptions : ListOptionsWithCreated { } diff --git a/src/Stripe.net/Services/Reviews/ReviewService.cs b/src/Stripe.net/Services/Reviews/ReviewService.cs index ddec42fcfb..4e77889090 100644 --- a/src/Stripe.net/Services/Reviews/ReviewService.cs +++ b/src/Stripe.net/Services/Reviews/ReviewService.cs @@ -7,7 +7,7 @@ namespace Stripe public class ReviewService : Service, IListable, - IRetrievable + IRetrievable { public ReviewService() : base(null) @@ -31,14 +31,14 @@ public virtual Review Approve(string reviewId, ReviewApproveOptions options = nu return this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(reviewId)}/approve", options, requestOptions, cancellationToken); } - public virtual Review Get(string reviewId, RequestOptions requestOptions = null) + public virtual Review Get(string reviewId, ReviewGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(reviewId, null, requestOptions); + return this.GetEntity(reviewId, options, requestOptions); } - public virtual Task GetAsync(string reviewId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string reviewId, ReviewGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(reviewId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(reviewId, options, requestOptions, cancellationToken); } public virtual StripeList List(ReviewListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunGetOptions.cs b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunGetOptions.cs new file mode 100644 index 0000000000..77dd401493 --- /dev/null +++ b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Sigma +{ + public class ScheduledQueryRunGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunListOptions.cs b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunListOptions.cs index af9b787fe8..6b4494d06f 100644 --- a/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunListOptions.cs +++ b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunListOptions.cs @@ -1,9 +1,5 @@ namespace Stripe.Sigma { - using System; - using System.Collections.Generic; - using System.Text; - public class ScheduledQueryRunListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunService.cs b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunService.cs index e0c62f4dca..c44e0fbdb7 100644 --- a/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunService.cs +++ b/src/Stripe.net/Services/Sigma/ScheduledQueryRuns/ScheduledQueryRunService.cs @@ -6,7 +6,7 @@ namespace Stripe.Sigma public class ScheduledQueryRunService : Service, IListable, - IRetrievable + IRetrievable { public ScheduledQueryRunService() : base(null) @@ -20,14 +20,14 @@ public ScheduledQueryRunService(IStripeClient client) public override string BasePath => "/v1/sigma/scheduled_query_runs"; - public virtual ScheduledQueryRun Get(string queryRunId, RequestOptions requestOptions = null) + public virtual ScheduledQueryRun Get(string queryRunId, ScheduledQueryRunGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(queryRunId, null, requestOptions); + return this.GetEntity(queryRunId, options, requestOptions); } - public virtual Task GetAsync(string queryRunId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string queryRunId, ScheduledQueryRunGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(queryRunId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(queryRunId, options, requestOptions, cancellationToken); } public virtual StripeList List(ScheduledQueryRunListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Skus/SkuGetOptions.cs b/src/Stripe.net/Services/Skus/SkuGetOptions.cs new file mode 100644 index 0000000000..65ba934cd7 --- /dev/null +++ b/src/Stripe.net/Services/Skus/SkuGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SkuGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Skus/SkuService.cs b/src/Stripe.net/Services/Skus/SkuService.cs index 0889ec7899..691f3baf74 100644 --- a/src/Stripe.net/Services/Skus/SkuService.cs +++ b/src/Stripe.net/Services/Skus/SkuService.cs @@ -8,7 +8,7 @@ public class SkuService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public SkuService() @@ -45,14 +45,14 @@ public virtual Sku Delete(string skuId, RequestOptions requestOptions = null) return this.DeleteEntityAsync(skuId, null, requestOptions, cancellationToken); } - public virtual Sku Get(string skuId, RequestOptions requestOptions = null) + public virtual Sku Get(string skuId, SkuGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(skuId, null, requestOptions); + return this.GetEntity(skuId, options, requestOptions); } - public virtual Task GetAsync(string skuId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string skuId, SkuGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(skuId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(skuId, options, requestOptions, cancellationToken); } public virtual StripeList List(SkuListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/SourceTransactions/SourceTransactionsGetOptions.cs b/src/Stripe.net/Services/SourceTransactions/SourceTransactionsGetOptions.cs new file mode 100644 index 0000000000..bd08cf859d --- /dev/null +++ b/src/Stripe.net/Services/SourceTransactions/SourceTransactionsGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SourceTransactionsGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Sources/SourceService.cs b/src/Stripe.net/Services/Sources/SourceService.cs index 4f2952be72..15207fb8f9 100644 --- a/src/Stripe.net/Services/Sources/SourceService.cs +++ b/src/Stripe.net/Services/Sources/SourceService.cs @@ -8,7 +8,7 @@ namespace Stripe public class SourceService : Service, ICreatable, - IRetrievable, + IRetrievable, IUpdatable, INestedListable { @@ -54,22 +54,12 @@ public virtual Source Detach(string customerId, string sourceId, RequestOptions return this.RequestAsync(HttpMethod.Delete, $"/v1/customers/{customerId}/sources/{sourceId}", null, requestOptions, cancellationToken); } - public virtual Source Get(string sourceId, RequestOptions requestOptions = null) - { - return this.Get(sourceId, null, requestOptions); - } - - public virtual Task GetAsync(string sourceId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) - { - return this.GetAsync(sourceId, null, requestOptions, cancellationToken); - } - - public virtual Source Get(string sourceId, SourceGetOptions options, RequestOptions requestOptions = null) + public virtual Source Get(string sourceId, SourceGetOptions options = null, RequestOptions requestOptions = null) { return this.GetEntity(sourceId, options, requestOptions); } - public virtual Task GetAsync(string sourceId, SourceGetOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string sourceId, SourceGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { return this.GetEntityAsync(sourceId, options, requestOptions, cancellationToken); } diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemGetOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemGetOptions.cs new file mode 100644 index 0000000000..8582326f7d --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SubscriptionItemGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs index 33cd5660fd..333a7837be 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemService.cs @@ -8,7 +8,7 @@ public class SubscriptionItemService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public SubscriptionItemService() @@ -43,14 +43,14 @@ public virtual SubscriptionItem Delete(string subscriptionItemId, RequestOptions return this.DeleteEntityAsync(subscriptionItemId, null, requestOptions, cancellationToken); } - public virtual SubscriptionItem Get(string subscriptionItemId, RequestOptions requestOptions = null) + public virtual SubscriptionItem Get(string subscriptionItemId, SubscriptionItemGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(subscriptionItemId, null, requestOptions); + return this.GetEntity(subscriptionItemId, options, requestOptions); } - public virtual Task GetAsync(string subscriptionItemId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string subscriptionItemId, SubscriptionItemGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(subscriptionItemId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(subscriptionItemId, options, requestOptions, cancellationToken); } public virtual StripeList List(SubscriptionItemListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionGetOptions.cs b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionGetOptions.cs new file mode 100644 index 0000000000..5817bffd5a --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SubscriptionScheduleRevisionGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionListOptions.cs b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionListOptions.cs index 387e965422..4234421643 100644 --- a/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionListOptions.cs +++ b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class SubscriptionScheduleRevisionListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionService.cs b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionService.cs index ea132def23..0b3b50855f 100644 --- a/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionService.cs +++ b/src/Stripe.net/Services/SubscriptionScheduleRevisions/SubscriptionScheduleRevisionService.cs @@ -6,7 +6,7 @@ namespace Stripe public class SubscriptionScheduleRevisionService : ServiceNested, INestedListable, - INestedRetrievable + INestedRetrievable { public SubscriptionScheduleRevisionService() : base(null) @@ -20,14 +20,14 @@ public SubscriptionScheduleRevisionService(IStripeClient client) public override string BasePath => "/v1/subscription_schedules/{PARENT_ID}/revisions"; - public virtual SubscriptionScheduleRevision Get(string scheduleId, string revisionId, RequestOptions requestOptions = null) + public virtual SubscriptionScheduleRevision Get(string scheduleId, string revisionId, SubscriptionScheduleRevisionGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(scheduleId, revisionId, null, requestOptions); + return this.GetNestedEntity(scheduleId, revisionId, options, requestOptions); } - public virtual Task GetAsync(string scheduleId, string revisionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string scheduleId, string revisionId, SubscriptionScheduleRevisionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(scheduleId, revisionId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(scheduleId, revisionId, options, requestOptions, cancellationToken); } public virtual StripeList List(string scheduleId, SubscriptionScheduleRevisionListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleGetOptions.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleGetOptions.cs new file mode 100644 index 0000000000..f2bd3c5832 --- /dev/null +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SubscriptionScheduleGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs index fe518ee68e..efc933bf7b 100644 --- a/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs +++ b/src/Stripe.net/Services/SubscriptionSchedules/SubscriptionScheduleService.cs @@ -8,7 +8,7 @@ namespace Stripe public class SubscriptionScheduleService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public SubscriptionScheduleService() @@ -43,14 +43,14 @@ public virtual SubscriptionSchedule Create(SubscriptionScheduleCreateOptions opt return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual SubscriptionSchedule Get(string scheduleId, RequestOptions requestOptions = null) + public virtual SubscriptionSchedule Get(string scheduleId, SubscriptionScheduleGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(scheduleId, null, requestOptions); + return this.GetEntity(scheduleId, options, requestOptions); } - public virtual Task GetAsync(string scheduleId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string scheduleId, SubscriptionScheduleGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(scheduleId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(scheduleId, options, requestOptions, cancellationToken); } public virtual StripeList List(SubscriptionScheduleListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionGetOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionGetOptions.cs new file mode 100644 index 0000000000..cc88142a47 --- /dev/null +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class SubscriptionGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs index 61e8df3414..2ca152b8c0 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionService.cs @@ -7,7 +7,7 @@ namespace Stripe public class SubscriptionService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public SubscriptionService() @@ -50,14 +50,14 @@ public virtual Subscription Create(SubscriptionCreateOptions options, RequestOpt return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Subscription Get(string subscriptionId, RequestOptions requestOptions = null) + public virtual Subscription Get(string subscriptionId, SubscriptionGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(subscriptionId, null, requestOptions); + return this.GetEntity(subscriptionId, options, requestOptions); } - public virtual Task GetAsync(string subscriptionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string subscriptionId, SubscriptionGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(subscriptionId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(subscriptionId, options, requestOptions, cancellationToken); } public virtual StripeList List(SubscriptionListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/TaxIds/TaxIdGetOptions.cs b/src/Stripe.net/Services/TaxIds/TaxIdGetOptions.cs new file mode 100644 index 0000000000..eec1b41157 --- /dev/null +++ b/src/Stripe.net/Services/TaxIds/TaxIdGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TaxIdGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs b/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs index e5160d85c4..170c4b6ea8 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class TaxIdListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/TaxIds/TaxIdService.cs b/src/Stripe.net/Services/TaxIds/TaxIdService.cs index 949775078a..bbb5fef1cd 100644 --- a/src/Stripe.net/Services/TaxIds/TaxIdService.cs +++ b/src/Stripe.net/Services/TaxIds/TaxIdService.cs @@ -7,7 +7,7 @@ namespace Stripe public class TaxIdService : ServiceNested, INestedCreatable, INestedListable, - INestedRetrievable + INestedRetrievable { public TaxIdService() : base(null) @@ -43,14 +43,14 @@ public virtual TaxId Delete(string customerId, string taxIdId, RequestOptions re return this.DeleteNestedEntityAsync(customerId, taxIdId, null, requestOptions, cancellationToken); } - public virtual TaxId Get(string customerId, string taxIdId, RequestOptions requestOptions = null) + public virtual TaxId Get(string customerId, string taxIdId, TaxIdGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(customerId, taxIdId, null, requestOptions); + return this.GetNestedEntity(customerId, taxIdId, options, requestOptions); } - public virtual Task GetAsync(string customerId, string taxIdId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string customerId, string taxIdId, TaxIdGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(customerId, taxIdId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(customerId, taxIdId, options, requestOptions, cancellationToken); } public virtual StripeList List(string customerId, TaxIdListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/TaxRates/TaxRateGetOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateGetOptions.cs new file mode 100644 index 0000000000..4d378ca779 --- /dev/null +++ b/src/Stripe.net/Services/TaxRates/TaxRateGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TaxRateGetOptions : ListOptionsWithCreated + { + } +} diff --git a/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs b/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs index ab546b14b3..f9b18b8044 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateListOptions.cs @@ -1,6 +1,5 @@ namespace Stripe { - using System; using Newtonsoft.Json; using Stripe.Infrastructure; diff --git a/src/Stripe.net/Services/TaxRates/TaxRateService.cs b/src/Stripe.net/Services/TaxRates/TaxRateService.cs index bb0129b0c4..f780277f47 100644 --- a/src/Stripe.net/Services/TaxRates/TaxRateService.cs +++ b/src/Stripe.net/Services/TaxRates/TaxRateService.cs @@ -7,7 +7,7 @@ namespace Stripe public class TaxRateService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public TaxRateService() @@ -34,14 +34,14 @@ public virtual TaxRate Create(TaxRateCreateOptions options, RequestOptions reque return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual TaxRate Get(string taxRateId, RequestOptions requestOptions = null) + public virtual TaxRate Get(string taxRateId, TaxRateGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(taxRateId, null, requestOptions); + return this.GetEntity(taxRateId, options, requestOptions); } - public virtual Task GetAsync(string taxRateId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string taxRateId, TaxRateGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(taxRateId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(taxRateId, options, requestOptions, cancellationToken); } public virtual StripeList List(TaxRateListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationGetOptions.cs b/src/Stripe.net/Services/Terminal/Locations/LocationGetOptions.cs new file mode 100644 index 0000000000..4c1b1c4c5e --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Locations/LocationGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Terminal +{ + public class LocationGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Terminal/Locations/LocationService.cs b/src/Stripe.net/Services/Terminal/Locations/LocationService.cs index e1c86a570c..5d8923bf6d 100644 --- a/src/Stripe.net/Services/Terminal/Locations/LocationService.cs +++ b/src/Stripe.net/Services/Terminal/Locations/LocationService.cs @@ -40,14 +40,14 @@ public virtual Location Delete(string locationId, RequestOptions requestOptions return this.DeleteEntityAsync(locationId, null, requestOptions, cancellationToken); } - public virtual Location Get(string locationId, RequestOptions requestOptions = null) + public virtual Location Get(string locationId, LocationGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(locationId, null, requestOptions); + return this.GetEntity(locationId, options, requestOptions); } - public virtual Task GetAsync(string locationId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string locationId, LocationGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(locationId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(locationId, options, requestOptions, cancellationToken); } public virtual StripeList List(LocationListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderGetOptions.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderGetOptions.cs new file mode 100644 index 0000000000..11ec113d47 --- /dev/null +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe.Terminal +{ + public class ReaderGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Terminal/Readers/ReaderService.cs b/src/Stripe.net/Services/Terminal/Readers/ReaderService.cs index a1704241cb..7352cc0d09 100644 --- a/src/Stripe.net/Services/Terminal/Readers/ReaderService.cs +++ b/src/Stripe.net/Services/Terminal/Readers/ReaderService.cs @@ -40,14 +40,14 @@ public virtual Reader Delete(string readerId, RequestOptions requestOptions = nu return this.DeleteEntityAsync(readerId, null, requestOptions, cancellationToken); } - public virtual Reader Get(string readerId, RequestOptions requestOptions = null) + public virtual Reader Get(string readerId, ReaderGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(readerId, null, requestOptions); + return this.GetEntity(readerId, options, requestOptions); } - public virtual Task GetAsync(string readerId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string readerId, ReaderGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(readerId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(readerId, options, requestOptions, cancellationToken); } public virtual StripeList List(ReaderListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Tokens/TokenGetOptions.cs b/src/Stripe.net/Services/Tokens/TokenGetOptions.cs new file mode 100644 index 0000000000..865e9042c6 --- /dev/null +++ b/src/Stripe.net/Services/Tokens/TokenGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TokenGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Tokens/TokenService.cs b/src/Stripe.net/Services/Tokens/TokenService.cs index fb5434c343..8a6d3481c4 100644 --- a/src/Stripe.net/Services/Tokens/TokenService.cs +++ b/src/Stripe.net/Services/Tokens/TokenService.cs @@ -6,7 +6,7 @@ namespace Stripe public class TokenService : Service, ICreatable, - IRetrievable + IRetrievable { public TokenService() : base(null) @@ -30,14 +30,14 @@ public virtual Token Create(TokenCreateOptions options, RequestOptions requestOp return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Token Get(string tokenId, RequestOptions requestOptions = null) + public virtual Token Get(string tokenId, TokenGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(tokenId, null, requestOptions); + return this.GetEntity(tokenId, options, requestOptions); } - public virtual Task GetAsync(string tokenId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string tokenId, TokenGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(tokenId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(tokenId, options, requestOptions, cancellationToken); } } } diff --git a/src/Stripe.net/Services/Topups/TopupGetOptions.cs b/src/Stripe.net/Services/Topups/TopupGetOptions.cs new file mode 100644 index 0000000000..1febf6b011 --- /dev/null +++ b/src/Stripe.net/Services/Topups/TopupGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TopupGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Topups/TopupListOptions.cs b/src/Stripe.net/Services/Topups/TopupListOptions.cs index 1cf316acd0..d04bb673c3 100644 --- a/src/Stripe.net/Services/Topups/TopupListOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class TopupListOptions : ListOptionsWithCreated { } diff --git a/src/Stripe.net/Services/Topups/TopupService.cs b/src/Stripe.net/Services/Topups/TopupService.cs index c057338349..79f8ce141f 100644 --- a/src/Stripe.net/Services/Topups/TopupService.cs +++ b/src/Stripe.net/Services/Topups/TopupService.cs @@ -8,7 +8,7 @@ namespace Stripe public class TopupService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public TopupService() @@ -47,14 +47,14 @@ public virtual Topup Create(TopupCreateOptions options, RequestOptions requestOp return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Topup Get(string topupId, RequestOptions requestOptions = null) + public virtual Topup Get(string topupId, TopupGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(topupId, null, requestOptions); + return this.GetEntity(topupId, options, requestOptions); } - public virtual Task GetAsync(string topupId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string topupId, TopupGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(topupId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(topupId, options, requestOptions, cancellationToken); } public virtual StripeList List(TopupListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalGetOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalGetOptions.cs new file mode 100644 index 0000000000..d844605ac5 --- /dev/null +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TransferReversalGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalListOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalListOptions.cs index 71c58a8d6e..d7497dd4fe 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalListOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class TransferReversalListOptions : ListOptions { } diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs index f2b13ae95f..d75b2300d2 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalService.cs @@ -7,7 +7,7 @@ namespace Stripe public class TransferReversalService : ServiceNested, INestedCreatable, INestedListable, - INestedRetrievable, + INestedRetrievable, INestedUpdatable { public TransferReversalService() @@ -36,14 +36,14 @@ public virtual TransferReversal Create(string transferId, TransferReversalCreate return this.CreateNestedEntityAsync(transferId, options, requestOptions, cancellationToken); } - public virtual TransferReversal Get(string transferId, string reversalId, RequestOptions requestOptions = null) + public virtual TransferReversal Get(string transferId, string reversalId, TransferReversalGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetNestedEntity(transferId, reversalId, null, requestOptions); + return this.GetNestedEntity(transferId, reversalId, options, requestOptions); } - public virtual Task GetAsync(string transferId, string reversalId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string transferId, string reversalId, TransferReversalGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetNestedEntityAsync(transferId, reversalId, null, requestOptions, cancellationToken); + return this.GetNestedEntityAsync(transferId, reversalId, options, requestOptions, cancellationToken); } public virtual StripeList List(string transferId, TransferReversalListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/Transfers/TransferGetOptions.cs b/src/Stripe.net/Services/Transfers/TransferGetOptions.cs new file mode 100644 index 0000000000..488ba35b1d --- /dev/null +++ b/src/Stripe.net/Services/Transfers/TransferGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class TransferGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/Transfers/TransferService.cs b/src/Stripe.net/Services/Transfers/TransferService.cs index ee22b8bb44..a95fe3d4f5 100644 --- a/src/Stripe.net/Services/Transfers/TransferService.cs +++ b/src/Stripe.net/Services/Transfers/TransferService.cs @@ -7,7 +7,7 @@ namespace Stripe public class TransferService : Service, ICreatable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public TransferService() @@ -40,14 +40,14 @@ public virtual Transfer Create(TransferCreateOptions options, RequestOptions req return this.CreateEntityAsync(options, requestOptions, cancellationToken); } - public virtual Transfer Get(string transferId, RequestOptions requestOptions = null) + public virtual Transfer Get(string transferId, TransferGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(transferId, null, requestOptions); + return this.GetEntity(transferId, options, requestOptions); } - public virtual Task GetAsync(string transferId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string transferId, TransferGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(transferId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(transferId, options, requestOptions, cancellationToken); } public virtual StripeList List(TransferListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointGetOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointGetOptions.cs new file mode 100644 index 0000000000..02423a1011 --- /dev/null +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointGetOptions.cs @@ -0,0 +1,6 @@ +namespace Stripe +{ + public class WebhookEndpointGetOptions : BaseOptions + { + } +} diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointListOptions.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointListOptions.cs index c1fb8ddb28..12fb0fbfd2 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointListOptions.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointListOptions.cs @@ -1,7 +1,5 @@ namespace Stripe { - using Newtonsoft.Json; - public class WebhookEndpointListOptions : ListOptionsWithCreated { } diff --git a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointService.cs b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointService.cs index 3dd47a9751..c693c143f9 100644 --- a/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointService.cs +++ b/src/Stripe.net/Services/WebhookEndpoints/WebhookEndpointService.cs @@ -8,7 +8,7 @@ public class WebhookEndpointService : Service, ICreatable, IDeletable, IListable, - IRetrievable, + IRetrievable, IUpdatable { public WebhookEndpointService() @@ -43,14 +43,14 @@ public virtual WebhookEndpoint Delete(string endpointId, RequestOptions requestO return this.DeleteEntityAsync(endpointId, null, requestOptions, cancellationToken); } - public virtual WebhookEndpoint Get(string endpointId, RequestOptions requestOptions = null) + public virtual WebhookEndpoint Get(string endpointId, WebhookEndpointGetOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(endpointId, null, requestOptions); + return this.GetEntity(endpointId, options, requestOptions); } - public virtual Task GetAsync(string endpointId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string endpointId, WebhookEndpointGetOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(endpointId, null, requestOptions, cancellationToken); + return this.GetEntityAsync(endpointId, options, requestOptions, cancellationToken); } public virtual StripeList List(WebhookEndpointListOptions options = null, RequestOptions requestOptions = null) diff --git a/src/Stripe.net/Services/_interfaces/INestedRetrievable.cs b/src/Stripe.net/Services/_interfaces/INestedRetrievable.cs index 4ce5d5365b..6cd770a399 100644 --- a/src/Stripe.net/Services/_interfaces/INestedRetrievable.cs +++ b/src/Stripe.net/Services/_interfaces/INestedRetrievable.cs @@ -3,11 +3,12 @@ namespace Stripe using System.Threading; using System.Threading.Tasks; - public interface INestedRetrievable + public interface INestedRetrievable where T : IStripeEntity, IHasId + where O : BaseOptions { - T Get(string parentId, string id, RequestOptions requestOptions = null); + T Get(string parentId, string id, O retrieveOptions, RequestOptions requestOptions = null); - Task GetAsync(string parentId, string id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)); + Task GetAsync(string parentId, string id, O retrieveOptions, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/Stripe.net/Services/_interfaces/IRetrievable.cs b/src/Stripe.net/Services/_interfaces/IRetrievable.cs index 95241c72c3..0a92e818db 100644 --- a/src/Stripe.net/Services/_interfaces/IRetrievable.cs +++ b/src/Stripe.net/Services/_interfaces/IRetrievable.cs @@ -3,11 +3,12 @@ namespace Stripe using System.Threading; using System.Threading.Tasks; - public interface IRetrievable + public interface IRetrievable where T : IStripeEntity, IHasId + where O : BaseOptions { - T Get(string id, RequestOptions requestOptions = null); + T Get(string id, O retrieveOptions, RequestOptions requestOptions = null); - Task GetAsync(string id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)); + Task GetAsync(string id, O retrieveOptions, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/src/StripeTests/Services/_base/ServiceTest.cs b/src/StripeTests/Services/_base/ServiceTest.cs index 2a9b9dea8e..da4210457f 100644 --- a/src/StripeTests/Services/_base/ServiceTest.cs +++ b/src/StripeTests/Services/_base/ServiceTest.cs @@ -101,7 +101,7 @@ private class TestEntity : StripeEntity, IHasId private class TestService : Service, IListable, - IRetrievable + IRetrievable { public TestService(IStripeClient client) : base(client) @@ -114,14 +114,14 @@ public TestService(IStripeClient client) public bool ExpandMultiWordProperty { get; set; } - public virtual TestEntity Get(string id, RequestOptions requestOptions = null) + public virtual TestEntity Get(string id, BaseOptions options = null, RequestOptions requestOptions = null) { - return this.GetEntity(id, null, requestOptions); + return this.GetEntity(id, options, requestOptions); } - public virtual Task GetAsync(string id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) + public virtual Task GetAsync(string id, BaseOptions options = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken)) { - return this.GetEntityAsync(id, null, requestOptions, cancellationToken); + return this.GetEntityAsync(id, options, requestOptions, cancellationToken); } public virtual StripeList List(ListOptions options = null, RequestOptions requestOptions = null)