Skip to content

Commit

Permalink
Update generated code for v1321
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 31, 2024
1 parent e964194 commit 5bf3ff4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v1320
v1321
12 changes: 6 additions & 6 deletions billing/creditgrant/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,38 +64,38 @@ func (c Client) Update(id string, params *stripe.BillingCreditGrantParams) (*str
return creditgrant, err
}

// Expires a credit grant
// Expires a credit grant.
func Expire(id string, params *stripe.BillingCreditGrantExpireParams) (*stripe.BillingCreditGrant, error) {
return getC().Expire(id, params)
}

// Expires a credit grant
// Expires a credit grant.
func (c Client) Expire(id string, params *stripe.BillingCreditGrantExpireParams) (*stripe.BillingCreditGrant, error) {
path := stripe.FormatURLPath("/v1/billing/credit_grants/%s/expire", id)
creditgrant := &stripe.BillingCreditGrant{}
err := c.B.Call(http.MethodPost, path, c.Key, params, creditgrant)
return creditgrant, err
}

// Voids a credit grant
// Voids a credit grant.
func VoidGrant(id string, params *stripe.BillingCreditGrantVoidGrantParams) (*stripe.BillingCreditGrant, error) {
return getC().VoidGrant(id, params)
}

// Voids a credit grant
// Voids a credit grant.
func (c Client) VoidGrant(id string, params *stripe.BillingCreditGrantVoidGrantParams) (*stripe.BillingCreditGrant, error) {
path := stripe.FormatURLPath("/v1/billing/credit_grants/%s/void", id)
creditgrant := &stripe.BillingCreditGrant{}
err := c.B.Call(http.MethodPost, path, c.Key, params, creditgrant)
return creditgrant, err
}

// Retrieve a list of credit grants
// Retrieve a list of credit grants.
func List(params *stripe.BillingCreditGrantListParams) *Iter {
return getC().List(params)
}

// Retrieve a list of credit grants
// Retrieve a list of credit grants.
func (c Client) List(listParams *stripe.BillingCreditGrantListParams) *Iter {
return &Iter{
Iter: stripe.GetIter(listParams, func(p *stripe.Params, b *form.Values) ([]interface{}, stripe.ListContainer, error) {
Expand Down
2 changes: 1 addition & 1 deletion billing_creditbalancesummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (

// The billing credit applicability scope for which to fetch credit balance summary.
type BillingCreditBalanceSummaryFilterApplicabilityScopeParams struct {
// The price type to which credit grants can apply to. We currently only support `metered` price type.
// The price type for which credit grants can apply. We currently only support the `metered` price type.
PriceType *string `form:"price_type"`
}

Expand Down
33 changes: 16 additions & 17 deletions billing_creditgrant.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ const (
BillingCreditGrantAmountTypeMonetary BillingCreditGrantAmountType = "monetary"
)

// The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
// The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
type BillingCreditGrantApplicabilityConfigScopePriceType string

// List of values that BillingCreditGrantApplicabilityConfigScopePriceType can take
const (
BillingCreditGrantApplicabilityConfigScopePriceTypeMetered BillingCreditGrantApplicabilityConfigScopePriceType = "metered"
)

// The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
// The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
type BillingCreditGrantCategory string

// List of values that BillingCreditGrantCategory can take
Expand All @@ -33,7 +33,7 @@ const (
BillingCreditGrantCategoryPromotional BillingCreditGrantCategory = "promotional"
)

// Retrieve a list of credit grants
// Retrieve a list of credit grants.
type BillingCreditGrantListParams struct {
ListParams `form:"*"`
// Only return credit grants for this customer.
Expand Down Expand Up @@ -65,7 +65,7 @@ type BillingCreditGrantAmountParams struct {

// Specify the scope of this applicability config.
type BillingCreditGrantApplicabilityConfigScopeParams struct {
// The price type to which credit grants can apply to. We currently only support `metered` price type.
// The price type for which credit grants can apply. We currently only support the `metered` price type.
PriceType *string `form:"price_type"`
}

Expand All @@ -84,17 +84,17 @@ type BillingCreditGrantParams struct {
ApplicabilityConfig *BillingCreditGrantApplicabilityConfigParams `form:"applicability_config"`
// The category of this credit grant.
Category *string `form:"category"`
// ID of the customer to whom the billing credits should be granted.
// ID of the customer to receive the billing credits.
Customer *string `form:"customer"`
// The time when the billing credits become effective i.e when they are eligible to be used. Defaults to the current timestamp if not specified.
// The time when the billing credits become effectivewhen they're eligible for use. Defaults to the current timestamp if not specified.
EffectiveAt *int64 `form:"effective_at"`
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
// The time when the billing credits created by this credit grant will expire. If set to empty, the billing credits will never expire.
// The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire.
ExpiresAt *int64 `form:"expires_at"`
// Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (ex: cost basis) in a structured format.
// Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object (for example, cost basis) in a structured format.
Metadata map[string]string `form:"metadata"`
// A descriptive name shown in dashboard.
// A descriptive name shown in the Dashboard.
Name *string `form:"name"`
}

Expand All @@ -112,7 +112,7 @@ func (p *BillingCreditGrantParams) AddMetadata(key string, value string) {
p.Metadata[key] = value
}

// Expires a credit grant
// Expires a credit grant.
type BillingCreditGrantExpireParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand All @@ -124,7 +124,7 @@ func (p *BillingCreditGrantExpireParams) AddExpand(f string) {
p.Expand = append(p.Expand, &f)
}

// Voids a credit grant
// Voids a credit grant.
type BillingCreditGrantVoidGrantParams struct {
Params `form:"*"`
// Specifies which fields in the response should be expanded.
Expand All @@ -150,7 +150,7 @@ type BillingCreditGrantAmount struct {
Type BillingCreditGrantAmountType `json:"type"`
}
type BillingCreditGrantApplicabilityConfigScope struct {
// The price type to which credit grants can apply to. We currently only support `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
// The price type for which credit grants can apply. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them.
PriceType BillingCreditGrantApplicabilityConfigScopePriceType `json:"price_type"`
}
type BillingCreditGrantApplicabilityConfig struct {
Expand All @@ -160,20 +160,19 @@ type BillingCreditGrantApplicabilityConfig struct {
// A credit grant is an API resource that documents the allocation of some billing credits to a customer.
//
// Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits)
// end
type BillingCreditGrant struct {
APIResource
Amount *BillingCreditGrantAmount `json:"amount"`
ApplicabilityConfig *BillingCreditGrantApplicabilityConfig `json:"applicability_config"`
// The category of this credit grant. This is for tracking purposes and will not be displayed to the customer.
// The category of this credit grant. This is for tracking purposes and isn't displayed to the customer.
Category BillingCreditGrantCategory `json:"category"`
// Time at which the object was created. Measured in seconds since the Unix epoch.
Created int64 `json:"created"`
// ID of the customer to whom the billing credits are granted.
// ID of the customer receiving the billing credits.
Customer *Customer `json:"customer"`
// The time when the billing credits become effective i.e when they are eligible to be used.
// The time when the billing credits become effectivewhen they're eligible for use.
EffectiveAt int64 `json:"effective_at"`
// The time when the billing credits will expire. If not present, the billing credits will never expire.
// The time when the billing credits expire. If not present, the billing credits don't expire.
ExpiresAt int64 `json:"expires_at"`
// Unique identifier for the object.
ID string `json:"id"`
Expand Down
2 changes: 1 addition & 1 deletion paymentintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -3156,7 +3156,7 @@ type PaymentIntentParams struct {
PaymentMethodData *PaymentIntentPaymentMethodDataParams `form:"payment_method_data"`
// Payment-method-specific configuration for this PaymentIntent.
PaymentMethodOptions *PaymentIntentPaymentMethodOptionsParams `form:"payment_method_options"`
// The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, it defaults to ["card"]. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods).
// The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
PaymentMethodTypes []*string `form:"payment_method_types"`
// Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session).
RadarOptions *PaymentIntentRadarOptionsParams `form:"radar_options"`
Expand Down
2 changes: 1 addition & 1 deletion setupintent.go
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ type SetupIntentParams struct {
PaymentMethodData *SetupIntentPaymentMethodDataParams `form:"payment_method_data"`
// Payment method-specific configuration for this SetupIntent.
PaymentMethodOptions *SetupIntentPaymentMethodOptionsParams `form:"payment_method_options"`
// The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this array, it defaults to ["card"].
// The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods).
PaymentMethodTypes []*string `form:"payment_method_types"`
// The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm).
ReturnURL *string `form:"return_url"`
Expand Down

0 comments on commit 5bf3ff4

Please sign in to comment.