Skip to content

Commit

Permalink
API Updates (#1537)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcr-stripe authored Aug 26, 2022
1 parent 30ff791 commit f0874e7
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v184
v186
21 changes: 20 additions & 1 deletion billingportal_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,14 @@ type BillingPortalConfigurationFeaturesParams struct {
SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdateParams `form:"subscription_update"`
}

// The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
type BillingPortalConfigurationLoginPageParams struct {
// Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal.
//
// Set to `false` to deactivate the `login_page.url`.
Enabled *bool `form:"enabled"`
}

// Creates a configuration that describes the functionality and behavior of a PortalSession
type BillingPortalConfigurationParams struct {
Params `form:"*"`
Expand All @@ -186,6 +194,8 @@ type BillingPortalConfigurationParams struct {
DefaultReturnURL *string `form:"default_return_url"`
// Information about the features available in the portal.
Features *BillingPortalConfigurationFeaturesParams `form:"features"`
// The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share).
LoginPage *BillingPortalConfigurationLoginPageParams `form:"login_page"`
}
type BillingPortalConfigurationBusinessProfile struct {
// The messaging shown to customers in the portal.
Expand Down Expand Up @@ -254,6 +264,14 @@ type BillingPortalConfigurationFeatures struct {
SubscriptionPause *BillingPortalConfigurationFeaturesSubscriptionPause `json:"subscription_pause"`
SubscriptionUpdate *BillingPortalConfigurationFeaturesSubscriptionUpdate `json:"subscription_update"`
}
type BillingPortalConfigurationLoginPage struct {
// If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal.
//
// If `false`, the previously generated `url`, if any, will be deactivated.
Enabled bool `json:"enabled"`
// A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal.
URL string `json:"url"`
}

// A portal configuration describes the functionality and behavior of a portal session.
type BillingPortalConfiguration struct {
Expand All @@ -273,7 +291,8 @@ type BillingPortalConfiguration struct {
// Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session.
IsDefault bool `json:"is_default"`
// 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"`
Livemode bool `json:"livemode"`
LoginPage *BillingPortalConfigurationLoginPage `json:"login_page"`
// 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.
Metadata map[string]string `json:"metadata"`
// String representing the object's type. Objects of the same type share the same value.
Expand Down
2 changes: 1 addition & 1 deletion charge.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ type ChargePaymentMethodDetailsCardPresent struct {
}
type ChargePaymentMethodDetailsCustomerBalance struct{}
type ChargePaymentMethodDetailsEPS struct {
// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
Bank string `json:"bank"`
// Owner's verified full name. Values are verified or provided by EPS directly
// (if supported) at the time of authorization or settlement. They cannot be set or mutated.
Expand Down
2 changes: 1 addition & 1 deletion invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ type InvoiceTransferDataParams struct {
Destination *string `form:"destination"`
}

// This endpoint creates a draft invoice for a given customer. The draft invoice created pulls in all pending invoice items on that customer, including prorations. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
// This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or <a href="#send_invoice">send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers.
type InvoiceParams struct {
Params `form:"*"`
// The account tax IDs associated with the invoice. Only editable when the invoice is a draft.
Expand Down
20 changes: 20 additions & 0 deletions issuing_card.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,22 @@ type IssuingCardListParams struct {
Type *string `form:"type"`
}

// Customs information for the shipment.
type IssuingCardShippingCustomsParams struct {
// The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe.
EORINumber *string `form:"eori_number"`
}

// The address where the card will be shipped.
type IssuingCardShippingParams struct {
// The address that the card is shipped to.
Address *AddressParams `form:"address"`
// Customs information for the shipment.
Customs *IssuingCardShippingCustomsParams `form:"customs"`
// The name printed on the shipping label when shipping the card.
Name *string `form:"name"`
// Phone number of the recipient of the shipment.
PhoneNumber *string `form:"phone_number"`
// Shipment service.
Service *string `form:"service"`
// Packaging options.
Expand Down Expand Up @@ -210,15 +220,25 @@ type IssuingCardPINParams struct {
EncryptedNumber *string `form:"encrypted_number"`
}

// Additional information that may be required for clearing customs.
type IssuingCardShippingCustoms struct {
// A registration number used for customs in Europe. See https://www.gov.uk/eori and https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en.
EORINumber string `json:"eori_number"`
}

// Where and how the card will be shipped.
type IssuingCardShipping struct {
Address *Address `json:"address"`
// The delivery company that shipped a card.
Carrier IssuingCardShippingCarrier `json:"carrier"`
// Additional information that may be required for clearing customs.
Customs *IssuingCardShippingCustoms `json:"customs"`
// A unix timestamp representing a best estimate of when the card will be delivered.
ETA int64 `json:"eta"`
// Recipient name.
Name string `json:"name"`
// The phone number of the receiver of the bulk shipment. This phone number will be provided to the shipping company, who might use it to contact the receiver in case of delivery issues.
PhoneNumber string `json:"phone_number"`
// Shipment service, such as `standard` or `express`.
Service IssuingCardShippingService `json:"service"`
// The delivery status of the card.
Expand Down
2 changes: 1 addition & 1 deletion paymentmethod.go
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ type PaymentMethodCard struct {
type PaymentMethodCardPresent struct{}
type PaymentMethodCustomerBalance struct{}
type PaymentMethodEPS struct {
// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
// The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`.
Bank string `json:"bank"`
}
type PaymentMethodFPX struct {
Expand Down
4 changes: 4 additions & 0 deletions quote.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ type QuoteLineItemParams struct {

// When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created.
type QuoteSubscriptionDataParams struct {
// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description *string `form:"description"`
// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted.
EffectiveDate *int64 `form:"effective_date"`
EffectiveDateCurrentPeriodEnd *bool `form:"-"` // See custom AppendTo
Expand Down Expand Up @@ -357,6 +359,8 @@ type QuoteStatusTransitions struct {
FinalizedAt int64 `json:"finalized_at"`
}
type QuoteSubscriptionData struct {
// The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description string `json:"description"`
// When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch.
EffectiveDate int64 `json:"effective_date"`
// Integer representing the number of trial period days before the customer is charged for the first time.
Expand Down
8 changes: 8 additions & 0 deletions subscriptionschedule.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ type SubscriptionScheduleDefaultSettingsParams struct {
CollectionMethod *string `form:"collection_method"`
// ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
DefaultPaymentMethod *string `form:"default_payment_method"`
// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description *string `form:"description"`
// All invoices will be billed using the specified settings.
InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettingsParams `form:"invoice_settings"`
// The data with which to automatically create a Transfer for each of the associated subscription's invoices.
Expand Down Expand Up @@ -176,6 +178,8 @@ type SubscriptionSchedulePhaseParams struct {
DefaultPaymentMethod *string `form:"default_payment_method"`
// A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase.
DefaultTaxRates []*string `form:"default_tax_rates"`
// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description *string `form:"description"`
// The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set.
EndDate *int64 `form:"end_date"`
EndDateNow *bool `form:"-"` // See custom AppendTo
Expand Down Expand Up @@ -282,6 +286,8 @@ type SubscriptionScheduleDefaultSettings struct {
CollectionMethod *SubscriptionCollectionMethod `json:"collection_method"`
// ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings.
DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description string `json:"description"`
// The subscription schedule's default invoice settings.
InvoiceSettings *SubscriptionScheduleDefaultSettingsInvoiceSettings `json:"invoice_settings"`
// The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices.
Expand Down Expand Up @@ -339,6 +345,8 @@ type SubscriptionSchedulePhase struct {
DefaultPaymentMethod *PaymentMethod `json:"default_payment_method"`
// The default tax rates to apply to the subscription during this phase of the subscription schedule.
DefaultTaxRates []*TaxRate `json:"default_tax_rates"`
// Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription.
Description string `json:"description"`
// The end of this phase of the subscription schedule.
EndDate int64 `json:"end_date"`
// The invoice settings applicable during this phase.
Expand Down

0 comments on commit f0874e7

Please sign in to comment.