From 895400aaeeb5220907c2b8f8a5a8314c01427cf3 Mon Sep 17 00:00:00 2001 From: Olivier Bellone Date: Wed, 10 Oct 2018 12:19:22 +0200 Subject: [PATCH] Use longs instead of ints --- src/Stripe.net/Entities/Accounts/BirthDay.cs | 6 +-- .../Entities/Accounts/PayoutSchedule.cs | 4 +- .../ApplicationFeeRefund.cs | 2 +- .../ApplicationFees/ApplicationFee.cs | 4 +- .../BalanceTransactions/BalanceTransaction.cs | 6 +-- .../Entities/BalanceTransactions/Fee.cs | 2 +- src/Stripe.net/Entities/Cards/Card.cs | 4 +- src/Stripe.net/Entities/Charges/Charge.cs | 4 +- .../Entities/Charges/ChargeLevel3.cs | 2 +- .../Entities/Charges/ChargeLevel3LineItem.cs | 8 ++-- src/Stripe.net/Entities/Charges/Outcome.cs | 2 +- src/Stripe.net/Entities/Coupons/Coupon.cs | 8 ++-- src/Stripe.net/Entities/Customers/Customer.cs | 2 +- src/Stripe.net/Entities/Disputes/Dispute.cs | 2 +- .../Entities/Disputes/EvidenceDetails.cs | 2 +- src/Stripe.net/Entities/Events/Event.cs | 2 +- src/Stripe.net/Entities/Files/File.cs | 2 +- .../Entities/InvoiceItems/InvoiceItem.cs | 6 +-- src/Stripe.net/Entities/Invoices/Invoice.cs | 20 +++++----- .../Entities/Invoices/InvoiceLineItem.cs | 4 +- .../Issuing/Authorizations/Authorization.cs | 8 ++-- .../Authorizations/AuthorizationControls.cs | 4 +- .../Issuing/Authorizations/RequestHistory.cs | 4 +- src/Stripe.net/Entities/Issuing/Cards/Card.cs | 4 +- .../Entities/Issuing/Cards/CardDetails.cs | 4 +- .../Entities/Issuing/Disputes/Dispute.cs | 2 +- src/Stripe.net/Entities/Orders/Order.cs | 6 +-- src/Stripe.net/Entities/Orders/OrderItem.cs | 4 +- src/Stripe.net/Entities/Orders/OrderReturn.cs | 2 +- .../Entities/Orders/ShippingMethod.cs | 2 +- .../Entities/PaymentIntents/PaymentIntent.cs | 8 ++-- .../PaymentIntentTransferData.cs | 2 +- src/Stripe.net/Entities/Payouts/Payout.cs | 2 +- src/Stripe.net/Entities/Plans/Plan.cs | 6 +-- src/Stripe.net/Entities/Plans/PlanTier.cs | 4 +- .../Entities/Plans/PlanTransformUsage.cs | 2 +- src/Stripe.net/Entities/Refunds/Refund.cs | 2 +- .../Reporting/ReportTypes/ReportType.cs | 2 +- src/Stripe.net/Entities/Skus/Inventory.cs | 2 +- src/Stripe.net/Entities/Skus/Sku.cs | 2 +- .../SourceMandateNotification.cs | 2 +- .../SourceTransactions/SourceTransaction.cs | 2 +- src/Stripe.net/Entities/Sources/Source.cs | 2 +- .../Entities/Sources/SourceBitcoin.cs | 8 ++-- src/Stripe.net/Entities/Sources/SourceCard.cs | 4 +- .../Sources/SourceCodeVerification.cs | 2 +- .../Entities/Sources/SourceReceiver.cs | 6 +-- .../Entities/Sources/SourceThreeDSecure.cs | 4 +- src/Stripe.net/Entities/StripeList.cs | 2 +- .../SubscriptionItems/SubscriptionItem.cs | 2 +- .../Entities/Subscriptions/Subscription.cs | 4 +- .../Entities/ThreeDSecure/ThreeDSecure.cs | 2 +- src/Stripe.net/Entities/Topups/Topup.cs | 2 +- .../TransferReversals/TransferReversal.cs | 2 +- src/Stripe.net/Entities/Transfers/Transfer.cs | 4 +- .../UsageRecordSummary.cs | 2 +- .../Entities/UsageRecords/UsageRecord.cs | 2 +- .../Services/Account/AccountCardOptions.cs | 4 +- .../Services/Account/AccountDobOptions.cs | 6 +-- .../ApplicationFeeRefundCreateOptions.cs | 2 +- .../BankAccounts/BankAccountVerifyOptions.cs | 2 +- .../Services/Cards/CardUpdateOptions.cs | 4 +- .../Services/Charges/ChargeCaptureOptions.cs | 4 +- .../Services/Charges/ChargeCreateOptions.cs | 4 +- .../Charges/ChargeDestinationOptions.cs | 2 +- .../Charges/ChargeLevel3LineItemOptions.cs | 8 ++-- .../Services/Charges/ChargeLevel3Options.cs | 2 +- .../Services/Coupons/CouponCreateOptions.cs | 6 +-- .../Customers/CustomerCreateOptions.cs | 4 +- .../Customers/CustomerUpdateOptions.cs | 2 +- .../Services/Events/EventUtility.cs | 4 +- .../ExternalAccountCardUpdateOptions.cs | 4 +- .../InvoiceItems/InvoiceItemCreateOptions.cs | 6 +-- .../InvoiceItems/InvoiceItemUpdateOptions.cs | 6 +-- .../Services/Invoices/InvoiceCreateOptions.cs | 4 +- .../InvoiceSubscriptionItemOptions.cs | 2 +- .../InvoiceUpcomingInvoiceItemOption.cs | 2 +- .../Services/Invoices/InvoiceUpdateOptions.cs | 2 +- .../Cards/AuthorizationControlsOptions.cs | 4 +- .../Services/Issuing/Cards/CardListOptions.cs | 4 +- .../Issuing/Disputes/DisputeCreateOptions.cs | 2 +- src/Stripe.net/Services/ListOptions.cs | 2 +- .../Services/Orders/OrderItemOptions.cs | 4 +- .../Services/Orders/OrderPayOptions.cs | 2 +- .../PaymentIntentCaptureOptions.cs | 4 +- .../PaymentIntentSharedOptions.cs | 4 +- .../PaymentIntentTransferDataOptions.cs | 2 +- .../Services/Payouts/PayoutCreateOptions.cs | 2 +- .../Services/Plans/PlanCreateOptions.cs | 6 +-- .../Services/Plans/PlanTierOptions.cs | 4 +- .../Plans/PlanTransformUsageOptions.cs | 2 +- .../Services/Refunds/RefundCreateOptions.cs | 2 +- .../Services/Skus/InventoryOptions.cs | 2 +- .../Services/Skus/SkuSharedOptions.cs | 2 +- .../Sources/SourceCardUpdateOptions.cs | 4 +- .../Services/Sources/SourceCreateOptions.cs | 2 +- .../SubscriptionItemSharedOptions.cs | 2 +- .../SubscriptionCreateOptions.cs | 2 +- .../Subscriptions/SubscriptionItemOption.cs | 2 +- .../SubscriptionItemUpdateOption.cs | 2 +- .../SubscriptionSharedOptions.cs | 4 +- .../ThreeDSecure/ThreeDSecureCreateOptions.cs | 2 +- .../Services/Topups/TopupCreateOptions.cs | 2 +- .../TransferReversalCreateOptions.cs | 2 +- .../Transfers/TransferCreateOptions.cs | 2 +- .../UsageRecords/UsageRecordCreateOptions.cs | 2 +- .../_refactor/CardCreateNestedOptions.cs | 4 +- .../Services/_refactor/CreditCardOptions.cs | 4 +- .../AbstractStripeObjectConverterTest.cs | 8 ++-- .../Infrastructure/ParameterBuilderTest.cs | 38 +++++++++---------- .../TestData/TestNestedOptions.cs | 4 +- .../TestData/TestObjectDateTime.cs | 1 - .../Infrastructure/TestData/TestOptions.cs | 6 +-- .../TestData/TestOptionsWithList.cs | 4 +- .../TestData/TestUnencodableOptions.cs | 19 ---------- .../BankAccounts/BankAccountServiceTest.cs | 2 +- .../Services/Events/EventUtilityTest.cs | 2 +- 117 files changed, 222 insertions(+), 242 deletions(-) delete mode 100644 src/StripeTests/Infrastructure/TestData/TestUnencodableOptions.cs diff --git a/src/Stripe.net/Entities/Accounts/BirthDay.cs b/src/Stripe.net/Entities/Accounts/BirthDay.cs index c135124778..87747e028c 100644 --- a/src/Stripe.net/Entities/Accounts/BirthDay.cs +++ b/src/Stripe.net/Entities/Accounts/BirthDay.cs @@ -5,12 +5,12 @@ namespace Stripe public class BirthDay : StripeEntity { [JsonProperty("day")] - public int? Day { get; set; } + public long? Day { get; set; } [JsonProperty("month")] - public int? Month { get; set; } + public long? Month { get; set; } [JsonProperty("year")] - public int? Year { get; set; } + public long? Year { get; set; } } } diff --git a/src/Stripe.net/Entities/Accounts/PayoutSchedule.cs b/src/Stripe.net/Entities/Accounts/PayoutSchedule.cs index fdf8e1309c..16a520bda0 100644 --- a/src/Stripe.net/Entities/Accounts/PayoutSchedule.cs +++ b/src/Stripe.net/Entities/Accounts/PayoutSchedule.cs @@ -5,13 +5,13 @@ namespace Stripe public class PayoutSchedule : StripeEntity { [JsonProperty("delay_days")] - public int DelayDays { get; set; } + public long DelayDays { get; set; } [JsonProperty("interval")] public string Interval { get; set; } [JsonProperty("monthly_anchor")] - public int MonthlyAnchor { get; set; } + public long MonthlyAnchor { get; set; } [JsonProperty("weekly_anchor")] public string WeeklyAnchor { get; set; } diff --git a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs index 09a23f55bd..1844844442 100644 --- a/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs +++ b/src/Stripe.net/Entities/ApplicationFeeRefunds/ApplicationFeeRefund.cs @@ -14,7 +14,7 @@ public class ApplicationFeeRefund : StripeEntity, IHasId, IHasObject, IBalanceTr public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } #region Expandable Balance Transaction public string BalanceTransactionId { get; set; } diff --git a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs index bc01afd305..292d452234 100644 --- a/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs +++ b/src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs @@ -29,10 +29,10 @@ internal object InternalAccount #endregion [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("amount_refunded")] - public int AmountRefunded { get; set; } + public long AmountRefunded { get; set; } #region Expandable Application public string ApplicationId { get; set; } diff --git a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs index 892ddcd1bc..eb88630dcb 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/BalanceTransaction.cs @@ -14,7 +14,7 @@ public class BalanceTransaction : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("available_on")] public DateTime AvailableOn { get; set; } @@ -32,13 +32,13 @@ public class BalanceTransaction : StripeEntity, IHasId, IHasObject public decimal? ExchangeRate { get; set; } [JsonProperty("fee")] - public int Fee { get; set; } + public long Fee { get; set; } [JsonProperty("fee_details")] public List FeeDetails { get; set; } [JsonProperty("net")] - public int Net { get; set; } + public long Net { get; set; } #region Expandable Source public string SourceId { get; set; } diff --git a/src/Stripe.net/Entities/BalanceTransactions/Fee.cs b/src/Stripe.net/Entities/BalanceTransactions/Fee.cs index 2648e81d21..423fa0e5dd 100644 --- a/src/Stripe.net/Entities/BalanceTransactions/Fee.cs +++ b/src/Stripe.net/Entities/BalanceTransactions/Fee.cs @@ -5,7 +5,7 @@ namespace Stripe public class Fee : StripeEntity { [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("application")] public string Application { get; set; } diff --git a/src/Stripe.net/Entities/Cards/Card.cs b/src/Stripe.net/Entities/Cards/Card.cs index 8f7375748c..4294eaa1d8 100644 --- a/src/Stripe.net/Entities/Cards/Card.cs +++ b/src/Stripe.net/Entities/Cards/Card.cs @@ -96,10 +96,10 @@ internal object InternalCustomer public string DynamicLast4 { get; set; } [JsonProperty("exp_month")] - public int ExpMonth { get; set; } + public long ExpMonth { get; set; } [JsonProperty("exp_year")] - public int ExpYear { get; set; } + public long ExpYear { get; set; } [JsonProperty("fingerprint")] public string Fingerprint { get; set; } diff --git a/src/Stripe.net/Entities/Charges/Charge.cs b/src/Stripe.net/Entities/Charges/Charge.cs index 91d488ff50..74db4b7126 100644 --- a/src/Stripe.net/Entities/Charges/Charge.cs +++ b/src/Stripe.net/Entities/Charges/Charge.cs @@ -17,13 +17,13 @@ public class Charge : StripeEntity, IHasId, IHasObject, IBalanceTransactionSourc /// A positive integer in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a 0-decimal currency) representing how much to charge. The minimum amount is $0.50 US or equivalent in charge currency. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } /// /// Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued). /// [JsonProperty("amount_refunded")] - public int AmountRefunded { get; set; } + public long AmountRefunded { get; set; } #region Expandable Application public string ApplicationId { get; set; } diff --git a/src/Stripe.net/Entities/Charges/ChargeLevel3.cs b/src/Stripe.net/Entities/Charges/ChargeLevel3.cs index cf1384dc9a..5b84852bf7 100644 --- a/src/Stripe.net/Entities/Charges/ChargeLevel3.cs +++ b/src/Stripe.net/Entities/Charges/ChargeLevel3.cs @@ -21,6 +21,6 @@ public class ChargeLevel3 : StripeEntity public string ShippingFromZip { get; set; } [JsonProperty("shipping_amount")] - public int ShippingAmount { get; set; } + public long ShippingAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/ChargeLevel3LineItem.cs b/src/Stripe.net/Entities/Charges/ChargeLevel3LineItem.cs index 13d13edec6..3570447bd8 100644 --- a/src/Stripe.net/Entities/Charges/ChargeLevel3LineItem.cs +++ b/src/Stripe.net/Entities/Charges/ChargeLevel3LineItem.cs @@ -5,7 +5,7 @@ namespace Stripe public class ChargeLevel3LineItem : StripeEntity { [JsonProperty("discount_amount")] - public int? DiscountAmount { get; set; } + public long? DiscountAmount { get; set; } [JsonProperty("product_code")] public string ProductCode { get; set; } @@ -14,12 +14,12 @@ public class ChargeLevel3LineItem : StripeEntity public string ProductDescription { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("tax_amount")] - public int? TaxAmount { get; set; } + public long? TaxAmount { get; set; } [JsonProperty("unit_cost")] - public int? UnitCost { get; set; } + public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Entities/Charges/Outcome.cs b/src/Stripe.net/Entities/Charges/Outcome.cs index fbdfce4ea3..a2f6321e83 100644 --- a/src/Stripe.net/Entities/Charges/Outcome.cs +++ b/src/Stripe.net/Entities/Charges/Outcome.cs @@ -27,7 +27,7 @@ public class Outcome : StripeEntity /// Stripe’s evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. /// [JsonProperty("risk_score")] - public int RiskScore { get; set; } + public long RiskScore { get; set; } #region Expandable Rule diff --git a/src/Stripe.net/Entities/Coupons/Coupon.cs b/src/Stripe.net/Entities/Coupons/Coupon.cs index a40b9d0d50..979cc10ae8 100644 --- a/src/Stripe.net/Entities/Coupons/Coupon.cs +++ b/src/Stripe.net/Entities/Coupons/Coupon.cs @@ -14,7 +14,7 @@ public class Coupon : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount_off")] - public int? AmountOff { get; set; } + public long? AmountOff { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } @@ -32,13 +32,13 @@ public class Coupon : StripeEntity, IHasId, IHasObject public string Duration { get; set; } [JsonProperty("duration_in_months")] - public int? DurationInMonths { get; set; } + public long? DurationInMonths { get; set; } [JsonProperty("livemode")] public bool Livemode { get; set; } [JsonProperty("max_redemptions")] - public int? MaxRedemptions { get; set; } + public long? MaxRedemptions { get; set; } [JsonProperty("metadata")] public Dictionary Metadata { get; set; } @@ -53,7 +53,7 @@ public class Coupon : StripeEntity, IHasId, IHasObject public DateTime? RedeemBy { get; set; } [JsonProperty("times_redeemed")] - public int TimesRedeemed { get; private set; } + public long TimesRedeemed { get; private set; } [JsonProperty("valid")] public bool Valid { get; set; } diff --git a/src/Stripe.net/Entities/Customers/Customer.cs b/src/Stripe.net/Entities/Customers/Customer.cs index 01d440dd58..49dca331b4 100644 --- a/src/Stripe.net/Entities/Customers/Customer.cs +++ b/src/Stripe.net/Entities/Customers/Customer.cs @@ -17,7 +17,7 @@ public class Customer : StripeEntity, IHasId, IHasObject /// Current balance, if any, being stored on the customer’s account. If negative, the customer has credit to apply to the next invoice. If positive, the customer has an amount owed that will be added to the next invoice. The balance does not refer to any unpaid invoices; it solely takes into account amounts that have yet to be successfully applied to any invoice. This balance is only taken into account for recurring billing purposes (i.e., subscriptions, invoices, invoice items) /// [JsonProperty("account_balance")] - public int AccountBalance { get; set; } + public long AccountBalance { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } diff --git a/src/Stripe.net/Entities/Disputes/Dispute.cs b/src/Stripe.net/Entities/Disputes/Dispute.cs index d1835cf023..99cc577021 100644 --- a/src/Stripe.net/Entities/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Disputes/Dispute.cs @@ -14,7 +14,7 @@ public class Dispute : StripeEntity, IHasId, IHasObject, IBalanceTransactionSour public string Object { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("balance_transactions")] public List BalanceTransactions { get; set; } diff --git a/src/Stripe.net/Entities/Disputes/EvidenceDetails.cs b/src/Stripe.net/Entities/Disputes/EvidenceDetails.cs index 3e59071dd1..82aed65ebc 100644 --- a/src/Stripe.net/Entities/Disputes/EvidenceDetails.cs +++ b/src/Stripe.net/Entities/Disputes/EvidenceDetails.cs @@ -16,6 +16,6 @@ public class EvidenceDetails : StripeEntity public bool PastDue { get; set; } [JsonProperty("submission_count")] - public int SubmissionCount { get; set; } + public long SubmissionCount { get; set; } } } diff --git a/src/Stripe.net/Entities/Events/Event.cs b/src/Stripe.net/Entities/Events/Event.cs index b48b0cfcaa..f6d258ab5f 100644 --- a/src/Stripe.net/Entities/Events/Event.cs +++ b/src/Stripe.net/Entities/Events/Event.cs @@ -28,7 +28,7 @@ public class Event : StripeEntity, IHasId, IHasObject public bool Livemode { get; set; } [JsonProperty("pending_webhooks")] - public int PendingWebhooks { get; set; } + public long PendingWebhooks { get; set; } [JsonProperty("request")] public EventRequest Request { get; set; } diff --git a/src/Stripe.net/Entities/Files/File.cs b/src/Stripe.net/Entities/Files/File.cs index 5843c521de..396db51cb7 100644 --- a/src/Stripe.net/Entities/Files/File.cs +++ b/src/Stripe.net/Entities/Files/File.cs @@ -25,7 +25,7 @@ public class File : StripeEntity, IHasId, IHasObject public string Purpose { get; set; } [JsonProperty("size")] - public int Size { get; set; } + public long Size { get; set; } [JsonProperty("title")] public string Title { get; set; } diff --git a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs index 066f231d09..1ac659c90e 100644 --- a/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs +++ b/src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs @@ -14,7 +14,7 @@ public class InvoiceItem : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } @@ -82,7 +82,7 @@ internal object InternalInvoice public bool Proration { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } #region Expandable Subscription public string SubscriptionId { get; set; } @@ -104,6 +104,6 @@ internal object InternalSubscription public string SubscriptionItemId { get; set; } [JsonProperty("unit_amount")] - public int? UnitAmount { get; set; } + public long? UnitAmount { get; set; } } } diff --git a/src/Stripe.net/Entities/Invoices/Invoice.cs b/src/Stripe.net/Entities/Invoices/Invoice.cs index 5f321955c5..68b95450bd 100644 --- a/src/Stripe.net/Entities/Invoices/Invoice.cs +++ b/src/Stripe.net/Entities/Invoices/Invoice.cs @@ -14,19 +14,19 @@ public class Invoice : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount_due")] - public int AmountDue { get; set; } + public long AmountDue { get; set; } [JsonProperty("amount_paid")] - public int AmountPaid { get; set; } + public long AmountPaid { get; set; } [JsonProperty("amount_remaining")] - public int AmountRemaining { get; set; } + public long AmountRemaining { get; set; } [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } [JsonProperty("attempt_count")] - public int AttemptCount { get; set; } + public long AttemptCount { get; set; } [JsonProperty("attempted")] public bool Attempted { get; set; } @@ -97,7 +97,7 @@ internal object InternalCustomer public DateTime? DueDate { get; set; } [JsonProperty("ending_balance")] - public int? EndingBalance { get; set; } + public long? EndingBalance { get; set; } [JsonProperty("forgiven")] public bool? Forgiven { get; set; } @@ -139,7 +139,7 @@ internal object InternalCustomer public string ReceiptNumber { get; set; } [JsonProperty("starting_balance")] - public int StartingBalance { get; set; } + public long StartingBalance { get; set; } [JsonProperty("statement_descriptor")] public string StatementDescriptor { get; set; } @@ -164,16 +164,16 @@ internal object InternalSubscription public DateTime SubscriptionProrationDate { get; set; } [JsonProperty("subtotal")] - public int Subtotal { get; set; } + public long Subtotal { get; set; } [JsonProperty("tax")] - public int? Tax { get; set; } + public long? Tax { get; set; } [JsonProperty("tax_percent")] public decimal? TaxPercent { get; set; } [JsonProperty("total")] - public int Total { get; set; } + public long Total { get; set; } [JsonProperty("webhooks_delivered_at")] public DateTime? WebhooksDeliveredAt { get; set; } diff --git a/src/Stripe.net/Entities/Invoices/InvoiceLineItem.cs b/src/Stripe.net/Entities/Invoices/InvoiceLineItem.cs index 3a8cceeff1..83fdca8f9e 100644 --- a/src/Stripe.net/Entities/Invoices/InvoiceLineItem.cs +++ b/src/Stripe.net/Entities/Invoices/InvoiceLineItem.cs @@ -14,7 +14,7 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } @@ -47,7 +47,7 @@ public class InvoiceLineItem : StripeEntity, IHasId, IHasObject public bool Proration { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("subscription")] public string SubscriptionId { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs index 6f091b8145..171501aee8 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/Authorization.cs @@ -20,7 +20,7 @@ public class Authorization : StripeEntity, IHasId, IHasObject, IBalanceTransacti public string AuthorizationMethod { get; set; } [JsonProperty("authorized_amount")] - public int AuthorizedAmount { get; set; } + public long AuthorizedAmount { get; set; } [JsonProperty("authorized_currency")] public string AuthorizedCurrency { get; set; } @@ -51,7 +51,7 @@ internal object InternalCardholder public DateTime Created { get; set; } [JsonProperty("held_amount")] - public int HeldAmount { get; set; } + public long HeldAmount { get; set; } [JsonProperty("held_currency")] public string HeldCurrency { get; set; } @@ -69,10 +69,10 @@ internal object InternalCardholder public Dictionary Metadata { get; set; } [JsonProperty("pending_authorized_amount")] - public int PendingAuthorizedAmount { get; set; } + public long PendingAuthorizedAmount { get; set; } [JsonProperty("pending_held_amount")] - public int PendingHeldAmount { get; set; } + public long PendingHeldAmount { get; set; } [JsonProperty("request_history")] public List RequestHistory { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationControls.cs b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationControls.cs index 8fb13b7ca0..21aa72e89f 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationControls.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/AuthorizationControls.cs @@ -15,9 +15,9 @@ public class AuthorizationControls : StripeEntity public string Currency { get; set; } [JsonProperty("max_amount")] - public int MaxAmount { get; set; } + public long MaxAmount { get; set; } [JsonProperty("max_approvals")] - public int MaxApprovals { get; set; } + public long MaxApprovals { get; set; } } } diff --git a/src/Stripe.net/Entities/Issuing/Authorizations/RequestHistory.cs b/src/Stripe.net/Entities/Issuing/Authorizations/RequestHistory.cs index 5200851ddc..f2ce063f3b 100644 --- a/src/Stripe.net/Entities/Issuing/Authorizations/RequestHistory.cs +++ b/src/Stripe.net/Entities/Issuing/Authorizations/RequestHistory.cs @@ -10,7 +10,7 @@ public class RequestHistory : StripeEntity public bool Approved { get; set; } [JsonProperty("authorized_amount")] - public int AuthorizedAmount { get; set; } + public long AuthorizedAmount { get; set; } [JsonProperty("authorized_currency")] public string AuthorizedCurrency { get; set; } @@ -19,7 +19,7 @@ public class RequestHistory : StripeEntity public DateTime Created { get; set; } [JsonProperty("held_amount")] - public int HeldAmount { get; set; } + public long HeldAmount { get; set; } [JsonProperty("held_currency")] public string HeldCurrency { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Cards/Card.cs b/src/Stripe.net/Entities/Issuing/Cards/Card.cs index 47be5b0efb..6d74095888 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/Card.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/Card.cs @@ -29,10 +29,10 @@ public class Card : StripeEntity, IHasId, IHasObject public DateTime Created { get; set; } [JsonProperty("exp_month")] - public int ExpMonth { get; set; } + public long ExpMonth { get; set; } [JsonProperty("exp_year")] - public int ExpYear { get; set; } + public long ExpYear { get; set; } [JsonProperty("last4")] public string Last4 { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Cards/CardDetails.cs b/src/Stripe.net/Entities/Issuing/Cards/CardDetails.cs index 248b16f9d6..cf75bdd232 100644 --- a/src/Stripe.net/Entities/Issuing/Cards/CardDetails.cs +++ b/src/Stripe.net/Entities/Issuing/Cards/CardDetails.cs @@ -33,10 +33,10 @@ internal object InternalCard public string Cvc { get; set; } [JsonProperty("exp_month")] - public int ExpMonth { get; set; } + public long ExpMonth { get; set; } [JsonProperty("exp_year")] - public int ExpYear { get; set; } + public long ExpYear { get; set; } [JsonProperty("number")] public string Number { get; set; } diff --git a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs index 9e0ebbfcb3..cab80b1da4 100644 --- a/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs +++ b/src/Stripe.net/Entities/Issuing/Disputes/Dispute.cs @@ -14,7 +14,7 @@ public class Dispute : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } diff --git a/src/Stripe.net/Entities/Orders/Order.cs b/src/Stripe.net/Entities/Orders/Order.cs index baa0fa9627..f793be4079 100644 --- a/src/Stripe.net/Entities/Orders/Order.cs +++ b/src/Stripe.net/Entities/Orders/Order.cs @@ -17,10 +17,10 @@ public class Order : StripeEntity, IHasId, IHasObject /// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) representing the total amount for the order. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("amount_returned")] - public int? AmountReturned { get; set; } + public long? AmountReturned { get; set; } /// /// ID of the Connect Application that created the order. @@ -29,7 +29,7 @@ public class Order : StripeEntity, IHasId, IHasObject public string Application { get; set; } [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } #region Expandable Charge diff --git a/src/Stripe.net/Entities/Orders/OrderItem.cs b/src/Stripe.net/Entities/Orders/OrderItem.cs index e2636bcb74..b9723ecf6d 100644 --- a/src/Stripe.net/Entities/Orders/OrderItem.cs +++ b/src/Stripe.net/Entities/Orders/OrderItem.cs @@ -11,7 +11,7 @@ public class OrderItem : StripeEntity, IHasObject /// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) representing the total amount for the line item. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } /// /// Three-letter ISO currency code, in lowercase. Must be a supported currency. @@ -35,7 +35,7 @@ public class OrderItem : StripeEntity, IHasObject /// A positive integer representing the number of instances of parent that are included in this order item. Applicable/present only if type is sku. /// [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } /// /// The type of line item. One of sku, tax, shipping, or discount. diff --git a/src/Stripe.net/Entities/Orders/OrderReturn.cs b/src/Stripe.net/Entities/Orders/OrderReturn.cs index c0707520d7..9baebf79f2 100644 --- a/src/Stripe.net/Entities/Orders/OrderReturn.cs +++ b/src/Stripe.net/Entities/Orders/OrderReturn.cs @@ -17,7 +17,7 @@ public class OrderReturn : StripeEntity, IHasId, IHasObject /// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) representing the total amount for the returned line item. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } diff --git a/src/Stripe.net/Entities/Orders/ShippingMethod.cs b/src/Stripe.net/Entities/Orders/ShippingMethod.cs index 6b04bc7a16..b3ca999e19 100644 --- a/src/Stripe.net/Entities/Orders/ShippingMethod.cs +++ b/src/Stripe.net/Entities/Orders/ShippingMethod.cs @@ -11,7 +11,7 @@ public class ShippingMethod : StripeEntity /// A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a 0-decimal currency) representing the total amount for the line item. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } /// /// 3-letter ISO code representing the currency of the line item. diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs index deaff5201d..049ea8466a 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntent.cs @@ -17,13 +17,13 @@ public class PaymentIntent : StripeEntity, IHasId, IHasObject public List AllowedSourceTypes { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("amount_capturable")] - public int? AmountCapturable { get; set; } + public long? AmountCapturable { get; set; } [JsonProperty("amount_received")] - public int? AmountReceived { get; set; } + public long? AmountReceived { get; set; } #region Expandable Application public string ApplicationId { get; set; } @@ -42,7 +42,7 @@ internal object InternalApplication #endregion [JsonProperty("application_fee_amount")] - public int? ApplicationFeeAmount { get; set; } + public long? ApplicationFeeAmount { get; set; } [JsonProperty("canceled_at")] public DateTime? CanceledAt { get; set; } diff --git a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs index c41c05e428..dd079173ed 100644 --- a/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs +++ b/src/Stripe.net/Entities/PaymentIntents/PaymentIntentTransferData.cs @@ -6,7 +6,7 @@ namespace Stripe public class PaymentIntentTransferData : StripeEntity { [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } #region Expandable Destination (Account) public string DestinationId { get; set; } diff --git a/src/Stripe.net/Entities/Payouts/Payout.cs b/src/Stripe.net/Entities/Payouts/Payout.cs index 6557e5abb4..3c2feb2dd6 100644 --- a/src/Stripe.net/Entities/Payouts/Payout.cs +++ b/src/Stripe.net/Entities/Payouts/Payout.cs @@ -14,7 +14,7 @@ public class Payout : StripeEntity, IHasId, IHasObject, IBalanceTransactionSourc public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("arrival_date")] public DateTime ArrivalDate { get; set; } diff --git a/src/Stripe.net/Entities/Plans/Plan.cs b/src/Stripe.net/Entities/Plans/Plan.cs index ec18a32ce1..89844b8095 100644 --- a/src/Stripe.net/Entities/Plans/Plan.cs +++ b/src/Stripe.net/Entities/Plans/Plan.cs @@ -20,7 +20,7 @@ public class Plan : StripeEntity, IHasId, IHasObject public string AggregateUsage { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("billing_scheme")] public string BillingScheme { get; set; } @@ -41,7 +41,7 @@ public class Plan : StripeEntity, IHasId, IHasObject public string Interval { get; set; } [JsonProperty("interval_count")] - public int IntervalCount { get; set; } + public long IntervalCount { get; set; } [JsonProperty("livemode")] public bool Livemode { get; set; } @@ -83,7 +83,7 @@ internal object InternalProduct public PlanTransformUsage TransformUsage { get; set; } [JsonProperty("trial_period_days")] - public int? TrialPeriodDays { get; set; } + public long? TrialPeriodDays { get; set; } [JsonProperty("usage_type")] public string UsageType { get; set; } diff --git a/src/Stripe.net/Entities/Plans/PlanTier.cs b/src/Stripe.net/Entities/Plans/PlanTier.cs index 3ce8e0305c..b7b6332606 100644 --- a/src/Stripe.net/Entities/Plans/PlanTier.cs +++ b/src/Stripe.net/Entities/Plans/PlanTier.cs @@ -5,9 +5,9 @@ namespace Stripe public class PlanTier : StripeEntity { [JsonProperty("unit_amount")] - public int UnitAmount { get; set; } + public long UnitAmount { get; set; } [JsonProperty("up_to")] - public int? UpTo { get; set; } + public long? UpTo { get; set; } } } diff --git a/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs b/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs index 39aaec7645..a988d067fc 100644 --- a/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs +++ b/src/Stripe.net/Entities/Plans/PlanTransformUsage.cs @@ -5,7 +5,7 @@ namespace Stripe public class PlanTransformUsage : StripeEntity { [JsonProperty("divide_by")] - public int DivideBy { get; set; } + public long DivideBy { get; set; } [JsonProperty("round")] public string Round { get; set; } diff --git a/src/Stripe.net/Entities/Refunds/Refund.cs b/src/Stripe.net/Entities/Refunds/Refund.cs index 5295858c30..406a5ed353 100644 --- a/src/Stripe.net/Entities/Refunds/Refund.cs +++ b/src/Stripe.net/Entities/Refunds/Refund.cs @@ -14,7 +14,7 @@ public class Refund : StripeEntity, IHasId, IHasObject, IBalanceTransactionSourc public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } #region Expandable Balance Transaction public string BalanceTransactionId { get; set; } diff --git a/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs b/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs index d9b249d3dd..eafa9ce5b2 100644 --- a/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs +++ b/src/Stripe.net/Entities/Reporting/ReportTypes/ReportType.cs @@ -26,6 +26,6 @@ public class ReportType : StripeEntity, IHasId, IHasObject public DateTime Updated { get; set; } [JsonProperty("version")] - public int Version { get; set; } + public long Version { get; set; } } } diff --git a/src/Stripe.net/Entities/Skus/Inventory.cs b/src/Stripe.net/Entities/Skus/Inventory.cs index 28393c41fd..b17ddc6357 100644 --- a/src/Stripe.net/Entities/Skus/Inventory.cs +++ b/src/Stripe.net/Entities/Skus/Inventory.cs @@ -8,7 +8,7 @@ namespace Stripe public class Inventory : StripeEntity { [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("type")] public string Type { get; set; } diff --git a/src/Stripe.net/Entities/Skus/Sku.cs b/src/Stripe.net/Entities/Skus/Sku.cs index e32a0d3e88..af6a2cb1cf 100644 --- a/src/Stripe.net/Entities/Skus/Sku.cs +++ b/src/Stripe.net/Entities/Skus/Sku.cs @@ -77,7 +77,7 @@ public class Sku : StripeEntity, IHasId, IHasObject /// The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a 0-decimal currency). /// [JsonProperty("price")] - public int Price { get; set; } + public long Price { get; set; } #region Expandable Product diff --git a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs index 5ff7b32298..bea2613bcf 100644 --- a/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs +++ b/src/Stripe.net/Entities/SourceMandateNotifications/SourceMandateNotification.cs @@ -14,7 +14,7 @@ public class SourceMandateNotification : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } diff --git a/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs b/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs index 9fb9eb4206..eff854dedb 100644 --- a/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs +++ b/src/Stripe.net/Entities/SourceTransactions/SourceTransaction.cs @@ -14,7 +14,7 @@ public class SourceTransaction : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("created")] public DateTime Created { get; set; } diff --git a/src/Stripe.net/Entities/Sources/Source.cs b/src/Stripe.net/Entities/Sources/Source.cs index aa72f09be7..86e4ae61f4 100644 --- a/src/Stripe.net/Entities/Sources/Source.cs +++ b/src/Stripe.net/Entities/Sources/Source.cs @@ -19,7 +19,7 @@ public class Source : StripeEntity, IHasId, IHasObject, IPaymentSource /// Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single-use sources. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// The client secret of the source. Used for client-side polling using a publishable key. diff --git a/src/Stripe.net/Entities/Sources/SourceBitcoin.cs b/src/Stripe.net/Entities/Sources/SourceBitcoin.cs index 06309e6760..60afc0322e 100644 --- a/src/Stripe.net/Entities/Sources/SourceBitcoin.cs +++ b/src/Stripe.net/Entities/Sources/SourceBitcoin.cs @@ -8,16 +8,16 @@ public class SourceBitcoin : StripeEntity public string Address { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("amount_charged")] - public int AmountCharged { get; set; } + public long AmountCharged { get; set; } [JsonProperty("amount_received")] - public int AmountReceived { get; set; } + public long AmountReceived { get; set; } [JsonProperty("amount_returned")] - public int AmountReturned { get; set; } + public long AmountReturned { get; set; } [JsonProperty("uri")] public string Uri { get; set; } diff --git a/src/Stripe.net/Entities/Sources/SourceCard.cs b/src/Stripe.net/Entities/Sources/SourceCard.cs index 52dae89a60..99e77b8a3b 100644 --- a/src/Stripe.net/Entities/Sources/SourceCard.cs +++ b/src/Stripe.net/Entities/Sources/SourceCard.cs @@ -23,10 +23,10 @@ public class SourceCard : StripeEntity public string DynamicLast4 { get; set; } [JsonProperty("exp_month")] - public int ExpMonth { get; set; } + public long ExpMonth { get; set; } [JsonProperty("exp_year")] - public int ExpYear { get; set; } + public long ExpYear { get; set; } [JsonProperty("fingerprint")] public string Fingerprint { get; set; } diff --git a/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs b/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs index 731a0d194a..1da2892b71 100644 --- a/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs +++ b/src/Stripe.net/Entities/Sources/SourceCodeVerification.cs @@ -8,7 +8,7 @@ public class SourceCodeVerification : StripeEntity /// The number of attempts remaining to authenticate the source object with a verification code. /// [JsonProperty("attempts_remaining")] - public int AttemptsRemaining { get; set; } + public long AttemptsRemaining { get; set; } /// /// The status of the code verification, either pending, succeeded or failed. diff --git a/src/Stripe.net/Entities/Sources/SourceReceiver.cs b/src/Stripe.net/Entities/Sources/SourceReceiver.cs index e3cd22b9a8..07c65ec2b5 100644 --- a/src/Stripe.net/Entities/Sources/SourceReceiver.cs +++ b/src/Stripe.net/Entities/Sources/SourceReceiver.cs @@ -14,18 +14,18 @@ public class SourceReceiver : StripeEntity /// The total amount charged by you. The amount charged is expressed in the source’s currency. /// [JsonProperty("amount_charged")] - public int AmountCharged { get; set; } + public long AmountCharged { get; set; } /// /// The total amount received by the receiver source. AmountReceived = AmountReturned + AmountCharged is true at all times. The amount received is expressed in the source’s currency. /// [JsonProperty("amount_received")] - public int AmountReceived { get; set; } + public long AmountReceived { get; set; } /// /// The total amount that was returned to the customer. The amount returned is expressed in the source’s currency. /// [JsonProperty("amount_returned")] - public int AmountReturned { get; set; } + public long AmountReturned { get; set; } } } diff --git a/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs b/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs index de9fbcd928..fb6dda1256 100644 --- a/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs +++ b/src/Stripe.net/Entities/Sources/SourceThreeDSecure.cs @@ -68,13 +68,13 @@ public class SourceThreeDSecure : StripeEntity /// The expiration month of the card. /// [JsonProperty("exp_month")] - public int ExpMonth { get; set; } + public long ExpMonth { get; set; } /// /// The expiration year of the card. /// [JsonProperty("exp_year")] - public int ExpYear { get; set; } + public long ExpYear { get; set; } /// /// Uniquely identifies this particular card number. You can use this attribute to check whether two customers who've signed up with you are using the same card number, for example. diff --git a/src/Stripe.net/Entities/StripeList.cs b/src/Stripe.net/Entities/StripeList.cs index 79e039164f..9a36c11438 100644 --- a/src/Stripe.net/Entities/StripeList.cs +++ b/src/Stripe.net/Entities/StripeList.cs @@ -21,7 +21,7 @@ public class StripeList : StripeEntity, IHasObject, IEnumerable public bool HasMore { get; set; } [JsonProperty("total_count")] - public int TotalCount { get; set; } + public long TotalCount { get; set; } [JsonProperty("url")] public string Url { get; set; } diff --git a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs index 604898662f..3ec3a00617 100644 --- a/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs +++ b/src/Stripe.net/Entities/SubscriptionItems/SubscriptionItem.cs @@ -29,7 +29,7 @@ public class SubscriptionItem : StripeEntity, IHasId, IHasObject public Plan Plan { get; set; } [JsonProperty("quantity")] - public int Quantity { get; set; } + public long Quantity { get; set; } [JsonProperty("subscription")] public string Subscription { get; set; } diff --git a/src/Stripe.net/Entities/Subscriptions/Subscription.cs b/src/Stripe.net/Entities/Subscriptions/Subscription.cs index 7a4e6bad6a..6fa2573497 100644 --- a/src/Stripe.net/Entities/Subscriptions/Subscription.cs +++ b/src/Stripe.net/Entities/Subscriptions/Subscription.cs @@ -60,7 +60,7 @@ internal object InternalCustomer /// Number of days a customer has to pay invoices generated by this subscription. This value will be null for subscriptions where billing=charge_automatically. /// [JsonProperty("days_until_due")] - public int? DaysUntilDue { get; set; } + public long? DaysUntilDue { get; set; } [JsonProperty("discount")] public Discount Discount { get; set; } @@ -81,7 +81,7 @@ internal object InternalCustomer public Plan Plan { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("start")] public DateTime? Start { get; set; } diff --git a/src/Stripe.net/Entities/ThreeDSecure/ThreeDSecure.cs b/src/Stripe.net/Entities/ThreeDSecure/ThreeDSecure.cs index fd051ae9c6..f96ce54bf8 100644 --- a/src/Stripe.net/Entities/ThreeDSecure/ThreeDSecure.cs +++ b/src/Stripe.net/Entities/ThreeDSecure/ThreeDSecure.cs @@ -13,7 +13,7 @@ public class ThreeDSecure : StripeEntity, IHasId, IHasObject public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("authenticated")] public bool Authenticated { get; set; } diff --git a/src/Stripe.net/Entities/Topups/Topup.cs b/src/Stripe.net/Entities/Topups/Topup.cs index 2e6f25d515..b8ab591c6d 100644 --- a/src/Stripe.net/Entities/Topups/Topup.cs +++ b/src/Stripe.net/Entities/Topups/Topup.cs @@ -17,7 +17,7 @@ public class Topup : StripeEntity, IHasId, IHasObject, IBalanceTransactionSource /// A positive integer in the smallest currency unit (e.g., 100 cents to top up $1.00 or 100 to topup ¥100, a 0-decimal currency) representing how much to top up. The minimum amount is $0.50 US or equivalent in Top-up currency. /// [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } #region Expandable Balance Transaction diff --git a/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs b/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs index 65740d7d7c..87635b4860 100644 --- a/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs +++ b/src/Stripe.net/Entities/TransferReversals/TransferReversal.cs @@ -14,7 +14,7 @@ public class TransferReversal : StripeEntity, IHasId, IHasObject, IBalanceTransa public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } #region Expandable Balance Transaction public string BalanceTransactionId { get; set; } diff --git a/src/Stripe.net/Entities/Transfers/Transfer.cs b/src/Stripe.net/Entities/Transfers/Transfer.cs index 189717432d..16b9bca480 100644 --- a/src/Stripe.net/Entities/Transfers/Transfer.cs +++ b/src/Stripe.net/Entities/Transfers/Transfer.cs @@ -14,10 +14,10 @@ public class Transfer : StripeEntity, IHasId, IHasObject, IBalanceTransactionSou public string Object { get; set; } [JsonProperty("amount")] - public int Amount { get; set; } + public long Amount { get; set; } [JsonProperty("amount_reversed")] - public int AmountReversed { get; set; } + public long AmountReversed { get; set; } #region Expandable Balance Transaction public string BalanceTransactionId { get; set; } diff --git a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs index 31b31dccbc..e6157e35dc 100644 --- a/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs +++ b/src/Stripe.net/Entities/UsageRecordSummaries/UsageRecordSummary.cs @@ -25,6 +25,6 @@ public class UsageRecordSummary : StripeEntity, IHasId, IHasObject public string SubscriptionItemId { get; set; } [JsonProperty("total_usage")] - public int TotalUsage { get; set; } + public long TotalUsage { get; set; } } } diff --git a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs b/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs index 20ff00a15a..b38e1cba24 100644 --- a/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs +++ b/src/Stripe.net/Entities/UsageRecords/UsageRecord.cs @@ -16,7 +16,7 @@ public class UsageRecord : StripeEntity, IHasId, IHasObject public bool Livemode { get; set; } [JsonProperty("quantity")] - public int Quantity { get; set; } + public long Quantity { get; set; } [JsonProperty("subscription_item")] public string SubscriptionItem { get; set; } diff --git a/src/Stripe.net/Services/Account/AccountCardOptions.cs b/src/Stripe.net/Services/Account/AccountCardOptions.cs index d5174c9468..9be91ffaf4 100644 --- a/src/Stripe.net/Services/Account/AccountCardOptions.cs +++ b/src/Stripe.net/Services/Account/AccountCardOptions.cs @@ -15,10 +15,10 @@ public class AccountCardOptions : INestedOptions public bool? DefaultForCurrency { get; set; } [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } [JsonProperty("number")] public string Number { get; set; } diff --git a/src/Stripe.net/Services/Account/AccountDobOptions.cs b/src/Stripe.net/Services/Account/AccountDobOptions.cs index 976a076662..42b89f6937 100644 --- a/src/Stripe.net/Services/Account/AccountDobOptions.cs +++ b/src/Stripe.net/Services/Account/AccountDobOptions.cs @@ -5,12 +5,12 @@ namespace Stripe public class AccountDobOptions : INestedOptions { [JsonProperty("day")] - public int? Day { get; set; } + public long? Day { get; set; } [JsonProperty("month")] - public int? Month { get; set; } + public long? Month { get; set; } [JsonProperty("year")] - public int? Year { get; set; } + public long? Year { get; set; } } } diff --git a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs index d7a0b57085..cea947c255 100644 --- a/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs +++ b/src/Stripe.net/Services/ApplicationFeeRefunds/ApplicationFeeRefundCreateOptions.cs @@ -6,7 +6,7 @@ namespace Stripe public class ApplicationFeeRefundCreateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("metadata")] public Dictionary Metadata { get; set; } diff --git a/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs b/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs index 2c97be27fc..fd70b33faf 100644 --- a/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs +++ b/src/Stripe.net/Services/BankAccounts/BankAccountVerifyOptions.cs @@ -5,6 +5,6 @@ namespace Stripe public class BankAccountVerifyOptions : BaseOptions { [JsonProperty("amounts")] - public int[] Amounts { get; set; } + public long[] Amounts { get; set; } } } diff --git a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs index 5cb2fb8d61..984c119e42 100644 --- a/src/Stripe.net/Services/Cards/CardUpdateOptions.cs +++ b/src/Stripe.net/Services/Cards/CardUpdateOptions.cs @@ -6,10 +6,10 @@ namespace Stripe public class CardUpdateOptions : BaseOptions { [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } [JsonProperty("name")] public string Name { get; set; } diff --git a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs index 8fb90e782e..43196f35e1 100644 --- a/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCaptureOptions.cs @@ -9,13 +9,13 @@ public class ChargeCaptureOptions : BaseOptions /// Amount to capture on the authorization /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account (using RequestOptions available on all service methods), using the Stripe-Account header, an OAuth key, or the destination parameter. For more information, see the application fees documentation. /// [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } /// /// An optional dictionary containing a new destination amount to use. Can only be used with destination charges created with Stripe Connect. diff --git a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs index 32e5b0ea98..3e189d75e4 100644 --- a/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeCreateOptions.cs @@ -10,7 +10,7 @@ public class ChargeCreateOptions : BaseOptions /// A positive integer in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a 0-decimal currency) representing how much to charge the card. The minimum amount is $0.50 US or equivalent in charge currency. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// 3-letter ISO code for currency. @@ -22,7 +22,7 @@ public class ChargeCreateOptions : BaseOptions /// A fee in cents that will be applied to the charge and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account (using RequestOptions available on all service methods), using the Stripe-Account header, an OAuth key, or the destination parameter. For more information, see the application fees documentation. /// [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } /// /// Whether or not to immediately capture the charge. When false, the charge issues an authorization (or pre-authorization), and will need to be captured later. Uncaptured charges expire in 7 days. For more information, see authorizing charges and settling later. diff --git a/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs b/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs index b8e6b2cfd1..4b25589632 100644 --- a/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeDestinationOptions.cs @@ -8,6 +8,6 @@ public class ChargeDestinationOptions : INestedOptions /// The amount to transfer to the destination account. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs b/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs index 7657ea27bd..e9aea49c8a 100644 --- a/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs +++ b/src/Stripe.net/Services/Charges/ChargeLevel3LineItemOptions.cs @@ -5,7 +5,7 @@ namespace Stripe public class ChargeLevel3LineItemOptions : INestedOptions { [JsonProperty("discount_amount")] - public int? DiscountAmount { get; set; } + public long? DiscountAmount { get; set; } [JsonProperty("product_code")] public string ProductCode { get; set; } @@ -14,12 +14,12 @@ public class ChargeLevel3LineItemOptions : INestedOptions public string ProductDescription { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("tax_amount")] - public int? TaxAmount { get; set; } + public long? TaxAmount { get; set; } [JsonProperty("unit_cost")] - public int? UnitCost { get; set; } + public long? UnitCost { get; set; } } } diff --git a/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs b/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs index d08346e59a..1fcd92c5b7 100644 --- a/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs +++ b/src/Stripe.net/Services/Charges/ChargeLevel3Options.cs @@ -21,6 +21,6 @@ public class ChargeLevel3Options : INestedOptions public string ShippingFromZip { get; set; } [JsonProperty("shipping_amount")] - public int? ShippingAmount { get; set; } + public long? ShippingAmount { get; set; } } } diff --git a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs index e4add32b56..fdc8571595 100644 --- a/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs +++ b/src/Stripe.net/Services/Coupons/CouponCreateOptions.cs @@ -11,7 +11,7 @@ public class CouponCreateOptions : BaseOptions public string Id { get; set; } [JsonProperty("amount_off")] - public int? AmountOff { get; set; } + public long? AmountOff { get; set; } [JsonProperty("currency")] public string Currency { get; set; } @@ -23,10 +23,10 @@ public class CouponCreateOptions : BaseOptions public string Duration { get; set; } [JsonProperty("duration_in_months")] - public int? DurationInMonths { get; set; } + public long? DurationInMonths { get; set; } [JsonProperty("max_redemptions")] - public int? MaxRedemptions { get; set; } + public long? MaxRedemptions { get; set; } [JsonProperty("metadata")] public Dictionary Metadata { get; set; } diff --git a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs index 127238576d..cbb23f49c1 100644 --- a/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerCreateOptions.cs @@ -8,7 +8,7 @@ namespace Stripe public class CustomerCreateOptions : BaseOptions { [JsonProperty("account_balance")] - public int? AccountBalance { get; set; } + public long? AccountBalance { get; set; } [JsonProperty("coupon")] public string CouponId { get; set; } @@ -29,7 +29,7 @@ public class CustomerCreateOptions : BaseOptions public string PlanId { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("shipping")] public ShippingOptions Shipping { get; set; } diff --git a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs index 40eca72d28..45c7d363b4 100644 --- a/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs +++ b/src/Stripe.net/Services/Customers/CustomerUpdateOptions.cs @@ -7,7 +7,7 @@ namespace Stripe public class CustomerUpdateOptions : BaseOptions { [JsonProperty("account_balance")] - public int? AccountBalance { get; set; } + public long? AccountBalance { get; set; } [JsonProperty("source")] public string SourceToken { get; set; } diff --git a/src/Stripe.net/Services/Events/EventUtility.cs b/src/Stripe.net/Services/Events/EventUtility.cs index 9fcf62c915..34292a5ff1 100644 --- a/src/Stripe.net/Services/Events/EventUtility.cs +++ b/src/Stripe.net/Services/Events/EventUtility.cs @@ -23,12 +23,12 @@ public static T ParseEventDataItem(dynamic dataItem) return JsonConvert.DeserializeObject((dataItem as JObject).ToString()); } - public static Event ConstructEvent(string json, string stripeSignatureHeader, string secret, int tolerance = 300) + public static Event ConstructEvent(string json, string stripeSignatureHeader, string secret, long tolerance = 300) { return ConstructEvent(json, stripeSignatureHeader, secret, tolerance, DateTime.UtcNow.ConvertDateTimeToEpoch()); } - public static Event ConstructEvent(string json, string stripeSignatureHeader, string secret, int tolerance, long utcNow) + public static Event ConstructEvent(string json, string stripeSignatureHeader, string secret, long tolerance, long utcNow) { var signatureItems = ParseStripeSignature(stripeSignatureHeader); var signature = string.Empty; diff --git a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountCardUpdateOptions.cs b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountCardUpdateOptions.cs index 1d3b14f104..db32eacc0f 100644 --- a/src/Stripe.net/Services/ExternalAccounts/ExternalAccountCardUpdateOptions.cs +++ b/src/Stripe.net/Services/ExternalAccounts/ExternalAccountCardUpdateOptions.cs @@ -9,10 +9,10 @@ public class ExternalAccountCardUpdateOptions : INestedOptions public bool? DefaultForCurrency { get; set; } [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } [JsonProperty("address_city")] public string AddressCity { get; set; } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs index 44a4042171..6b7c0923e1 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemCreateOptions.cs @@ -6,7 +6,7 @@ namespace Stripe public class InvoiceItemCreateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } @@ -27,12 +27,12 @@ public class InvoiceItemCreateOptions : BaseOptions public Dictionary Metadata { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("subscription")] public string SubscriptionId { get; set; } [JsonProperty("unit_amount")] - public int? UnitAmount { get; set; } + public long? UnitAmount { get; set; } } } diff --git a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs index 071decc949..fa4757f7ce 100644 --- a/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs +++ b/src/Stripe.net/Services/InvoiceItems/InvoiceItemUpdateOptions.cs @@ -6,7 +6,7 @@ namespace Stripe public class InvoiceItemUpdateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("description")] public string Description { get; set; } @@ -18,9 +18,9 @@ public class InvoiceItemUpdateOptions : BaseOptions public Dictionary Metadata { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("unit_amount")] - public int? UnitAmount { get; set; } + public long? UnitAmount { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs index dad4343c85..f00f19bfbb 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceCreateOptions.cs @@ -14,7 +14,7 @@ public class InvoiceCreateOptions : BaseOptions /// fees documentation. /// [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } /// /// One of . When charging automatically, Stripe will attempt to pay @@ -36,7 +36,7 @@ public class InvoiceCreateOptions : BaseOptions /// invoices where billing=send_invoice. /// [JsonProperty("days_until_due")] - public int? DaysUntilDue { get; set; } + public long? DaysUntilDue { get; set; } [JsonProperty("description")] public string Description { get; set; } diff --git a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs index 3d77210910..bc4ef02f91 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceSubscriptionItemOptions.cs @@ -14,6 +14,6 @@ public class InvoiceSubscriptionItemOptions : BaseOptions public string PlanId { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpcomingInvoiceItemOption.cs b/src/Stripe.net/Services/Invoices/InvoiceUpcomingInvoiceItemOption.cs index 4e0f516df8..b200538964 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpcomingInvoiceItemOption.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpcomingInvoiceItemOption.cs @@ -6,7 +6,7 @@ namespace Stripe public class InvoiceUpcomingInvoiceItemOption : INestedOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } diff --git a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs index e744ca08d2..1825ea90b0 100644 --- a/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs +++ b/src/Stripe.net/Services/Invoices/InvoiceUpdateOptions.cs @@ -8,7 +8,7 @@ namespace Stripe public class InvoiceUpdateOptions : BaseOptions { [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } [JsonProperty("closed")] public bool? Closed { get; set; } diff --git a/src/Stripe.net/Services/Issuing/Cards/AuthorizationControlsOptions.cs b/src/Stripe.net/Services/Issuing/Cards/AuthorizationControlsOptions.cs index f143e80490..6a3e097581 100644 --- a/src/Stripe.net/Services/Issuing/Cards/AuthorizationControlsOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/AuthorizationControlsOptions.cs @@ -12,9 +12,9 @@ public class AuthorizationControlsOptions : INestedOptions public List BlockedCategories { get; set; } [JsonProperty("max_amount")] - public int? MaxAmount { get; set; } + public long? MaxAmount { get; set; } [JsonProperty("max_approvals")] - public int? MaxApprovals { get; set; } + public long? MaxApprovals { get; set; } } } diff --git a/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs b/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs index bfa8e23363..8deca8853f 100644 --- a/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs +++ b/src/Stripe.net/Services/Issuing/Cards/CardListOptions.cs @@ -8,10 +8,10 @@ public class CardListOptions : ListOptionsWithCreated public string CardholderId { get; set; } [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } [JsonProperty("last4")] public string Last4 { get; set; } diff --git a/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs b/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs index 63e7e381da..b1914791cd 100644 --- a/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs +++ b/src/Stripe.net/Services/Issuing/Disputes/DisputeCreateOptions.cs @@ -6,7 +6,7 @@ namespace Stripe.Issuing public class DisputeCreateOptions : CardholderSharedOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("disputed_transaction")] public string DisputedTransactionId { get; set; } diff --git a/src/Stripe.net/Services/ListOptions.cs b/src/Stripe.net/Services/ListOptions.cs index 117ddd07d6..96039924c4 100644 --- a/src/Stripe.net/Services/ListOptions.cs +++ b/src/Stripe.net/Services/ListOptions.cs @@ -8,7 +8,7 @@ public class ListOptions : BaseOptions /// A limit on the number of objects to be returned. Limit can range between 1 and 100 items. /// [JsonProperty("limit")] - public int? Limit { get; set; } + public long? Limit { get; set; } /// /// A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list. diff --git a/src/Stripe.net/Services/Orders/OrderItemOptions.cs b/src/Stripe.net/Services/Orders/OrderItemOptions.cs index 993a14bd41..219317233e 100644 --- a/src/Stripe.net/Services/Orders/OrderItemOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderItemOptions.cs @@ -5,7 +5,7 @@ namespace Stripe public class OrderItemOptions : INestedOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } @@ -23,7 +23,7 @@ public class OrderItemOptions : INestedOptions /// The quantity of this order item. When type is sku, this is the number of instances of the SKU to be ordered. /// [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("type")] public string Type { get; set; } diff --git a/src/Stripe.net/Services/Orders/OrderPayOptions.cs b/src/Stripe.net/Services/Orders/OrderPayOptions.cs index f643c330f0..b50f8f35e8 100644 --- a/src/Stripe.net/Services/Orders/OrderPayOptions.cs +++ b/src/Stripe.net/Services/Orders/OrderPayOptions.cs @@ -21,7 +21,7 @@ public class OrderPayOptions : BaseOptions /// A fee in cents that will be applied to the order and transferred to the application owner's Stripe account. To use an application fee, the request must be made on behalf of another account, using the Stripe-Account header or OAuth key. For more information, see the application fees documentation. /// [JsonProperty("application_fee")] - public int? ApplicationFee { get; set; } + public long? ApplicationFee { get; set; } /// /// The email address of the customer placing the order. If a customer is specified, that customer's email address will be used. diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs index 259b689942..54cc60fd00 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentCaptureOptions.cs @@ -6,10 +6,10 @@ namespace Stripe public class PaymentIntentCaptureOptions : BaseOptions { [JsonProperty("amount_to_capture")] - public int? AmountToCapture { get; set; } + public long? AmountToCapture { get; set; } [JsonProperty("application_fee_amount")] - public int? ApplicationFeeAmount { get; set; } + public long? ApplicationFeeAmount { get; set; } [JsonProperty("transfer_data")] public PaymentIntentTransferDataOptions TransferData { get; set; } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentSharedOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentSharedOptions.cs index 360ab0e536..132e087178 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentSharedOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentSharedOptions.cs @@ -6,10 +6,10 @@ namespace Stripe public class PaymentIntentSharedOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("application_fee_amount")] - public int? ApplicationFeeAmount { get; set; } + public long? ApplicationFeeAmount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } diff --git a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs index c980ea8b17..4d2c57ddba 100644 --- a/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs +++ b/src/Stripe.net/Services/PaymentIntents/PaymentIntentTransferDataOptions.cs @@ -5,7 +5,7 @@ namespace Stripe public class PaymentIntentTransferDataOptions : INestedOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } // This is only available on creation and not update [JsonProperty("destination")] diff --git a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs index a0f01e9b61..56fd961716 100644 --- a/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs +++ b/src/Stripe.net/Services/Payouts/PayoutCreateOptions.cs @@ -9,7 +9,7 @@ public class PayoutCreateOptions : BaseOptions /// REQUIRED /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// REQUIRED diff --git a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs index c4b198a438..0d13ad7e96 100644 --- a/src/Stripe.net/Services/Plans/PlanCreateOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanCreateOptions.cs @@ -15,7 +15,7 @@ public class PlanCreateOptions : BaseOptions public string AggregateUsage { get; set; } [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("billing_scheme")] public string BillingScheme { get; set; } @@ -27,7 +27,7 @@ public class PlanCreateOptions : BaseOptions public string Interval { get; set; } [JsonProperty("interval_count")] - public int? IntervalCount { get; set; } + public long? IntervalCount { get; set; } [JsonProperty("metadata")] public Dictionary Metadata { get; set; } @@ -51,7 +51,7 @@ public class PlanCreateOptions : BaseOptions public PlanTransformUsageOptions TransformUsage { get; set; } [JsonProperty("trial_period_days")] - public int? TrialPeriodDays { get; set; } + public long? TrialPeriodDays { get; set; } [JsonProperty("usage_type")] public string UsageType { get; set; } diff --git a/src/Stripe.net/Services/Plans/PlanTierOptions.cs b/src/Stripe.net/Services/Plans/PlanTierOptions.cs index 6ddb9458cb..5821edc2ce 100644 --- a/src/Stripe.net/Services/Plans/PlanTierOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanTierOptions.cs @@ -7,7 +7,7 @@ namespace Stripe public class PlanTierOptions : INestedOptions { [JsonProperty("unit_amount")] - public int? UnitAmount { get; set; } + public long? UnitAmount { get; set; } #region UpTo public UpToOption UpTo { get; set; } @@ -26,7 +26,7 @@ public class UpToInf : UpToOption public class UpToBound : UpToOption { - public int Bound { get; set; } + public long Bound { get; set; } } } } diff --git a/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs b/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs index 491a3d7509..df3b9fbb7a 100644 --- a/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs +++ b/src/Stripe.net/Services/Plans/PlanTransformUsageOptions.cs @@ -5,7 +5,7 @@ namespace Stripe public class PlanTransformUsageOptions : INestedOptions { [JsonProperty("divide_by")] - public int? DivideBy { get; set; } + public long? DivideBy { get; set; } [JsonProperty("round")] public string Round { get; set; } diff --git a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs index 1ed2a1d24f..4604dde10d 100644 --- a/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs +++ b/src/Stripe.net/Services/Refunds/RefundCreateOptions.cs @@ -10,7 +10,7 @@ public class RefundCreateOptions : BaseOptions /// only up to the remaining, unrefunded amount of the charge. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// REQUIRED. The identifier of the charge to refund. diff --git a/src/Stripe.net/Services/Skus/InventoryOptions.cs b/src/Stripe.net/Services/Skus/InventoryOptions.cs index 94dbee7b1c..659ab40378 100644 --- a/src/Stripe.net/Services/Skus/InventoryOptions.cs +++ b/src/Stripe.net/Services/Skus/InventoryOptions.cs @@ -6,7 +6,7 @@ namespace Stripe public class InventoryOptions : INestedOptions { [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } [JsonProperty("type")] public string Type { get; set; } diff --git a/src/Stripe.net/Services/Skus/SkuSharedOptions.cs b/src/Stripe.net/Services/Skus/SkuSharedOptions.cs index 9dd50b6312..d165b0a1a6 100644 --- a/src/Stripe.net/Services/Skus/SkuSharedOptions.cs +++ b/src/Stripe.net/Services/Skus/SkuSharedOptions.cs @@ -52,7 +52,7 @@ public abstract class SkuSharedOptions : BaseOptions /// The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a 0-decimal currency). /// [JsonProperty("price")] - public int? Price { get; set; } + public long? Price { get; set; } /// /// The ID of the product this SKU is associated with. The product must be currently active. diff --git a/src/Stripe.net/Services/Sources/SourceCardUpdateOptions.cs b/src/Stripe.net/Services/Sources/SourceCardUpdateOptions.cs index ddbb5c668f..05637e31cb 100644 --- a/src/Stripe.net/Services/Sources/SourceCardUpdateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceCardUpdateOptions.cs @@ -5,9 +5,9 @@ namespace Stripe public class SourceCardUpdateOptions : INestedOptions { [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } } } diff --git a/src/Stripe.net/Services/Sources/SourceCreateOptions.cs b/src/Stripe.net/Services/Sources/SourceCreateOptions.cs index 091528f6e3..52ae08a560 100644 --- a/src/Stripe.net/Services/Sources/SourceCreateOptions.cs +++ b/src/Stripe.net/Services/Sources/SourceCreateOptions.cs @@ -18,7 +18,7 @@ public class SourceCreateOptions : BaseOptions /// Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single-use sources. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// The currency associated with the source. This is the currency for which the source will be chargeable once ready. diff --git a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemSharedOptions.cs b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemSharedOptions.cs index 7666b21817..1a86f88c05 100644 --- a/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemSharedOptions.cs +++ b/src/Stripe.net/Services/SubscriptionItems/SubscriptionItemSharedOptions.cs @@ -28,6 +28,6 @@ public abstract class SubscriptionItemSharedOptions : BaseOptions /// The quantity you’d like to apply to the subscription item you’re creating. /// [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs index 2d6bbf0f89..1f35494eb5 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionCreateOptions.cs @@ -29,6 +29,6 @@ public class SubscriptionCreateOptions : SubscriptionSharedOptions /// Integer representing the number of trial period days before the customer is charged for the first time. /// [JsonProperty("trial_period_days")] - public int? TrialPeriodDays { get; set; } + public long? TrialPeriodDays { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOption.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOption.cs index e05321d5ed..b6683ecb68 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemOption.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemOption.cs @@ -14,6 +14,6 @@ public class SubscriptionItemOption : INestedOptions /// Quantity for this item. /// [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionItemUpdateOption.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionItemUpdateOption.cs index 101390e2d5..86133e5c2d 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionItemUpdateOption.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionItemUpdateOption.cs @@ -39,6 +39,6 @@ public class SubscriptionItemUpdateOption : INestedOptions /// Quantity for this item. /// [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/Subscriptions/SubscriptionSharedOptions.cs b/src/Stripe.net/Services/Subscriptions/SubscriptionSharedOptions.cs index 7b4d54fff4..339ab84b5e 100644 --- a/src/Stripe.net/Services/Subscriptions/SubscriptionSharedOptions.cs +++ b/src/Stripe.net/Services/Subscriptions/SubscriptionSharedOptions.cs @@ -29,7 +29,7 @@ public abstract class SubscriptionSharedOptions : BaseOptions /// Number of days a customer has to pay invoices generated by this subscription. Only valid for subscriptions where billing=send_invoice. /// [JsonProperty("days_until_due")] - public int? DaysUntilDue { get; set; } + public long? DaysUntilDue { get; set; } /// /// A set of key/value pairs that you can attach to a subscription object. It can be useful for storing additional information about the subscription in a structured format. @@ -74,6 +74,6 @@ public abstract class SubscriptionSharedOptions : BaseOptions [Obsolete("Use Items")] [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/ThreeDSecure/ThreeDSecureCreateOptions.cs b/src/Stripe.net/Services/ThreeDSecure/ThreeDSecureCreateOptions.cs index 53604c37c3..44d99f418d 100644 --- a/src/Stripe.net/Services/ThreeDSecure/ThreeDSecureCreateOptions.cs +++ b/src/Stripe.net/Services/ThreeDSecure/ThreeDSecureCreateOptions.cs @@ -5,7 +5,7 @@ namespace Stripe public class ThreeDSecureCreateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } diff --git a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs index fb55937d63..bcc07b0fe5 100644 --- a/src/Stripe.net/Services/Topups/TopupCreateOptions.cs +++ b/src/Stripe.net/Services/Topups/TopupCreateOptions.cs @@ -10,7 +10,7 @@ public class TopupCreateOptions : BaseOptions /// A positive integer in the smallest currency unit (e.g., 100 cents to top up $1.00 or 100 to top up ¥100, a 0-decimal currency) representing how much to top up your Stripe balance. /// [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } /// /// 3-letter ISO code for currency. diff --git a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs index 037c553c59..c5fc675a09 100644 --- a/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs +++ b/src/Stripe.net/Services/TransferReversals/TransferReversalCreateOptions.cs @@ -7,7 +7,7 @@ namespace Stripe public class TransferReversalCreateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("description")] public string Description { get; set; } diff --git a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs index dffd48f31b..478d4149cd 100644 --- a/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs +++ b/src/Stripe.net/Services/Transfers/TransferCreateOptions.cs @@ -7,7 +7,7 @@ namespace Stripe public class TransferCreateOptions : BaseOptions { [JsonProperty("amount")] - public int? Amount { get; set; } + public long? Amount { get; set; } [JsonProperty("currency")] public string Currency { get; set; } diff --git a/src/Stripe.net/Services/UsageRecords/UsageRecordCreateOptions.cs b/src/Stripe.net/Services/UsageRecords/UsageRecordCreateOptions.cs index 7fb008e6c4..a63606e252 100644 --- a/src/Stripe.net/Services/UsageRecords/UsageRecordCreateOptions.cs +++ b/src/Stripe.net/Services/UsageRecords/UsageRecordCreateOptions.cs @@ -17,6 +17,6 @@ public class UsageRecordCreateOptions : BaseOptions public DateTime? Timestamp { get; set; } [JsonProperty("quantity")] - public int? Quantity { get; set; } + public long? Quantity { get; set; } } } diff --git a/src/Stripe.net/Services/_refactor/CardCreateNestedOptions.cs b/src/Stripe.net/Services/_refactor/CardCreateNestedOptions.cs index f1e58e9308..f8c6efed77 100644 --- a/src/Stripe.net/Services/_refactor/CardCreateNestedOptions.cs +++ b/src/Stripe.net/Services/_refactor/CardCreateNestedOptions.cs @@ -58,13 +58,13 @@ public class CardCreateNestedOptions : INestedOptions /// REQUIRED: Two digit number representing the card's expiration month. /// [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } /// /// REQUIRED: Two or four digit number representing the card's expiration year. /// [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } /// /// A set of key/value pairs that you can attach to a card object. It can be useful for storing additional information about the card in a structured format. diff --git a/src/Stripe.net/Services/_refactor/CreditCardOptions.cs b/src/Stripe.net/Services/_refactor/CreditCardOptions.cs index 2ff64fcbc9..d5860435ab 100644 --- a/src/Stripe.net/Services/_refactor/CreditCardOptions.cs +++ b/src/Stripe.net/Services/_refactor/CreditCardOptions.cs @@ -5,10 +5,10 @@ namespace Stripe public class CreditCardOptions : BaseOptions, INestedOptions { [JsonProperty("exp_month")] - public int? ExpMonth { get; set; } + public long? ExpMonth { get; set; } [JsonProperty("exp_year")] - public int? ExpYear { get; set; } + public long? ExpYear { get; set; } [JsonProperty("number")] public string Number { get; set; } diff --git a/src/StripeTests/Infrastructure/JsonConverters/AbstractStripeObjectConverterTest.cs b/src/StripeTests/Infrastructure/JsonConverters/AbstractStripeObjectConverterTest.cs index 7a4e8b7163..e217813efd 100644 --- a/src/StripeTests/Infrastructure/JsonConverters/AbstractStripeObjectConverterTest.cs +++ b/src/StripeTests/Infrastructure/JsonConverters/AbstractStripeObjectConverterTest.cs @@ -35,13 +35,13 @@ public void InstantiatesAFoo() [Fact] public void InstantiatesABar() { - var json = "{\"object\": \"bar\", \"some_int\": 42}"; + var json = "{\"object\": \"bar\", \"some_long\": 42}"; var obj = JsonConvert.DeserializeObject(json, this.converter); Assert.IsType(obj); Assert.Equal("bar", obj.Object); - Assert.Equal(42, ((Bar)obj).SomeInt); + Assert.Equal(42, ((Bar)obj).SomeLong); } [Fact] @@ -68,8 +68,8 @@ private class Bar : IFooOrBar [JsonProperty("object")] public string Object { get; set; } - [JsonProperty("some_int")] - public int SomeInt { get; set; } + [JsonProperty("some_long")] + public long SomeLong { get; set; } } private class FooOrBarConverter : AbstractStripeObjectConverter diff --git a/src/StripeTests/Infrastructure/ParameterBuilderTest.cs b/src/StripeTests/Infrastructure/ParameterBuilderTest.cs index fded8c8f53..e060580ab2 100644 --- a/src/StripeTests/Infrastructure/ParameterBuilderTest.cs +++ b/src/StripeTests/Infrastructure/ParameterBuilderTest.cs @@ -37,7 +37,7 @@ public void EncodesList() var testObject = new TestOptionsWithList(); var url = this.service.ApplyAllParameters(testObject, string.Empty, false); - Assert.Equal("?some_list[0][an_int]=1&some_list[0][a_string]=foo&some_list[1][an_int]=2&some_list[1][a_string]=bar", url); + Assert.Equal("?some_list[0][a_long]=1&some_list[0][a_string]=foo&some_list[1][a_long]=2&some_list[1][a_string]=bar", url); } [Fact] @@ -179,24 +179,6 @@ public void EncodesParameters() want = "?enum=TestTwo" }, - // Int - new - { - data = new TestOptions - { - Int = 123, - }, - want = "?int=123" - }, - new - { - data = new TestOptions - { - Int = 0, - }, - want = "?int=0" - }, - // List new { @@ -235,6 +217,24 @@ public void EncodesParameters() want = "?list[0][foo]=bar&list[1][foo]=baz" }, + // Long + new + { + data = new TestOptions + { + Long = 123, + }, + want = "?long=123" + }, + new + { + data = new TestOptions + { + Long = 0, + }, + want = "?long=0" + }, + // String new { diff --git a/src/StripeTests/Infrastructure/TestData/TestNestedOptions.cs b/src/StripeTests/Infrastructure/TestData/TestNestedOptions.cs index d0f250943e..c03e95a878 100644 --- a/src/StripeTests/Infrastructure/TestData/TestNestedOptions.cs +++ b/src/StripeTests/Infrastructure/TestData/TestNestedOptions.cs @@ -7,8 +7,8 @@ namespace StripeTests.Infrastructure.TestData public class TestNestedOptions : INestedOptions { - [JsonProperty("an_int")] - public int? AnInt { get; set; } + [JsonProperty("a_long")] + public long? ALong { get; set; } [JsonProperty("a_string")] public string AString { get; set; } diff --git a/src/StripeTests/Infrastructure/TestData/TestObjectDateTime.cs b/src/StripeTests/Infrastructure/TestData/TestObjectDateTime.cs index c5f81eaa9f..f5c4c790bf 100644 --- a/src/StripeTests/Infrastructure/TestData/TestObjectDateTime.cs +++ b/src/StripeTests/Infrastructure/TestData/TestObjectDateTime.cs @@ -6,7 +6,6 @@ namespace StripeTests.Infrastructure.TestData public class TestObjectDateTime { - [JsonConverter(typeof(DateTimeConverter))] public DateTime? Date { get; set; } } } diff --git a/src/StripeTests/Infrastructure/TestData/TestOptions.cs b/src/StripeTests/Infrastructure/TestData/TestOptions.cs index 20d2805569..c3849cc59f 100644 --- a/src/StripeTests/Infrastructure/TestData/TestOptions.cs +++ b/src/StripeTests/Infrastructure/TestData/TestOptions.cs @@ -44,12 +44,12 @@ public enum TestEnum [JsonProperty("enum")] public TestEnum? Enum { get; set; } - [JsonProperty("int")] - public int? Int { get; set; } - [JsonProperty("list")] public List List { get; set; } + [JsonProperty("long")] + public long? Long { get; set; } + [JsonProperty("string")] public string String { get; set; } } diff --git a/src/StripeTests/Infrastructure/TestData/TestOptionsWithList.cs b/src/StripeTests/Infrastructure/TestData/TestOptionsWithList.cs index 8d4084985d..1834d0f0ea 100644 --- a/src/StripeTests/Infrastructure/TestData/TestOptionsWithList.cs +++ b/src/StripeTests/Infrastructure/TestData/TestOptionsWithList.cs @@ -13,12 +13,12 @@ public TestOptionsWithList() { new TestNestedOptions { - AnInt = 1, + ALong = 1, AString = "foo", }, new TestNestedOptions { - AnInt = 2, + ALong = 2, AString = "bar", }, }; diff --git a/src/StripeTests/Infrastructure/TestData/TestUnencodableOptions.cs b/src/StripeTests/Infrastructure/TestData/TestUnencodableOptions.cs deleted file mode 100644 index d6c8320e39..0000000000 --- a/src/StripeTests/Infrastructure/TestData/TestUnencodableOptions.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace StripeTests.Infrastructure.TestData -{ - using System.Collections.Generic; - using Newtonsoft.Json; - using Stripe; - - public class TestUnencodableOptions : BaseOptions - { - public TestUnencodableOptions() - { - } - - [JsonProperty("dict_int_keys")] - public Dictionary DictIntKeys { get; set; } - - [JsonProperty("dict_int_values")] - public Dictionary DictIntValues { get; set; } - } -} diff --git a/src/StripeTests/Services/BankAccounts/BankAccountServiceTest.cs b/src/StripeTests/Services/BankAccounts/BankAccountServiceTest.cs index 70c6821a3a..b33d1287af 100644 --- a/src/StripeTests/Services/BankAccounts/BankAccountServiceTest.cs +++ b/src/StripeTests/Services/BankAccounts/BankAccountServiceTest.cs @@ -54,7 +54,7 @@ public BankAccountServiceTest() this.verifyOptions = new BankAccountVerifyOptions { - Amounts = new int[] + Amounts = new long[] { 32, 45, diff --git a/src/StripeTests/Services/Events/EventUtilityTest.cs b/src/StripeTests/Services/Events/EventUtilityTest.cs index 614b488a5c..17a5a92a37 100644 --- a/src/StripeTests/Services/Events/EventUtilityTest.cs +++ b/src/StripeTests/Services/Events/EventUtilityTest.cs @@ -5,7 +5,7 @@ namespace StripeTests public class EventUtilityTest : BaseStripeTest { - private int eventTimestamp; + private long eventTimestamp; private string signature; private string json; private string secret;