From 901d87e4d9385a13cd4321bbe70e057befc81b1e Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Fri, 4 Aug 2023 18:34:49 +0000 Subject: [PATCH 1/5] Update generated code for v448 --- OPENAPI_VERSION | 2 +- billingportal_session.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index dae9a81fbb..1576a6cba8 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v446 \ No newline at end of file +v448 \ No newline at end of file diff --git a/billingportal_session.go b/billingportal_session.go index f478f7fa1a..976a59bb9f 100644 --- a/billingportal_session.go +++ b/billingportal_session.go @@ -112,7 +112,7 @@ type BillingPortalSessionParams struct { Customer *string `form:"customer"` // Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. FlowData *BillingPortalSessionFlowDataParams `form:"flow_data"` - // The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. + // The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer's `preferred_locales` or browser's locale is used. Locale *string `form:"locale"` // The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#on-behalf-of). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. OnBehalfOf *string `form:"on_behalf_of"` From 49076cadb07f8f833e90c41d59aabea885e334a1 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 7 Aug 2023 17:18:24 +0000 Subject: [PATCH 2/5] Update generated code for v451 --- OPENAPI_VERSION | 2 +- creditnotelineitem.go | 1 + taxrate.go | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1576a6cba8..b54aeebde5 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v448 \ No newline at end of file +v451 \ No newline at end of file diff --git a/creditnotelineitem.go b/creditnotelineitem.go index f5b7ba4a1a..21375f3fdf 100644 --- a/creditnotelineitem.go +++ b/creditnotelineitem.go @@ -25,6 +25,7 @@ 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 +// The credit note line item object type CreditNoteLineItem struct { // 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"` diff --git a/taxrate.go b/taxrate.go index 780011d520..f5b7b53007 100644 --- a/taxrate.go +++ b/taxrate.go @@ -79,7 +79,9 @@ type TaxRate struct { Description string `json:"description"` // The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. DisplayName string `json:"display_name"` - // Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage does not include the statutory tax rate of non-taxable jurisdictions. + // Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, + // this percentage reflects the rate actually used to calculate tax based on the product's taxability + // and whether the user is registered to collect taxes in the corresponding jurisdiction. EffectivePercentage float64 `json:"effective_percentage"` // Unique identifier for the object. ID string `json:"id"` From 88dfe27423ddbf3656f2fd08891dff0a6d0865f7 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Tue, 8 Aug 2023 04:10:30 +0000 Subject: [PATCH 3/5] Update generated code for v452 --- OPENAPI_VERSION | 2 +- balancetransaction.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index b54aeebde5..85c8b08d1c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v451 \ No newline at end of file +v452 \ No newline at end of file diff --git a/balancetransaction.go b/balancetransaction.go index 76efd8e4ae..e4000b317e 100644 --- a/balancetransaction.go +++ b/balancetransaction.go @@ -69,7 +69,7 @@ const ( BalanceTransactionStatusPending BalanceTransactionStatus = "pending" ) -// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. +// Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. type BalanceTransactionType string // List of values that BalanceTransactionType can take @@ -90,6 +90,7 @@ const ( BalanceTransactionTypePayment BalanceTransactionType = "payment" BalanceTransactionTypePaymentFailureRefund BalanceTransactionType = "payment_failure_refund" BalanceTransactionTypePaymentRefund BalanceTransactionType = "payment_refund" + BalanceTransactionTypePaymentReversal BalanceTransactionType = "payment_reversal" BalanceTransactionTypePayout BalanceTransactionType = "payout" BalanceTransactionTypePayoutCancel BalanceTransactionType = "payout_cancel" BalanceTransactionTypePayoutFailure BalanceTransactionType = "payout_failure" @@ -125,7 +126,7 @@ type BalanceTransactionListParams struct { Payout *string `form:"payout"` // Only returns the original transaction. Source *string `form:"source"` - // Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + // Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Type *string `form:"type"` } @@ -184,7 +185,7 @@ type BalanceTransaction struct { Source *BalanceTransactionSource `json:"source"` // If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`. Status BalanceTransactionStatus `json:"status"` - // Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. + // Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `payment`, `payment_failure_refund`, `payment_refund`, `payment_reversal`, `payout`, `payout_cancel`, `payout_failure`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. [Learn more](https://stripe.com/docs/reports/balance-transaction-types) about balance transaction types and what they represent. If you are looking to classify transactions for accounting purposes, you might want to consider `reporting_category` instead. Type BalanceTransactionType `json:"type"` } type BalanceTransactionSource struct { From 846eb029f19d0005e386f201c14d09e91111837b Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Wed, 9 Aug 2023 18:09:52 +0000 Subject: [PATCH 4/5] Update generated code for v454 --- OPENAPI_VERSION | 2 +- customercashbalancetransaction.go | 29 ++++++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 85c8b08d1c..1c6f65d1b4 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v452 \ No newline at end of file +v454 \ No newline at end of file diff --git a/customercashbalancetransaction.go b/customercashbalancetransaction.go index 69709b9ead..afbe4b0ec5 100644 --- a/customercashbalancetransaction.go +++ b/customercashbalancetransaction.go @@ -6,6 +6,8 @@ package stripe +import "encoding/json" + // The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. type CustomerCashBalanceTransactionFundedBankTransferType string @@ -33,6 +35,7 @@ type CustomerCashBalanceTransactionType string // List of values that CustomerCashBalanceTransactionType can take const ( + CustomerCashBalanceTransactionTypeAdjustedForOverdraft CustomerCashBalanceTransactionType = "adjusted_for_overdraft" CustomerCashBalanceTransactionTypeAppliedToPayment CustomerCashBalanceTransactionType = "applied_to_payment" CustomerCashBalanceTransactionTypeFunded CustomerCashBalanceTransactionType = "funded" CustomerCashBalanceTransactionTypeFundingReversed CustomerCashBalanceTransactionType = "funding_reversed" @@ -53,6 +56,10 @@ type CustomerCashBalanceTransactionListParams struct { ListParams `form:"*"` Customer *string `form:"-"` // Included in URL } +type CustomerCashBalanceTransactionAdjustedForOverdraft struct { + // The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + LinkedTransaction *CustomerCashBalanceTransaction `json:"linked_transaction"` +} type CustomerCashBalanceTransactionAppliedToPayment struct { // The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. PaymentIntent *PaymentIntent `json:"payment_intent"` @@ -115,7 +122,8 @@ type CustomerCashBalanceTransactionUnappliedFromPayment struct { // to payments, and refunds to the customer. type CustomerCashBalanceTransaction struct { APIResource - AppliedToPayment *CustomerCashBalanceTransactionAppliedToPayment `json:"applied_to_payment"` + AdjustedForOverdraft *CustomerCashBalanceTransactionAdjustedForOverdraft `json:"adjusted_for_overdraft"` + AppliedToPayment *CustomerCashBalanceTransactionAppliedToPayment `json:"applied_to_payment"` // Time at which the object was created. Measured in seconds since the Unix epoch. Created int64 `json:"created"` // 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). @@ -145,3 +153,22 @@ type CustomerCashBalanceTransactionList struct { ListMeta Data []*CustomerCashBalanceTransaction `json:"data"` } + +// UnmarshalJSON handles deserialization of a CustomerCashBalanceTransaction. +// This custom unmarshaling is needed because the resulting +// property may be an id or the full struct if it was expanded. +func (c *CustomerCashBalanceTransaction) UnmarshalJSON(data []byte) error { + if id, ok := ParseID(data); ok { + c.ID = id + return nil + } + + type customerCashBalanceTransaction CustomerCashBalanceTransaction + var v customerCashBalanceTransaction + if err := json.Unmarshal(data, &v); err != nil { + return err + } + + *c = CustomerCashBalanceTransaction(v) + return nil +} From 4d4e5c3001e70902373113481aeb456287c8594f Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:03:02 +0000 Subject: [PATCH 5/5] Update generated code for v457 --- OPENAPI_VERSION | 2 +- account.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 1c6f65d1b4..bb32051fd0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v454 \ No newline at end of file +v457 \ No newline at end of file diff --git a/account.go b/account.go index 705ea4c424..c09ef7c5e0 100644 --- a/account.go +++ b/account.go @@ -42,6 +42,7 @@ const ( AccountCompanyStructureGovernmentInstrumentality AccountCompanyStructure = "government_instrumentality" AccountCompanyStructureGovernmentalUnit AccountCompanyStructure = "governmental_unit" AccountCompanyStructureIncorporatedNonProfit AccountCompanyStructure = "incorporated_non_profit" + AccountCompanyStructureIncorporatedPartnership AccountCompanyStructure = "incorporated_partnership" AccountCompanyStructureLimitedLiabilityPartnership AccountCompanyStructure = "limited_liability_partnership" AccountCompanyStructureLLC AccountCompanyStructure = "llc" AccountCompanyStructureMultiMemberLLC AccountCompanyStructure = "multi_member_llc" @@ -57,6 +58,7 @@ const ( AccountCompanyStructureTaxExemptGovernmentInstrumentality AccountCompanyStructure = "tax_exempt_government_instrumentality" AccountCompanyStructureUnincorporatedAssociation AccountCompanyStructure = "unincorporated_association" AccountCompanyStructureUnincorporatedNonProfit AccountCompanyStructure = "unincorporated_non_profit" + AccountCompanyStructureUnincorporatedPartnership AccountCompanyStructure = "unincorporated_partnership" ) // One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document.