Skip to content

Commit

Permalink
Merge pull request #1732 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 Sep 15, 2023
2 parents d6c4eee + be87f5c commit 7999e1b
Show file tree
Hide file tree
Showing 35 changed files with 2,130 additions and 109 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 75.5.0 - 2023-09-13
* [#1735](https://github.com/stripe/stripe-go/pull/1735) Bugfix: point files.New back to files.stripe.com
* [#1731](https://github.com/stripe/stripe-go/pull/1731) Delay calculation of Stripe-User-Agent

## 75.5.0-beta.1 - 2023-09-07
* [#1730](https://github.com/stripe/stripe-go/pull/1730) Update generated code for beta
Release specs are identical.
Expand Down
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v515
v532
10 changes: 5 additions & 5 deletions balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (p *BalanceParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.
// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
type Amount struct {
// Balance amount.
Amount int64 `json:"amount"`
Expand All @@ -56,17 +56,17 @@ type BalanceIssuing struct {
// Related guide: [Understanding Connect account balances](https://stripe.com/docs/connect/account-balances)
type Balance struct {
APIResource
// Funds that are available to be transferred or paid out, whether automatically by Stripe or explicitly via the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). The available balance for each currency and payment type can be found in the `source_types` property.
// Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property.
Available []*Amount `json:"available"`
// Funds held due to negative balances on connected Custom accounts. The connect reserve balance for each currency and payment type can be found in the `source_types` property.
// Funds held due to negative balances on connected Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property.
ConnectReserved []*Amount `json:"connect_reserved"`
// Funds that can be paid out using Instant Payouts.
// Funds that you can pay out using Instant Payouts.
InstantAvailable []*Amount `json:"instant_available"`
Issuing *BalanceIssuing `json:"issuing"`
// Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
Livemode bool `json:"livemode"`
// String representing the object's type. Objects of the same type share the same value.
Object string `json:"object"`
// Funds that are not yet available in the balance. The pending balance for each currency, and for each payment type, can be found in the `source_types` property.
// Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property.
Pending []*Amount `json:"pending"`
}
24 changes: 12 additions & 12 deletions balancetransaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ package stripe

import "encoding/json"

// [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.
// Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
type BalanceTransactionReportingCategory string

// List of values that BalanceTransactionReportingCategory can take
Expand Down Expand Up @@ -64,7 +64,7 @@ const (
BalanceTransactionSourceTypeTransferReversal BalanceTransactionSourceType = "transfer_reversal"
)

// If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.
// The transaction's net funds status in the Stripe balance, which are either `available` or `pending`.
type BalanceTransactionStatus string

// List of values that BalanceTransactionStatus can take
Expand All @@ -73,7 +73,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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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.
// 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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
type BalanceTransactionType string

// List of values that BalanceTransactionType can take
Expand Down Expand Up @@ -172,40 +172,40 @@ type BalanceTransactionFeeDetail struct {
}

// Balance transactions represent funds moving through your Stripe account.
// They're created for every type of transaction that comes into or flows out of your Stripe account balance.
// Stripe creates them for every type of transaction that enters or leaves your Stripe account balance.
//
// Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types)
type BalanceTransaction struct {
APIResource
// Gross amount of the transaction, in cents (or local equivalent).
// 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.
// The date that the transaction's net funds become available in the Stripe balance.
AvailableOn int64 `json:"available_on"`
// 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).
Currency Currency `json:"currency"`
// An arbitrary string attached to the object. Often useful for displaying to users.
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`.
// If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`.
ExchangeRate float64 `json:"exchange_rate"`
// Fees (in cents (or local equivalent)) paid for this transaction.
Fee int64 `json:"fee"`
// 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 cents (or local equivalent).
// 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"`
// [Learn more](https://stripe.com/docs/reports/reporting-categories) about how reporting categories can help you understand balance transactions from an accounting perspective.
// Learn more about how [reporting categories] (https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective.
ReportingCategory BalanceTransactionReportingCategory `json:"reporting_category"`
// The Stripe object to which this transaction is related.
// This transaction relates to the Stripe object.
Source *BalanceTransactionSource `json:"source"`
// If the transaction's net funds are available in the Stripe balance yet. Either `available` or `pending`.
// The transaction's net funds status in the Stripe balance, which are 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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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.
// 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`, `obligation_inbound`, `obligation_outbound`, `obligation_reversal_inbound`, `obligation_reversal_outbound`, `obligation_payout`, `obligation_payout_failure`, `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 about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead.
Type BalanceTransactionType `json:"type"`
}
type BalanceTransactionSource struct {
Expand Down
12 changes: 12 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/stripe/stripe-go/v75/cashbalance"
"github.com/stripe/stripe-go/v75/charge"
checkoutsession "github.com/stripe/stripe-go/v75/checkout/session"
"github.com/stripe/stripe-go/v75/confirmationtoken"
"github.com/stripe/stripe-go/v75/countryspec"
"github.com/stripe/stripe-go/v75/coupon"
"github.com/stripe/stripe-go/v75/creditnote"
Expand Down Expand Up @@ -107,8 +108,10 @@ import (
terminallocation "github.com/stripe/stripe-go/v75/terminal/location"
terminalreader "github.com/stripe/stripe-go/v75/terminal/reader"
testhelperscustomer "github.com/stripe/stripe-go/v75/testhelpers/customer"
testhelpersissuingauthorization "github.com/stripe/stripe-go/v75/testhelpers/issuing/authorization"
testhelpersissuingcard "github.com/stripe/stripe-go/v75/testhelpers/issuing/card"
testhelpersissuingcarddesign "github.com/stripe/stripe-go/v75/testhelpers/issuing/carddesign"
testhelpersissuingtransaction "github.com/stripe/stripe-go/v75/testhelpers/issuing/transaction"
testhelpersrefund "github.com/stripe/stripe-go/v75/testhelpers/refund"
testhelpersterminalreader "github.com/stripe/stripe-go/v75/testhelpers/terminal/reader"
testhelperstestclock "github.com/stripe/stripe-go/v75/testhelpers/testclock"
Expand Down Expand Up @@ -176,6 +179,8 @@ type API struct {
Charges *charge.Client
// CheckoutSessions is the client used to invoke /checkout/sessions APIs.
CheckoutSessions *checkoutsession.Client
// ConfirmationTokens is the client used to invoke /confirmation_tokens APIs.
ConfirmationTokens *confirmationtoken.Client
// CountrySpecs is the client used to invoke /country_specs APIs.
CountrySpecs *countryspec.Client
// Coupons is the client used to invoke /coupons APIs.
Expand Down Expand Up @@ -334,10 +339,14 @@ type API struct {
TerminalReaders *terminalreader.Client
// TestHelpersCustomers is the client used to invoke /customers APIs.
TestHelpersCustomers *testhelperscustomer.Client
// TestHelpersIssuingAuthorizations is the client used to invoke /issuing/authorizations APIs.
TestHelpersIssuingAuthorizations *testhelpersissuingauthorization.Client
// TestHelpersIssuingCardDesigns is the client used to invoke /issuing/card_designs APIs.
TestHelpersIssuingCardDesigns *testhelpersissuingcarddesign.Client
// TestHelpersIssuingCards is the client used to invoke /issuing/cards APIs.
TestHelpersIssuingCards *testhelpersissuingcard.Client
// TestHelpersIssuingTransactions is the client used to invoke /issuing/transactions APIs.
TestHelpersIssuingTransactions *testhelpersissuingtransaction.Client
// TestHelpersRefunds is the client used to invoke /refunds APIs.
TestHelpersRefunds *testhelpersrefund.Client
// TestHelpersTerminalReaders is the client used to invoke /terminal/readers APIs.
Expand Down Expand Up @@ -419,6 +428,7 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.CashBalances = &cashbalance.Client{B: backends.API, Key: key}
a.Charges = &charge.Client{B: backends.API, Key: key}
a.CheckoutSessions = &checkoutsession.Client{B: backends.API, Key: key}
a.ConfirmationTokens = &confirmationtoken.Client{B: backends.API, Key: key}
a.CountrySpecs = &countryspec.Client{B: backends.API, Key: key}
a.Coupons = &coupon.Client{B: backends.API, Key: key}
a.CreditNotes = &creditnote.Client{B: backends.API, Key: key}
Expand Down Expand Up @@ -498,8 +508,10 @@ func (a *API) Init(key string, backends *stripe.Backends) {
a.TerminalLocations = &terminallocation.Client{B: backends.API, Key: key}
a.TerminalReaders = &terminalreader.Client{B: backends.API, Key: key}
a.TestHelpersCustomers = &testhelperscustomer.Client{B: backends.API, Key: key}
a.TestHelpersIssuingAuthorizations = &testhelpersissuingauthorization.Client{B: backends.API, Key: key}
a.TestHelpersIssuingCardDesigns = &testhelpersissuingcarddesign.Client{B: backends.API, Key: key}
a.TestHelpersIssuingCards = &testhelpersissuingcard.Client{B: backends.API, Key: key}
a.TestHelpersIssuingTransactions = &testhelpersissuingtransaction.Client{B: backends.API, Key: key}
a.TestHelpersRefunds = &testhelpersrefund.Client{B: backends.API, Key: key}
a.TestHelpersTerminalReaders = &testhelpersterminalreader.Client{B: backends.API, Key: key}
a.TestHelpersTestClocks = &testhelperstestclock.Client{B: backends.API, Key: key}
Expand Down
Loading

0 comments on commit 7999e1b

Please sign in to comment.