Class: ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/modern_treasury/models/virtual_account_create_params.rb,
sig/modern_treasury/models/virtual_account_create_params.rbs

Defined Under Namespace

Modules: AccountNumberType

Instance Attribute 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(account_number:, account_number_type: nil) ⇒ Object

Some parameter documentations has been truncated, see ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail for more details.

Parameters:



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
# File 'lib/modern_treasury/models/virtual_account_create_params.rb', line 129

class AccountDetail < ModernTreasury::Internal::Type::BaseModel
  # @!attribute account_number
  #   The account number for the bank account.
  #
  #   @return [String]
  required :account_number, String

  # @!attribute account_number_type
  #   The type of the account number. For wallet addresses, use the chain-specific
  #   type (e.g. `ethereum_address`). Use `other` if the account number is in a
  #   generic format.
  #
  #   @return [Symbol, ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail::AccountNumberType, nil]
  optional :account_number_type,
           enum: -> { ModernTreasury::VirtualAccountCreateParams::AccountDetail::AccountNumberType }

  # @!method initialize(account_number:, account_number_type: nil)
  #   Some parameter documentations has been truncated, see
  #   {ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail} for more
  #   details.
  #
  #   @param account_number [String] The account number for the bank account.
  #
  #   @param account_number_type [Symbol, ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail::AccountNumberType] The type of the account number. For wallet addresses, use the chain-specific typ

  # The type of the account number. For wallet addresses, use the chain-specific
  # type (e.g. `ethereum_address`). Use `other` if the account number is in a
  # generic format.
  #
  # @see ModernTreasury::Models::VirtualAccountCreateParams::AccountDetail#account_number_type
  module AccountNumberType
    extend ModernTreasury::Internal::Type::Enum

    ARBITRUM_ADDRESS = :arbitrum_address
    AU_NUMBER = :au_number
    BASE_ADDRESS = :base_address
    CARD_TOKEN = :card_token
    CLABE = :clabe
    ETHEREUM_ADDRESS = :ethereum_address
    HK_NUMBER = :hk_number
    IBAN = :iban
    ID_NUMBER = :id_number
    NZ_NUMBER = :nz_number
    OTHER = :other
    PAN = :pan
    POLYGON_ADDRESS = :polygon_address
    SG_NUMBER = :sg_number
    SOLANA_ADDRESS = :solana_address

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

Instance Attribute Details

#account_number ⇒ String

The account number for the bank account.

Parameters:

  • value (String)

Returns:

  • (String)


134
# File 'lib/modern_treasury/models/virtual_account_create_params.rb', line 134

required :account_number, String

#account_number_type ⇒ Symbol, ...

The type of the account number. For wallet addresses, use the chain-specific type (e.g. ethereum_address). Use other if the account number is in a generic format.



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

optional :account_number_type,
enum: -> { ModernTreasury::VirtualAccountCreateParams::AccountDetail::AccountNumberType }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


131
# File 'sig/modern_treasury/models/virtual_account_create_params.rbs', line 131

def to_hash: -> {