Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion API_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025-09-30.clover
13e48677b8744cdd8170f92a48ed598952515497
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2028
v2042
3 changes: 2 additions & 1 deletion billing_metereventsummary.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ package stripe
// Retrieve a list of billing meter event summaries.
type BillingMeterEventSummaryListParams struct {
ListParams `form:"*"`
ID *string `form:"-"` // Included in URL
// Unique identifier for the object.
ID *string `form:"-"` // Included in URL
// The customer for which to fetch event summaries.
Customer *string `form:"customer"`
// The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries.
Expand Down
4 changes: 2 additions & 2 deletions error.go
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,8 @@ func (e *IdempotencyError) Error() string {

// errorStructs: The beginning of the section generated from our OpenAPI spec

// TemporarySessionExpiredError is the Go struct corresponding to the error type "temporary_session_expired."
// Information about the error that occurred
// TemporarySessionExpiredError is the Go struct corresponding to the error type "temporary_session_expired".
// The temporary session token has expired.
type TemporarySessionExpiredError struct {
APIResource
Code string `json:"code"`
Expand Down
42 changes: 40 additions & 2 deletions example/generated_examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6479,14 +6479,52 @@ func TestPromotionCodesGet2Client(t *testing.T) {
}

func TestPromotionCodesPost(t *testing.T) {
params := &stripe.PromotionCodeParams{
Promotion: &stripe.PromotionCodePromotionParams{
Type: stripe.String("coupon"),
Coupon: stripe.String("Z4OV52SU"),
},
}
result, err := promotioncode.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
}

func TestPromotionCodesPostService(t *testing.T) {
sc := client.New(TestAPIKey, nil)
params := &stripe.PromotionCodeParams{
Promotion: &stripe.PromotionCodePromotionParams{
Type: stripe.String("coupon"),
Coupon: stripe.String("Z4OV52SU"),
},
}
result, err := sc.PromotionCodes.New(params)
assert.NotNil(t, result)
assert.Nil(t, err)
}

func TestPromotionCodesPostClient(t *testing.T) {
sc := stripe.NewClient(TestAPIKey)
params := &stripe.PromotionCodeCreateParams{
Promotion: &stripe.PromotionCodeCreatePromotionParams{
Type: stripe.String("coupon"),
Coupon: stripe.String("Z4OV52SU"),
},
}
result, err := sc.V1PromotionCodes.Create(context.TODO(), params)
assert.NotNil(t, result)
assert.Nil(t, err)
}

func TestPromotionCodesPost2(t *testing.T) {
params := &stripe.PromotionCodeParams{}
params.AddMetadata("order_id", "6735")
result, err := promotioncode.Update("promo_xxxxxxxxxxxxx", params)
assert.NotNil(t, result)
assert.Nil(t, err)
}

func TestPromotionCodesPostService(t *testing.T) {
func TestPromotionCodesPost2Service(t *testing.T) {
sc := client.New(TestAPIKey, nil)
params := &stripe.PromotionCodeParams{}
params.AddMetadata("order_id", "6735")
Expand All @@ -6495,7 +6533,7 @@ func TestPromotionCodesPostService(t *testing.T) {
assert.Nil(t, err)
}

func TestPromotionCodesPostClient(t *testing.T) {
func TestPromotionCodesPost2Client(t *testing.T) {
sc := stripe.NewClient(TestAPIKey)
params := &stripe.PromotionCodeUpdateParams{}
params.AddMetadata("order_id", "6735")
Expand Down
6 changes: 4 additions & 2 deletions invoicelineitem.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ type InvoiceLineItemTaxAmountParams struct {
// item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
// Updating an invoice's line item is only possible before the invoice is finalized.
type InvoiceLineItemParams struct {
Params `form:"*"`
Params `form:"*"`
// Invoice ID of line item
Invoice *string `form:"-"` // Included in URL
// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
Amount *int64 `form:"amount"`
Expand Down Expand Up @@ -330,7 +331,8 @@ type InvoiceLineItemUpdateTaxAmountParams struct {
// item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well.
// Updating an invoice's line item is only possible before the invoice is finalized.
type InvoiceLineItemUpdateParams struct {
Params `form:"*"`
Params `form:"*"`
// Invoice ID of line item
Invoice *string `form:"-"` // Included in URL
// The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount.
Amount *int64 `form:"amount"`
Expand Down
6 changes: 4 additions & 2 deletions productfeature.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ package stripe

// Deletes the feature attachment to a product
type ProductFeatureParams struct {
Params `form:"*"`
Params `form:"*"`
// The ID of the product.
Product *string `form:"-"` // Included in URL
// The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product.
EntitlementFeature *string `form:"entitlement_feature"`
Expand Down Expand Up @@ -42,7 +43,8 @@ type ProductFeatureDeleteParams struct {

// Retrieves a product_feature, which represents a feature attachment to a product
type ProductFeatureRetrieveParams struct {
Params `form:"*"`
Params `form:"*"`
// The ID of the product.
Product *string `form:"-"` // Included in URL
// Specifies which fields in the response should be expanded.
Expand []*string `form:"expand"`
Expand Down