Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use longs instead of ints #1331

Merged
merged 1 commit into from
Oct 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Stripe.net/Entities/Accounts/BirthDay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Accounts/PayoutSchedule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/ApplicationFees/ApplicationFee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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<Fee> FeeDetails { get; set; }

[JsonProperty("net")]
public int Net { get; set; }
public long Net { get; set; }

#region Expandable Source
public string SourceId { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/BalanceTransactions/Fee.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Cards/Card.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Charges/Charge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
[JsonProperty("amount")]
public int Amount { get; set; }
public long Amount { get; set; }

/// <summary>
/// Amount in cents refunded (can be less than the amount attribute on the charge if a partial refund was issued).
/// </summary>
[JsonProperty("amount_refunded")]
public int AmountRefunded { get; set; }
public long AmountRefunded { get; set; }

#region Expandable Application
public string ApplicationId { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Charges/ChargeLevel3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
8 changes: 4 additions & 4 deletions src/Stripe.net/Entities/Charges/ChargeLevel3LineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Charges/Outcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
[JsonProperty("risk_score")]
public int RiskScore { get; set; }
public long RiskScore { get; set; }

#region Expandable Rule

Expand Down
8 changes: 4 additions & 4 deletions src/Stripe.net/Entities/Coupons/Coupon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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<string, string> Metadata { get; set; }
Expand All @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Customers/Customer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
/// </summary>
[JsonProperty("account_balance")]
public int AccountBalance { get; set; }
public long AccountBalance { get; set; }

[JsonProperty("created")]
public DateTime Created { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Disputes/Dispute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<BalanceTransaction> BalanceTransactions { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Disputes/EvidenceDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Events/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
2 changes: 1 addition & 1 deletion src/Stripe.net/Entities/Files/File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
6 changes: 3 additions & 3 deletions src/Stripe.net/Entities/InvoiceItems/InvoiceItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand All @@ -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; }
}
}
20 changes: 10 additions & 10 deletions src/Stripe.net/Entities/Invoices/Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
4 changes: 2 additions & 2 deletions src/Stripe.net/Entities/Invoices/InvoiceLineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }
Expand All @@ -69,10 +69,10 @@ internal object InternalCardholder
public Dictionary<string, string> 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> RequestHistory { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
Loading