diff --git a/API_VERSION b/API_VERSION index fb72506858..50a784c118 100644 --- a/API_VERSION +++ b/API_VERSION @@ -1 +1 @@ -2025-09-30.clover \ No newline at end of file +13e48677b8744cdd8170f92a48ed598952515497 \ No newline at end of file diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index f0bb0d526f..b3493174a2 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v2028 \ No newline at end of file +v2042 \ No newline at end of file diff --git a/billing_metereventsummary.go b/billing_metereventsummary.go index c66ca6f069..5d3faaf6d3 100644 --- a/billing_metereventsummary.go +++ b/billing_metereventsummary.go @@ -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. diff --git a/error.go b/error.go index 41dcc5b3cc..59a0b982e8 100644 --- a/error.go +++ b/error.go @@ -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"` diff --git a/example/generated_examples_test.go b/example/generated_examples_test.go index d6e1271837..b6db5835c7 100644 --- a/example/generated_examples_test.go +++ b/example/generated_examples_test.go @@ -6479,6 +6479,44 @@ 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) @@ -6486,7 +6524,7 @@ func TestPromotionCodesPost(t *testing.T) { 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") @@ -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") diff --git a/invoicelineitem.go b/invoicelineitem.go index cb95f02398..b33b57d9e4 100644 --- a/invoicelineitem.go +++ b/invoicelineitem.go @@ -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"` @@ -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"` diff --git a/productfeature.go b/productfeature.go index f0fe00528a..2eef6aca57 100644 --- a/productfeature.go +++ b/productfeature.go @@ -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"` @@ -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"`