Class: Stripe::Treasury::FinancialAccount
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Treasury::FinancialAccount
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/treasury/financial_account.rb
Overview
Stripe Treasury provides users with a container for money called a FinancialAccount that is separate from their Payments balance. FinancialAccounts serve as the source and destination of Treasury’s money movement APIs.
Defined Under Namespace
Classes: Balance, FinancialAddress, PlatformRestrictions, StatusDetails
Constant Summary collapse
- OBJECT_NAME =
"treasury.financial_account"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#active_features ⇒ Object
readonly
The array of paths to active Features in the Features hash.
-
#balance ⇒ Object
readonly
Balance information for the FinancialAccount.
-
#country ⇒ Object
readonly
Two-letter country code ([ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#display_name ⇒ Object
readonly
The display name for the FinancialAccount.
-
#features ⇒ Object
readonly
Encodes whether a FinancialAccount has access to a particular Feature, with a ‘status` enum and associated `status_details`.
-
#financial_addresses ⇒ Object
readonly
The set of credentials that resolve to a FinancialAccount.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#pending_features ⇒ Object
readonly
The array of paths to pending Features in the Features hash.
-
#platform_restrictions ⇒ Object
readonly
The set of functionalities that the platform can restrict on the FinancialAccount.
-
#restricted_features ⇒ Object
readonly
The array of paths to restricted Features in the Features hash.
-
#status ⇒ Object
readonly
Status of this FinancialAccount.
-
#status_details ⇒ Object
readonly
Attribute for field status_details.
-
#supported_currencies ⇒ Object
readonly
The currencies the FinancialAccount can hold a balance in.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount.
-
.list(filters = {}, opts = {}) ⇒ Object
Returns a list of FinancialAccounts.
- .object_name ⇒ Object
-
.retrieve_features(financial_account, params = {}, opts = {}) ⇒ Object
Retrieves Features information associated with the FinancialAccount.
-
.update(id, params = {}, opts = {}) ⇒ Object
Updates the details of a FinancialAccount.
-
.update_features(financial_account, params = {}, opts = {}) ⇒ Object
Updates the Features associated with a FinancialAccount.
Instance Method Summary collapse
-
#retrieve_features(params = {}, opts = {}) ⇒ Object
Retrieves Features information associated with the FinancialAccount.
-
#update_features(params = {}, opts = {}) ⇒ Object
Updates the Features associated with a FinancialAccount.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#active_features ⇒ Object (readonly)
The array of paths to active Features in the Features hash.
40 41 42 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 40 def active_features @active_features end |
#balance ⇒ Object (readonly)
Balance information for the FinancialAccount
42 43 44 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 42 def balance @balance end |
#country ⇒ Object (readonly)
Two-letter country code ([ISO 3166-1 alpha-2](en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
44 45 46 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 44 def country @country end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
46 47 48 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 46 def created @created end |
#display_name ⇒ Object (readonly)
The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the ‘nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts.
48 49 50 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 48 def display_name @display_name end |
#features ⇒ Object (readonly)
Encodes whether a FinancialAccount has access to a particular Feature, with a ‘status` enum and associated `status_details`. Stripe or the platform can control Features via the requested field.
51 52 53 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 51 def features @features end |
#financial_addresses ⇒ Object (readonly)
The set of credentials that resolve to a FinancialAccount.
53 54 55 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 53 def financial_addresses @financial_addresses end |
#id ⇒ Object (readonly)
Unique identifier for the object.
55 56 57 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 55 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
57 58 59 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 57 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
59 60 61 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 59 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
61 62 63 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 61 def object @object end |
#pending_features ⇒ Object (readonly)
The array of paths to pending Features in the Features hash.
63 64 65 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 63 def pending_features @pending_features end |
#platform_restrictions ⇒ Object (readonly)
The set of functionalities that the platform can restrict on the FinancialAccount.
65 66 67 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 65 def platform_restrictions @platform_restrictions end |
#restricted_features ⇒ Object (readonly)
The array of paths to restricted Features in the Features hash.
67 68 69 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 67 def restricted_features @restricted_features end |
#status ⇒ Object (readonly)
Status of this FinancialAccount.
69 70 71 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 69 def status @status end |
#status_details ⇒ Object (readonly)
Attribute for field status_details
71 72 73 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 71 def status_details @status_details end |
#supported_currencies ⇒ Object (readonly)
The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
73 74 75 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 73 def supported_currencies @supported_currencies end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount.
76 77 78 79 80 81 82 83 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 76 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/treasury/financial_accounts", params: params, opts: opts ) end |
.list(filters = {}, opts = {}) ⇒ Object
Returns a list of FinancialAccounts.
86 87 88 89 90 91 92 93 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 86 def self.list(filters = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/financial_accounts", params: filters, opts: opts ) end |
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 14 def self.object_name "treasury.financial_account" end |
.retrieve_features(financial_account, params = {}, opts = {}) ⇒ Object
Retrieves Features information associated with the FinancialAccount.
106 107 108 109 110 111 112 113 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 106 def self.retrieve_features(financial_account, params = {}, opts = {}) request_stripe_object( method: :get, path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }), params: params, opts: opts ) end |
.update(id, params = {}, opts = {}) ⇒ Object
Updates the details of a FinancialAccount.
116 117 118 119 120 121 122 123 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 116 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/financial_accounts/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.update_features(financial_account, params = {}, opts = {}) ⇒ Object
Updates the Features associated with a FinancialAccount.
136 137 138 139 140 141 142 143 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 136 def self.update_features(financial_account, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(financial_account) }), params: params, opts: opts ) end |
Instance Method Details
#retrieve_features(params = {}, opts = {}) ⇒ Object
Retrieves Features information associated with the FinancialAccount.
96 97 98 99 100 101 102 103 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 96 def retrieve_features(params = {}, opts = {}) request_stripe_object( method: :get, path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#update_features(params = {}, opts = {}) ⇒ Object
Updates the Features associated with a FinancialAccount.
126 127 128 129 130 131 132 133 |
# File 'lib/stripe/resources/treasury/financial_account.rb', line 126 def update_features(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/treasury/financial_accounts/%<financial_account>s/features", { financial_account: CGI.escape(self["id"]) }), params: params, opts: opts ) end |