Skip to content

Commit

Permalink
API Updates (#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe authored Jun 29, 2022
1 parent dcb4734 commit 36a12a0
Show file tree
Hide file tree
Showing 9 changed files with 1,550 additions and 1,362 deletions.
4 changes: 2 additions & 2 deletions checkout_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ type CheckoutSessionCustomerDetailsTaxIDs struct {
Value string `json:"value"`
}

// The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode.
// The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
type CheckoutSessionCustomerDetails struct {
// The customer's address at the time of checkout. Note: This property is populated only for sessions on or after March 30, 2022.
Address *Address `json:"address"`
Expand Down Expand Up @@ -1711,7 +1711,7 @@ type CheckoutSession struct {
Customer *Customer `json:"customer"`
// Configure whether a Checkout Session creates a Customer when the Checkout Session completes.
CustomerCreation CheckoutSessionCustomerCreation `json:"customer_creation"`
// The customer details including the customer's tax exempt status and the customer's tax IDs. Only present on Sessions in `payment` or `subscription` mode.
// The customer details including the customer's tax exempt status and the customer's tax IDs. Only the customer's email is present on Sessions in `setup` mode.
CustomerDetails *CheckoutSessionCustomerDetails `json:"customer_details"`
// If provided, this value will be used when the Customer object is created.
// If not provided, customers will be asked to enter their email address.
Expand Down
4 changes: 4 additions & 0 deletions client/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ import (
terminallocation "github.com/stripe/stripe-go/v72/terminal/location"
terminalreader "github.com/stripe/stripe-go/v72/terminal/reader"
testhelperscustomer "github.com/stripe/stripe-go/v72/testhelpers/customer"
testhelpersissuingcard "github.com/stripe/stripe-go/v72/testhelpers/issuing/card"
testhelpersrefund "github.com/stripe/stripe-go/v72/testhelpers/refund"
testhelpersterminalreader "github.com/stripe/stripe-go/v72/testhelpers/terminal/reader"
testhelperstestclock "github.com/stripe/stripe-go/v72/testhelpers/testclock"
Expand Down Expand Up @@ -277,6 +278,8 @@ type API struct {
TerminalReaders *terminalreader.Client
// TestHelpersCustomers is the client used to invoke /customers APIs.
TestHelpersCustomers *testhelperscustomer.Client
// TestHelpersIssuingCards is the client used to invoke /issuing/cards APIs.
TestHelpersIssuingCards *testhelpersissuingcard.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 @@ -417,6 +420,7 @@ 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.TestHelpersIssuingCards = &testhelpersissuingcard.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 36a12a0

Please sign in to comment.