Skip to content

Commit

Permalink
Codegen for openapi v214
Browse files Browse the repository at this point in the history
  • Loading branch information
anniel-stripe committed Dec 15, 2022
1 parent 4e879f7 commit fcfdf2e
Show file tree
Hide file tree
Showing 2 changed files with 109 additions and 1 deletion.
2 changes: 1 addition & 1 deletion OPENAPI_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v212
v214
108 changes: 108 additions & 0 deletions lib/stripe/resources/quote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ def cancel(params = {}, opts = {})
)
end

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

def finalize_quote(params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -56,6 +65,51 @@ def list_line_items(params = {}, opts = {})
)
end

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

def preview_invoice_lines(params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(self["id"]) }),
params: params,
opts: 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,
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(self["id"]) }),
params: params,
opts: opts
)
end

def self.accept(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand All @@ -74,6 +128,15 @@ def self.cancel(quote, params = {}, opts = {})
)
end

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

def self.finalize_quote(quote, params = {}, opts = {})
request_stripe_object(
method: :post,
Expand Down Expand Up @@ -101,6 +164,51 @@ def self.list_line_items(quote, params = {}, opts = {})
)
end

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

def self.preview_invoice_lines(quote, params = {}, opts = {})
request_stripe_object(
method: :get,
path: format("/v1/quotes/%<quote>s/preview_invoice_lines", { quote: CGI.escape(quote) }),
params: params,
opts: opts
)
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,
path: format("/v1/quotes/%<quote>s/reestimate", { quote: CGI.escape(quote) }),
params: params,
opts: opts
)
end

def pdf(params = {}, opts = {}, &read_body_chunk_block)
unless block_given?
raise ArgumentError, "A read_body_chunk_block block parameter is required when calling the pdf method."
Expand Down

0 comments on commit fcfdf2e

Please sign in to comment.