diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index c523b8984..409300d1c 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v682 \ No newline at end of file +v734 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index 9f6d0ed07..d8ea55d6d 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -52,6 +52,7 @@ def self.object_names_to_classes FinancialConnections::AccountOwnership::OBJECT_NAME => FinancialConnections::AccountOwnership, FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session, + FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction, FundingInstructions::OBJECT_NAME => FundingInstructions, Identity::VerificationReport::OBJECT_NAME => Identity::VerificationReport, Identity::VerificationSession::OBJECT_NAME => Identity::VerificationSession, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index acf63de65..a95da79a4 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -39,6 +39,7 @@ require "stripe/resources/financial_connections/account_owner" require "stripe/resources/financial_connections/account_ownership" require "stripe/resources/financial_connections/session" +require "stripe/resources/financial_connections/transaction" require "stripe/resources/funding_instructions" require "stripe/resources/identity/verification_report" require "stripe/resources/identity/verification_session" diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index c389adf4a..2bfaf103d 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -5,7 +5,7 @@ module Stripe # This object represents files hosted on Stripe's servers. You can upload # files with the [create file](https://stripe.com/docs/api#create_file) request # (for example, when uploading dispute evidence). Stripe also - # creates files independetly (for example, the results of a [Sigma scheduled + # creates files independently (for example, the results of a [Sigma scheduled # query](https://stripe.com/docs/api#scheduled_queries)). # # Related guide: [File upload guide](https://stripe.com/docs/file-upload) diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index 90c9950f3..2186ab849 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -36,6 +36,24 @@ def refresh_account(params = {}, opts = {}) ) end + def subscribe(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/financial_connections/accounts/%s/subscribe", { account: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + + def unsubscribe(params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/financial_connections/accounts/%s/unsubscribe", { account: CGI.escape(self["id"]) }), + params: params, + opts: opts + ) + end + def self.disconnect(account, params = {}, opts = {}) request_stripe_object( method: :post, @@ -62,6 +80,24 @@ def self.refresh_account(account, params = {}, opts = {}) opts: opts ) end + + def self.subscribe(account, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/financial_connections/accounts/%s/subscribe", { account: CGI.escape(account) }), + params: params, + opts: opts + ) + end + + def self.unsubscribe(account, params = {}, opts = {}) + request_stripe_object( + method: :post, + path: format("/v1/financial_connections/accounts/%s/unsubscribe", { account: CGI.escape(account) }), + params: params, + opts: opts + ) + end end end end diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb new file mode 100644 index 000000000..64d5d0c68 --- /dev/null +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A Transaction represents a real transaction that affects a Financial Connections Account balance. + class Transaction < APIResource + extend Stripe::APIOperations::List + + OBJECT_NAME = "financial_connections.transaction" + end + end +end diff --git a/test/stripe/generated_examples_test.rb b/test/stripe/generated_examples_test.rb index 96a9516e2..fe24baf5a 100644 --- a/test/stripe/generated_examples_test.rb +++ b/test/stripe/generated_examples_test.rb @@ -613,6 +613,14 @@ class CodegennedExampleTest < Test::Unit::TestCase Stripe::FinancialConnections::Account.refresh_account("fca_xyz", { features: ["balance"] }) assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fca_xyz/refresh" end + should "Test financial connections accounts subscribe post" do + Stripe::FinancialConnections::Account.subscribe("fa_123", { features: ["transactions"] }) + assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fa_123/subscribe" + end + should "Test financial connections accounts unsubscribe post" do + Stripe::FinancialConnections::Account.unsubscribe("fa_123", { features: ["transactions"] }) + assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/accounts/fa_123/unsubscribe" + end should "Test financial connections sessions get" do Stripe::FinancialConnections::Session.retrieve("fcsess_xyz") assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/sessions/fcsess_xyz?" @@ -642,6 +650,14 @@ class CodegennedExampleTest < Test::Unit::TestCase }) assert_requested :post, "#{Stripe.api_base}/v1/financial_connections/sessions" end + should "Test financial connections transactions get" do + Stripe::FinancialConnections::Transaction.retrieve("tr_123") + assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/transactions/tr_123?" + end + should "Test financial connections transactions get 2" do + Stripe::FinancialConnections::Transaction.list({ account: "fca_xyz" }) + assert_requested :get, "#{Stripe.api_base}/v1/financial_connections/transactions?account=fca_xyz" + end should "Test identity verification reports get" do Stripe::Identity::VerificationReport.list({ limit: 3 }) assert_requested :get, "#{Stripe.api_base}/v1/identity/verification_reports?limit=3" @@ -1571,6 +1587,22 @@ class CodegennedExampleTest < Test::Unit::TestCase Stripe::TaxRate.update("txr_xxxxxxxxxxxxx", { active: false }) assert_requested :post, "#{Stripe.api_base}/v1/tax_rates/txr_xxxxxxxxxxxxx" end + should "Test tax registrations get" do + Stripe::Tax::Registration.list({ status: "all" }) + assert_requested :get, "#{Stripe.api_base}/v1/tax/registrations?status=all" + end + should "Test tax registrations post" do + Stripe::Tax::Registration.create({ + country: "IE", + country_options: { ie: { type: "oss_union" } }, + active_from: "now", + }) + assert_requested :post, "#{Stripe.api_base}/v1/tax/registrations" + end + should "Test tax registrations post 2" do + Stripe::Tax::Registration.update("taxreg_xxxxxxxxxxxxx", { expires_at: "now" }) + assert_requested :post, "#{Stripe.api_base}/v1/tax/registrations/taxreg_xxxxxxxxxxxxx" + end should "Test tax settings get" do Stripe::Tax::Settings.retrieve assert_requested :get, "#{Stripe.api_base}/v1/tax/settings?"