Class: ModernTreasury::Models::Counterparty::Account

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/counterparty.rb

Defined Under Namespace

Modules: PartyType, VerificationSource, VerificationStatus

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id: nil, account_details: nil, account_type: nil, contact_details: nil, created_at: nil, discarded_at: nil, external_id: nil, ledger_account_id: nil, live_mode: nil, metadata: nil, name: nil, object: nil, party_address: nil, party_name: nil, party_type: nil, routing_details: nil, updated_at: nil, verification_source: nil, verification_status: nil) ⇒ Object

Some parameter documentations has been truncated, see ModernTreasury::Models::Counterparty::Account for more details.

Parameters:



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/modern_treasury/models/counterparty.rb', line 123

class  < ModernTreasury::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String, nil]
  optional :id, String

  # @!attribute account_details
  #
  #   @return [Array<ModernTreasury::Models::AccountDetail>, nil]
  optional :account_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::AccountDetail] }

  # @!attribute account_type
  #   Can be `checking`, `savings` or `other`.
  #
  #   @return [Symbol, ModernTreasury::Models::ExternalAccountType, nil]
  optional :account_type, enum: -> { ModernTreasury::ExternalAccountType }

  # @!attribute contact_details
  #
  #   @return [Array<ModernTreasury::Models::ContactDetail>, nil]
  optional :contact_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetail] }

  # @!attribute created_at
  #
  #   @return [Time, nil]
  optional :created_at, Time

  # @!attribute discarded_at
  #
  #   @return [Time, nil]
  optional :discarded_at, Time, nil?: true

  # @!attribute external_id
  #   An optional user-defined 180 character unique identifier.
  #
  #   @return [String, nil]
  optional :external_id, String, nil?: true

  # @!attribute ledger_account_id
  #   If the external account links to a ledger account in Modern Treasury, the id of
  #   the ledger account will be populated here.
  #
  #   @return [String, nil]
  optional :ledger_account_id, String, nil?: true

  # @!attribute live_mode
  #   This field will be true if this object exists in the live environment or false
  #   if it exists in the test environment.
  #
  #   @return [Boolean, nil]
  optional :live_mode, ModernTreasury::Internal::Type::Boolean

  # @!attribute metadata
  #   Additional data represented as key-value pairs. Both the key and value must be
  #   strings.
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

  # @!attribute name
  #   A nickname for the external account. This is only for internal usage and won't
  #   affect any payments
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute object
  #
  #   @return [String, nil]
  optional :object, String

  # @!attribute party_address
  #   The address associated with the owner or `null`.
  #
  #   @return [ModernTreasury::Models::Address, nil]
  optional :party_address, -> { ModernTreasury::Address }, nil?: true

  # @!attribute party_name
  #   The legal name of the entity which owns the account.
  #
  #   @return [String, nil]
  optional :party_name, String

  # @!attribute party_type
  #   Either `individual` or `business`.
  #
  #   @return [Symbol, ModernTreasury::Models::Counterparty::Account::PartyType, nil]
  optional :party_type, enum: -> { ModernTreasury::Counterparty::::PartyType }, nil?: true

  # @!attribute routing_details
  #
  #   @return [Array<ModernTreasury::Models::RoutingDetail>, nil]
  optional :routing_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::RoutingDetail] }

  # @!attribute updated_at
  #
  #   @return [Time, nil]
  optional :updated_at, Time

  # @!attribute verification_source
  #
  #   @return [Symbol, ModernTreasury::Models::Counterparty::Account::VerificationSource, nil]
  optional :verification_source,
           enum: -> { ModernTreasury::Counterparty::::VerificationSource },
           nil?: true

  # @!attribute verification_status
  #
  #   @return [Symbol, ModernTreasury::Models::Counterparty::Account::VerificationStatus, nil]
  optional :verification_status, enum: -> { ModernTreasury::Counterparty::::VerificationStatus }

  # @!method initialize(id: nil, account_details: nil, account_type: nil, contact_details: nil, created_at: nil, discarded_at: nil, external_id: nil, ledger_account_id: nil, live_mode: nil, metadata: nil, name: nil, object: nil, party_address: nil, party_name: nil, party_type: nil, routing_details: nil, updated_at: nil, verification_source: nil, verification_status: nil)
  #   Some parameter documentations has been truncated, see
  #   {ModernTreasury::Models::Counterparty::Account} for more details.
  #
  #   @param id [String]
  #
  #   @param account_details [Array<ModernTreasury::Models::AccountDetail>]
  #
  #   @param account_type [Symbol, ModernTreasury::Models::ExternalAccountType] Can be `checking`, `savings` or `other`.
  #
  #   @param contact_details [Array<ModernTreasury::Models::ContactDetail>]
  #
  #   @param created_at [Time]
  #
  #   @param discarded_at [Time, nil]
  #
  #   @param external_id [String, nil] An optional user-defined 180 character unique identifier.
  #
  #   @param ledger_account_id [String, nil] If the external account links to a ledger account in Modern Treasury, the id of
  #
  #   @param live_mode [Boolean] This field will be true if this object exists in the live environment or false i
  #
  #   @param metadata [Hash{Symbol=>String}] Additional data represented as key-value pairs. Both the key and value must be s
  #
  #   @param name [String, nil] A nickname for the external account. This is only for internal usage and won't a
  #
  #   @param object [String]
  #
  #   @param party_address [ModernTreasury::Models::Address, nil] The address associated with the owner or `null`.
  #
  #   @param party_name [String] The legal name of the entity which owns the account.
  #
  #   @param party_type [Symbol, ModernTreasury::Models::Counterparty::Account::PartyType, nil] Either `individual` or `business`.
  #
  #   @param routing_details [Array<ModernTreasury::Models::RoutingDetail>]
  #
  #   @param updated_at [Time]
  #
  #   @param verification_source [Symbol, ModernTreasury::Models::Counterparty::Account::VerificationSource, nil]
  #
  #   @param verification_status [Symbol, ModernTreasury::Models::Counterparty::Account::VerificationStatus]

  # Either `individual` or `business`.
  #
  # @see ModernTreasury::Models::Counterparty::Account#party_type
  module PartyType
    extend ModernTreasury::Internal::Type::Enum

    BUSINESS = :business
    INDIVIDUAL = :individual

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see ModernTreasury::Models::Counterparty::Account#verification_source
  module VerificationSource
    extend ModernTreasury::Internal::Type::Enum

    ACH_PRENOTE = :ach_prenote
    MICRODEPOSITS = :microdeposits
    PLAID = :plaid

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see ModernTreasury::Models::Counterparty::Account#verification_status
  module VerificationStatus
    extend ModernTreasury::Internal::Type::Enum

    PENDING_VERIFICATION = :pending_verification
    UNVERIFIED = :unverified
    VERIFIED = :verified

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#account_detailsArray<ModernTreasury::Models::AccountDetail>?

Returns:



132
# File 'lib/modern_treasury/models/counterparty.rb', line 132

optional :account_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::AccountDetail] }

#account_typeSymbol, ...

Can be ‘checking`, `savings` or `other`.



138
# File 'lib/modern_treasury/models/counterparty.rb', line 138

optional :account_type, enum: -> { ModernTreasury::ExternalAccountType }

#contact_detailsArray<ModernTreasury::Models::ContactDetail>?

Returns:



143
# File 'lib/modern_treasury/models/counterparty.rb', line 143

optional :contact_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::ContactDetail] }

#created_atTime?

Returns:

  • (Time, nil)


148
# File 'lib/modern_treasury/models/counterparty.rb', line 148

optional :created_at, Time

#discarded_atTime?

Returns:

  • (Time, nil)


153
# File 'lib/modern_treasury/models/counterparty.rb', line 153

optional :discarded_at, Time, nil?: true

#external_idString?

An optional user-defined 180 character unique identifier.

Returns:

  • (String, nil)


159
# File 'lib/modern_treasury/models/counterparty.rb', line 159

optional :external_id, String, nil?: true

#idString?

Returns:

  • (String, nil)


127
# File 'lib/modern_treasury/models/counterparty.rb', line 127

optional :id, String

#ledger_account_idString?

If the external account links to a ledger account in Modern Treasury, the id of the ledger account will be populated here.

Returns:

  • (String, nil)


166
# File 'lib/modern_treasury/models/counterparty.rb', line 166

optional :ledger_account_id, String, nil?: true

#live_modeBoolean?

This field will be true if this object exists in the live environment or false if it exists in the test environment.

Returns:

  • (Boolean, nil)


173
# File 'lib/modern_treasury/models/counterparty.rb', line 173

optional :live_mode, ModernTreasury::Internal::Type::Boolean

#metadataHash{Symbol=>String}?

Additional data represented as key-value pairs. Both the key and value must be strings.

Returns:

  • (Hash{Symbol=>String}, nil)


180
# File 'lib/modern_treasury/models/counterparty.rb', line 180

optional :metadata, ModernTreasury::Internal::Type::HashOf[String]

#nameString?

A nickname for the external account. This is only for internal usage and won’t affect any payments

Returns:

  • (String, nil)


187
# File 'lib/modern_treasury/models/counterparty.rb', line 187

optional :name, String, nil?: true

#objectString?

Returns:

  • (String, nil)


192
# File 'lib/modern_treasury/models/counterparty.rb', line 192

optional :object, String

#party_addressModernTreasury::Models::Address?

The address associated with the owner or ‘null`.



198
# File 'lib/modern_treasury/models/counterparty.rb', line 198

optional :party_address, -> { ModernTreasury::Address }, nil?: true

#party_nameString?

The legal name of the entity which owns the account.

Returns:

  • (String, nil)


204
# File 'lib/modern_treasury/models/counterparty.rb', line 204

optional :party_name, String

#party_typeSymbol, ...

Either ‘individual` or `business`.



210
# File 'lib/modern_treasury/models/counterparty.rb', line 210

optional :party_type, enum: -> { ModernTreasury::Counterparty::::PartyType }, nil?: true

#routing_detailsArray<ModernTreasury::Models::RoutingDetail>?

Returns:



215
# File 'lib/modern_treasury/models/counterparty.rb', line 215

optional :routing_details, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::RoutingDetail] }

#updated_atTime?

Returns:

  • (Time, nil)


220
# File 'lib/modern_treasury/models/counterparty.rb', line 220

optional :updated_at, Time

#verification_sourceSymbol, ...



225
226
227
# File 'lib/modern_treasury/models/counterparty.rb', line 225

optional :verification_source,
enum: -> { ModernTreasury::Counterparty::::VerificationSource },
nil?: true

#verification_statusSymbol, ...



232
# File 'lib/modern_treasury/models/counterparty.rb', line 232

optional :verification_status, enum: -> { ModernTreasury::Counterparty::::VerificationStatus }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/counterparty.rb', line 285