Skip to content

Commit

Permalink
Merge upstream and update generated code for v582
Browse files Browse the repository at this point in the history
  • Loading branch information
stripe-openapi[bot] committed Oct 5, 2023
2 parents 0030faf + 46b5734 commit 9a92aa9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
36 changes: 18 additions & 18 deletions lib/stripe/resources/quote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ def list_lines(params = {}, opts = {})
)
end

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

def mark_draft(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -99,15 +108,6 @@ def pdf(params = {}, opts = {}, &read_body_chunk_block)
)
end

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

def reestimate(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -171,6 +171,15 @@ def self.list_lines(quote, params = {}, opts = {})
)
end

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

def self.mark_draft(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -201,15 +210,6 @@ def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block)
)
end

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

def self.reestimate(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down
12 changes: 6 additions & 6 deletions test/stripe/generated_examples_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1825,19 +1825,19 @@ class CodegennedExampleTest < Test::Unit::TestCase
assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xxxxxxxxxxxxx/line_items?"
end
end
context "Quote.list_preview_invoice_lines" do
should "support requests with args: quote, preview_invoice" do
Stripe::Quote.list_preview_invoice_lines("qt_xyz", "in_xyz")
assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xyz/preview_invoices/in_xyz/lines?"
end
end
context "Quote.pdf" do
should "support requests with args: id" do
block_handler = {}
Stripe::Quote.pdf("qt_xxxxxxxxxxxxx", &block_handler)
assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xxxxxxxxxxxxx/pdf?"
end
end
context "Quote.preview_invoice_lines" do
should "support requests with args: quote, preview_invoice" do
Stripe::Quote.preview_invoice_lines("qt_xyz", "in_xyz")
assert_requested :get, "#{Stripe.api_base}/v1/quotes/qt_xyz/preview_invoices/in_xyz/lines?"
end
end
context "Quote.retrieve" do
should "support requests with args: id" do
Stripe::Quote.retrieve("qt_xxxxxxxxxxxxx")
Expand Down

0 comments on commit 9a92aa9

Please sign in to comment.