From d10398a825a242fc9a1e425b12a2cbd579bc190e Mon Sep 17 00:00:00 2001 From: Richard Marmorstein Date: Thu, 2 Feb 2023 15:06:51 -0600 Subject: [PATCH] Codegen for openapi v223 --- OPENAPI_VERSION | 2 +- lib/stripe/object_types.rb | 2 ++ lib/stripe/resources.rb | 2 ++ .../resources/financial_connections/account.rb | 3 +++ .../financial_connections/inferred_balance.rb | 13 +++++++++++++ .../resources/financial_connections/transaction.rb | 13 +++++++++++++ 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 lib/stripe/resources/financial_connections/inferred_balance.rb create mode 100644 lib/stripe/resources/financial_connections/transaction.rb diff --git a/OPENAPI_VERSION b/OPENAPI_VERSION index 73d5d6e51..4e134f2a9 100644 --- a/OPENAPI_VERSION +++ b/OPENAPI_VERSION @@ -1 +1 @@ -v221 \ No newline at end of file +v223 \ No newline at end of file diff --git a/lib/stripe/object_types.rb b/lib/stripe/object_types.rb index 3ad4b7ed5..e4e668357 100644 --- a/lib/stripe/object_types.rb +++ b/lib/stripe/object_types.rb @@ -51,7 +51,9 @@ def self.object_names_to_classes FinancialConnections::AccountOwner::OBJECT_NAME => FinancialConnections::AccountOwner, FinancialConnections::AccountOwnership::OBJECT_NAME => FinancialConnections::AccountOwnership, + FinancialConnections::InferredBalance::OBJECT_NAME => FinancialConnections::InferredBalance, FinancialConnections::Session::OBJECT_NAME => FinancialConnections::Session, + FinancialConnections::Transaction::OBJECT_NAME => FinancialConnections::Transaction, FundingInstructions::OBJECT_NAME => FundingInstructions, GiftCards::Card::OBJECT_NAME => GiftCards::Card, GiftCards::Transaction::OBJECT_NAME => GiftCards::Transaction, diff --git a/lib/stripe/resources.rb b/lib/stripe/resources.rb index 3442d3bb5..b19511c42 100644 --- a/lib/stripe/resources.rb +++ b/lib/stripe/resources.rb @@ -38,7 +38,9 @@ require "stripe/resources/financial_connections/account" require "stripe/resources/financial_connections/account_owner" require "stripe/resources/financial_connections/account_ownership" +require "stripe/resources/financial_connections/inferred_balance" require "stripe/resources/financial_connections/session" +require "stripe/resources/financial_connections/transaction" require "stripe/resources/funding_instructions" require "stripe/resources/gift_cards/card" require "stripe/resources/gift_cards/transaction" diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index 90c9950f3..e20af530e 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -6,9 +6,12 @@ module FinancialConnections # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. class Account < APIResource extend Stripe::APIOperations::List + extend Stripe::APIOperations::NestedResource OBJECT_NAME = "financial_connections.account" + nested_resource_class_methods :inferred_balance, operations: %i[list] + def disconnect(params = {}, opts = {}) request_stripe_object( method: :post, diff --git a/lib/stripe/resources/financial_connections/inferred_balance.rb b/lib/stripe/resources/financial_connections/inferred_balance.rb new file mode 100644 index 000000000..2870e8cb2 --- /dev/null +++ b/lib/stripe/resources/financial_connections/inferred_balance.rb @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +module Stripe + module FinancialConnections + # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. + class InferredBalance < APIResource + extend Stripe::APIOperations::List + + OBJECT_NAME = "financial_connections.account_inferred_balance" + 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