diff --git a/CHANGELOG.md b/CHANGELOG.md index ccfa67beb..7b4e1083d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ * Remove support for `draft_quote` and `mark_stale_quote` methods on resource `Quote` * Rename `preview_invoice_lines` to `list_preview_invoice_lines` on resource `Quote` +## 9.4.0 - 2023-10-05 +* [#1277](https://github.com/stripe/stripe-ruby/pull/1277) Update generated code + * Add support for new resources `Issuing.Token` + * Add support for `list`, `retrieve`, and `update` methods on resource `Token` ## 9.4.0-beta.3 - 2023-09-28 * [#1276](https://github.com/stripe/stripe-ruby/pull/1276) Update generated code for beta diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 849d00a97..8a06d2260 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v582 \ No newline at end of file +v591 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index c0124c0e9..6cf908d57 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -14,6 +14,7 @@ def self.object_names_to_classes # business objects Account::OBJECT_NAME => Account, AccountLink::OBJECT_NAME => AccountLink, + AccountNotice::OBJECT_NAME => AccountNotice, AccountSession::OBJECT_NAME => AccountSession, ApplePayDomain::OBJECT_NAME => ApplePayDomain, ApplicationFee::OBJECT_NAME => ApplicationFee, @@ -68,6 +69,7 @@ def self.object_names_to_classes Issuing::Authorization::OBJECT_NAME => Issuing::Authorization, Issuing::Card::OBJECT_NAME => Issuing::Card, Issuing::Cardholder::OBJECT_NAME => Issuing::Cardholder, + Issuing::CreditUnderwritingRecord::OBJECT_NAME => Issuing::CreditUnderwritingRecord, Issuing::Dispute::OBJECT_NAME => Issuing::Dispute, Issuing::PersonalizationDesign::OBJECT_NAME => Issuing::PersonalizationDesign, Issuing::PhysicalBundle::OBJECT_NAME => Issuing::PhysicalBundle, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index 8c3f6abb9..6cb5544b8 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -3,6 +3,7 @@ require "stripe/resources/account" require "stripe/resources/account_link" +require "stripe/resources/account_notice" require "stripe/resources/account_session" require "stripe/resources/apple_pay_domain" require "stripe/resources/application_fee" @@ -54,6 +55,7 @@ require "stripe/resources/issuing/authorization" require "stripe/resources/issuing/card" require "stripe/resources/issuing/cardholder" +require "stripe/resources/issuing/credit_underwriting_record" require "stripe/resources/issuing/dispute" require "stripe/resources/issuing/personalization_design" require "stripe/resources/issuing/physical_bundle" diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb new file mode 100644 index 000000000..3ed13d07c --- /dev/null +++ b/lib/stripe/resources/account_notice.rb @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + # A notice to a Connected account. Notice can be sent by Stripe on your behalf or you can opt to send the notices yourself. + # + # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. + class AccountNotice < APIResource + extend Stripe::APIOperations::List + include Stripe::APIOperations::Save + + OBJECT_NAME = "account_notice" + end +end diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb new file mode 100644 index 000000000..a370b8d5e --- /dev/null +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -0,0 +1,69 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module Issuing + # Every time an applicant submits an application for a Charge Card product your Platform offers, or every time your Platform takes a proactive credit decision on an existing account, you must record the decision by creating a new CreditUnderwritingRecord object on a Connected account. + # + # [Follow the guide](https://stripe.com/docs/issuing/coming_soon) to learn about your requirements as a Platform. + class CreditUnderwritingRecord < APIResource + extend Stripe::APIOperations::List + + OBJECT_NAME = "issuing.credit_underwriting_record" + + def correct(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/issuing/credit_underwriting_records/%s/correct", { credit_underwriting_record: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + def report_decision(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/issuing/credit_underwriting_records/%s/report_decision", { credit_underwriting_record: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + def self.correct(credit_underwriting_record, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/issuing/credit_underwriting_records/%s/correct", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }), + params: params, + opts: opts + ) + end + + def self.create_from_application(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: "/v1/issuing/credit_underwriting_records/create_from_application", + params: params, + opts: opts + ) + end + + def self.create_from_proactive_review(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: "/v1/issuing/credit_underwriting_records/create_from_proactive_review", + params: params, + opts: opts + ) + end + + def self.report_decision(credit_underwriting_record, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/issuing/credit_underwriting_records/%s/report_decision", { credit_underwriting_record: CGI.escape(credit_underwriting_record) }), + params: params, + opts: opts + ) + end + end + end +end