Skip to content

Commit

Permalink
Merge pull request #1697 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] authored Aug 3, 2023
2 parents 0d47341 + 01782b7 commit 028f007
Show file tree
Hide file tree
Showing 35 changed files with 194 additions and 108 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
* Add support for new value `ro_tin` on enum `OrderTaxDetailsTaxIdsType`
* Add support for new values `email`, `numeric`, `phone`, and `text` on enum `TerminalReaderActionCollectInputsInputsType`

## 74.28.0 - 2023-07-28
* [#1693](https://github.com/stripe/stripe-go/pull/1693) Update generated code
* Add support for `MonthlyEstimatedRevenue` on `AccountBusinessProfileParams` and `AccountBusinessProfile`
* Add support for `SubscriptionDetails` on `Invoice`

## 74.27.0 - 2023-07-20
* [#1691](https://github.com/stripe/stripe-go/pull/1691) Update generated code
* Add support for new value `ro_tin` on enums `CheckoutSessionCustomerDetailsTaxIdsType`, `InvoiceCustomerTaxIdsType`, `TaxCalculationCustomerDetailsTaxIdsType`, and `TaxTransactionCustomerDetailsTaxIdsType`
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v434
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 @@ -1337,9 +1337,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
10 changes: 5 additions & 5 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,7 @@ type CheckoutSessionShippingOptionParams struct {

// If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges.
type CheckoutSessionSubscriptionDataTransferDataParams struct {
// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination.
AmountPercent *float64 `form:"amount_percent"`
// ID of an existing, connected Stripe account.
Destination *string `form:"destination"`
Expand All @@ -1575,7 +1575,7 @@ type CheckoutSessionSubscriptionDataTrialSettingsParams struct {

// A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode.
type CheckoutSessionSubscriptionDataParams struct {
// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice subtotal that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
// A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions).
ApplicationFeePercent *float64 `form:"application_fee_percent"`
// A future timestamp to anchor the subscription's billing cycle for new subscriptions.
BillingCycleAnchor *int64 `form:"billing_cycle_anchor"`
Expand All @@ -1587,7 +1587,7 @@ type CheckoutSessionSubscriptionDataParams struct {
DefaultTaxRates []*string `form:"default_tax_rates"`
// The subscription's description, meant to be displayable to the customer.
// Use this field to optionally store an explanation of the subscription
// for rendering in Stripe hosted surfaces.
// for rendering in the [customer portal](https://stripe.com/docs/customer-management).
Description *string `form:"description"`
// Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
Metadata map[string]string `form:"metadata"`
Expand Down Expand Up @@ -2274,7 +2274,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 @@ -2325,7 +2325,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 @@ -110,7 +110,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
2 changes: 1 addition & 1 deletion financialconnections_transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type FinancialConnectionsTransactionStatusTransitions struct {
type FinancialConnectionsTransaction struct {
// The ID of the Financial Connections Account this transaction belongs to.
Account string `json:"account"`
// The amount of this transaction, in %s.
// The amount of this transaction, 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
Loading

0 comments on commit 028f007

Please sign in to comment.