Skip to content

Commit

Permalink
Update generated code (#1700)
Browse files Browse the repository at this point in the history
* Update generated code for v445

* Update generated code for v446

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
  • Loading branch information
stripe-openapi[bot] authored Aug 3, 2023
1 parent 0b82b7a commit 056c0d4
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 63 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v444
v446
4 changes: 2 additions & 2 deletions applicationfee.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ type ApplicationFee struct {
APIResource
// ID of the Stripe account this fee was taken from.
Account *Account `json:"account"`
// Amount earned, in %s.
// Amount earned, in cents (or local equivalent).
Amount int64 `json:"amount"`
// Amount in %s refunded (can be less than the amount attribute on the fee if a partial refund was issued)
// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued)
AmountRefunded int64 `json:"amount_refunded"`
// ID of the Connect application that earned the fee.
Application *Application `json:"application"`
Expand Down
10 changes: 5 additions & 5 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ type BalanceTransactionParams struct {
Params `form:"*"`
}

// Detailed breakdown of fees (in %s) paid for this transaction.
// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
type BalanceTransactionFeeDetail struct {
// Amount of the fee, in cents.
Amount int64 `json:"amount"`
Expand All @@ -156,7 +156,7 @@ type BalanceTransactionFeeDetail struct {
// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
type BalanceTransaction struct {
APIResource
// Gross amount of the transaction, in %s.
// Gross amount of the transaction, in cents (or local equivalent).
Amount int64 `json:"amount"`
// The date the transaction's net funds will become available in the Stripe balance.
AvailableOn int64 `json:"available_on"`
Expand All @@ -168,13 +168,13 @@ type BalanceTransaction struct {
Description string `json:"description"`
// The exchange rate used, if applicable, for this transaction. Specifically, if money was converted from currency A to currency B, then the `amount` in currency A, times `exchange_rate`, would be the `amount` in currency B. For example, suppose you charged a customer 10.00 EUR. Then the PaymentIntent's `amount` would be `1000` and `currency` would be `eur`. Suppose this was converted into 12.34 USD in your Stripe account. Then the BalanceTransaction's `amount` would be `1234`, `currency` would be `usd`, and `exchange_rate` would be `1.234`.
ExchangeRate float64 `json:"exchange_rate"`
// Fees (in %s) paid for this transaction.
// Fees (in cents (or local equivalent)) paid for this transaction.
Fee int64 `json:"fee"`
// Detailed breakdown of fees (in %s) paid for this transaction.
// Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction.
FeeDetails []*BalanceTransactionFeeDetail `json:"fee_details"`
// Unique identifier for the object.
ID string `json:"id"`
// Net amount of the transaction, in %s.
// Net amount of the transaction, in cents (or local equivalent).
Net int64 `json:"net"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
Expand Down
4 changes: 2 additions & 2 deletions charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,9 @@ type Charge struct {
APIResource
// Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Amount int64 `json:"amount"`
// Amount in %s captured (can be less than the amount attribute on the charge if a partial capture was made).
// Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made).
AmountCaptured int64 `json:"amount_captured"`
// Amount in %s refunded (can be less than the amount attribute on the charge if a partial refund was issued).
// Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued).
AmountRefunded int64 `json:"amount_refunded"`
// ID of the Connect application that created the charge.
Application *Application `json:"application"`
Expand Down
4 changes: 2 additions & 2 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -2233,7 +2233,7 @@ type CheckoutSessionShippingCostTax struct {
Rate *TaxRate `json:"rate"`
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
TaxabilityReason CheckoutSessionShippingCostTaxTaxabilityReason `json:"taxability_reason"`
// The amount on which tax is calculated, in %s.
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount int64 `json:"taxable_amount"`
}

Expand Down Expand Up @@ -2284,7 +2284,7 @@ type CheckoutSessionTotalDetailsBreakdownTax struct {
Rate *TaxRate `json:"rate"`
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
TaxabilityReason CheckoutSessionTotalDetailsBreakdownTaxTaxabilityReason `json:"taxability_reason"`
// The amount on which tax is calculated, in %s.
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount int64 `json:"taxable_amount"`
}
type CheckoutSessionTotalDetailsBreakdown struct {
Expand Down
2 changes: 1 addition & 1 deletion connectcollectiontransfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package stripe
import "encoding/json"

type ConnectCollectionTransfer struct {
// Amount transferred, in %s.
// Amount transferred, in cents (or local equivalent).
Amount int64 `json:"amount"`
// Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Currency Currency `json:"currency"`
Expand Down
2 changes: 1 addition & 1 deletion coupon.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ type Coupon struct {
Name string `json:"name"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a %s100 invoice %s50 instead.
// Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead.
PercentOff float64 `json:"percent_off"`
// Date after which the coupon can no longer be redeemed.
RedeemBy int64 `json:"redeem_by"`
Expand Down
22 changes: 11 additions & 11 deletions creditnote.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,9 +274,9 @@ type CreditNoteListLinesParams struct {
CreditNote *string `form:"-"` // Included in URL
}

// The integer amount in %s representing the total amount of discount that was credited.
// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
type CreditNoteDiscountAmount struct {
// The amount, in %s, of the discount.
// The amount, in cents (or local equivalent), of the discount.
Amount int64 `json:"amount"`
// The discount that was applied to get this discount amount.
Discount *Discount `json:"discount"`
Expand All @@ -292,7 +292,7 @@ type CreditNoteShippingCostTax struct {
Rate *TaxRate `json:"rate"`
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
TaxabilityReason CreditNoteShippingCostTaxTaxabilityReason `json:"taxability_reason"`
// The amount on which tax is calculated, in %s.
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount int64 `json:"taxable_amount"`
}

Expand All @@ -312,13 +312,13 @@ type CreditNoteShippingCost struct {

// The aggregate amounts calculated per tax rate for all line items.
type CreditNoteTaxAmount struct {
// The amount, in %s, of the tax.
// The amount, in cents (or local equivalent), of the tax.
Amount int64 `json:"amount"`
// Whether this tax amount is inclusive or exclusive.
Inclusive bool `json:"inclusive"`
// The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported.
TaxabilityReason CreditNoteTaxAmountTaxabilityReason `json:"taxability_reason"`
// The amount on which tax is calculated, in %s.
// The amount on which tax is calculated, in cents (or local equivalent).
TaxableAmount int64 `json:"taxable_amount"`
// The tax rate that was applied to get this tax amount.
TaxRate *TaxRate `json:"tax_rate"`
Expand All @@ -329,7 +329,7 @@ type CreditNoteTaxAmount struct {
// Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes)
type CreditNote struct {
APIResource
// The integer amount in %s representing the total amount of the credit note, including tax.
// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax.
Amount int64 `json:"amount"`
// This is the sum of all the shipping amounts.
AmountShipping int64 `json:"amount_shipping"`
Expand All @@ -341,7 +341,7 @@ type CreditNote struct {
Customer *Customer `json:"customer"`
// Customer balance transaction related to this credit note.
CustomerBalanceTransaction *CustomerBalanceTransaction `json:"customer_balance_transaction"`
// The integer amount in %s representing the total amount of discount that was credited.
// The integer amount in cents (or local equivalent) representing the total amount of discount that was credited.
DiscountAmount int64 `json:"discount_amount"`
// The aggregate amounts calculated per discount for all line items.
DiscountAmounts []*CreditNoteDiscountAmount `json:"discount_amounts"`
Expand Down Expand Up @@ -375,15 +375,15 @@ type CreditNote struct {
ShippingCost *CreditNoteShippingCost `json:"shipping_cost"`
// Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding).
Status CreditNoteStatus `json:"status"`
// The integer amount in %s representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts.
Subtotal int64 `json:"subtotal"`
// The integer amount in %s representing the amount of the credit note, excluding all tax and invoice level discounts.
// The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts.
SubtotalExcludingTax int64 `json:"subtotal_excluding_tax"`
// The aggregate amounts calculated per tax rate for all line items.
TaxAmounts []*CreditNoteTaxAmount `json:"tax_amounts"`
// The integer amount in %s representing the total amount of the credit note, including tax and all discount.
// The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount.
Total int64 `json:"total"`
// The integer amount in %s representing the total amount of the credit note, excluding tax, but including discounts.
// The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts.
TotalExcludingTax int64 `json:"total_excluding_tax"`
// Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid.
Type CreditNoteType `json:"type"`
Expand Down
12 changes: 6 additions & 6 deletions creditnotelineitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ const (
CreditNoteLineItemTypeInvoiceLineItem CreditNoteLineItemType = "invoice_line_item"
)

// The integer amount in %s representing the discount being credited for this line item.
// The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
type CreditNoteLineItemDiscountAmount struct {
// The amount, in %s, of the discount.
// The amount, in cents (or local equivalent), of the discount.
Amount int64 `json:"amount"`
// The discount that was applied to get this discount amount.
Discount *Discount `json:"discount"`
Expand All @@ -26,13 +26,13 @@ type CreditNoteLineItemDiscountAmount struct {
// CreditNoteLineItem is the resource representing a Stripe credit note line item.
// For more details see https://stripe.com/docs/api/credit_notes/line_item
type CreditNoteLineItem struct {
// The integer amount in %s representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
// The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.
Amount int64 `json:"amount"`
// The integer amount in %s representing the amount being credited for this line item, excluding all tax and discounts.
// The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.
AmountExcludingTax int64 `json:"amount_excluding_tax"`
// Description of the item being credited.
Description string `json:"description"`
// The integer amount in %s representing the discount being credited for this line item.
// The integer amount in cents (or local equivalent) representing the discount being credited for this line item.
DiscountAmount int64 `json:"discount_amount"`
// The amount of discount calculated per discount for this line item
DiscountAmounts []*CreditNoteLineItemDiscountAmount `json:"discount_amounts"`
Expand All @@ -56,7 +56,7 @@ type CreditNoteLineItem struct {
UnitAmount int64 `json:"unit_amount"`
// Same as `unit_amount`, but contains a decimal value with at most 12 decimal places.
UnitAmountDecimal float64 `json:"unit_amount_decimal,string"`
// The amount in %s representing the unit amount being credited for this line item, excluding all tax and discounts.
// The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.
UnitAmountExcludingTax float64 `json:"unit_amount_excluding_tax,string"`
}

Expand Down
2 changes: 1 addition & 1 deletion feerefund.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type FeeRefundListParams struct {
// Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee)
type FeeRefund struct {
APIResource
// Amount, in %s.
// Amount, in cents (or local equivalent).
Amount int64 `json:"amount"`
// Balance transaction that describes the impact on your account balance.
BalanceTransaction *BalanceTransaction `json:"balance_transaction"`
Expand Down
Loading

0 comments on commit 056c0d4

Please sign in to comment.