Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update generated code for beta #1265

Merged
merged 1 commit into from
Aug 31, 2023
Merged
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 OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v482
v484
41 changes: 5 additions & 36 deletions lib/stripe/resources/quote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ class Quote < APIResource
extend Stripe::APIOperations::Create
extend Stripe::APIOperations::List
include Stripe::APIOperations::Save
extend Stripe::APIOperations::NestedResource

OBJECT_NAME = "quote"

nested_resource_class_methods :preview_invoice, operations: %i[list]
nested_resource_class_methods :preview_subscription_schedule,
operations: %i[list]

def accept(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -104,24 +109,6 @@ def preview_invoice_lines(preview_invoice, params = {}, opts = {})
)
end

def preview_invoices(params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

def preview_subscription_schedules(params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

def reestimate(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -229,24 +216,6 @@ def self.preview_invoice_lines(
)
end

def self.preview_invoices(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoices", { quote: CGI.escape(quote) }),
params: params,
opts: opts
)
end

def self.preview_subscription_schedules(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_subscription_schedules", { quote: CGI.escape(quote) }),
params: params,
opts: opts
)
end

def self.reestimate(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
2 changes: 2 additions & 0 deletions lib/stripe/resources/quote_preview_invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module Stripe
#
# Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending)
class QuotePreviewInvoice < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "quote_preview_invoice"
end
end
2 changes: 2 additions & 0 deletions lib/stripe/resources/quote_preview_schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

module Stripe
class QuotePreviewSchedule < APIResource
extend Stripe::APIOperations::List

OBJECT_NAME = "quote_preview_schedule"
end
end