From 76227029e7114e790239cd02adbfa07efcf60b62 Mon Sep 17 00:00:00 2001 From: Annie Li Date: Thu, 5 Oct 2023 11:01:21 -0700 Subject: [PATCH 1/2] Bump version to 9.4.0 --- CHANGELOG.md | 5 +++++ VERSION | 2 +- lib/stripe/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b8f2f77ee..38a7f0c26 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## 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.3.0 - 2023-09-14 * [#1272](https://github.com/stripe/stripe-ruby/pull/1272) Update generated code * Add support for new resource `PaymentMethodConfiguration` diff --git a/VERSION b/VERSION index b13d146a7..8148c5594 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -9.3.0 +9.4.0 diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index ef5e2e87a..9c195ff45 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Stripe - VERSION = "9.3.0" + VERSION = "9.4.0" end From 86f5a8ac5c86ac4fde1f37bc28ca623a11063b34 Mon Sep 17 00:00:00 2001 From: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 17:53:17 +0000 Subject: [PATCH 2/2] Update generated code for v591 --- OPENAPI_VERSION | 2 +- lib/stripe/object_types.rb | 2 + lib/stripe/resources.rb | 2 + lib/stripe/resources/account_notice.rb | 14 ++++ .../issuing/credit_underwriting_record.rb | 69 +++++++++++++++++++ 5 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 lib/stripe/resources/account_notice.rb create mode 100644 lib/stripe/resources/issuing/credit_underwriting_record.rb 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