Skip to content

Commit

Permalink
Merge pull request #1373 from stripe/latest-codegen-beta
Browse files Browse the repository at this point in the history
Update generated code for beta
  • Loading branch information
stripe-openapi[bot] committed Apr 4, 2024
2 parents 3822030 + 4ffefec commit b66f178
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 195 deletions.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v912
v923
11 changes: 11 additions & 0 deletions lib/stripe/resources/entitlements/feature.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module Entitlements
class Feature < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
include Stripe::APIOperations::Save

OBJECT_NAME = "entitlements.feature"
def self.object_name
Expand All @@ -33,6 +34,16 @@ def self.list(filters = {}, opts = {})
opts: opts
)
end

# Update a feature's metadata or permanently deactivate it.
def self.update(id, params = {}, opts = {})
request_stripe_object(
method: :post,
path: format("/v1/entitlements/features/%<id>s", { id: CGI.escape(id) }),
params: params,
opts: opts
)
end
end
end
end
4 changes: 2 additions & 2 deletions lib/stripe/resources/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def self.create(params = {}, opts = {})
#
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
#
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request.
def self.create_preview(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -275,7 +275,7 @@ def self.send_invoice(invoice, params = {}, opts = {})
#
# Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount.
#
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass a proration_date parameter when doing the actual subscription update. The value passed in should be the same as the subscription_proration_date returned on the upcoming invoice resource. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date on the upcoming invoice resource.
# You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_proration_date value passed in the request.
def self.upcoming(params = {}, opts = {})
request_stripe_object(method: :get, path: "/v1/invoices/upcoming", params: params, opts: opts)
end
Expand Down

0 comments on commit b66f178

Please sign in to comment.