Skip to content

Commit

Permalink
Merge pull request #1265 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] authored Aug 31, 2023
2 parents fee9143 + c3b05c5 commit 8dfa6f6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 37 deletions.
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

0 comments on commit 8dfa6f6

Please sign in to comment.