diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 3c560ddf2..577f393c0 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v482 \ No newline at end of file +v484 \ No newline at end of file diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index 72aaf00e7..216323b0f 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -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, @@ -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/%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/%s/preview_subscription_schedules", { quote: CGI.escape(self["id"]) }), - params: params, - opts: opts - ) - end - def reestimate(params = {}, opts = {}) request_stripe_object( method: :post, @@ -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/%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/%s/preview_subscription_schedules", { quote: CGI.escape(quote) }), - params: params, - opts: opts - ) - end - def self.reestimate(quote, params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index e6c191bfa..abf093a16 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -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 diff --git a/lib/stripe/resources/quote_preview_schedule.rb b/lib/stripe/resources/quote_preview_schedule.rb index d6e7477ca..05c5cc700 100644 --- a/lib/stripe/resources/quote_preview_schedule.rb +++ b/lib/stripe/resources/quote_preview_schedule.rb @@ -3,6 +3,8 @@ module Stripe class QuotePreviewSchedule < APIResource + extend Stripe::APIOperations::List + OBJECT_NAME = "quote_preview_schedule" end end