Class: ModernTreasury::Models::TransactionCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/modern_treasury/models/transaction_create_params.rb,
sig/modern_treasury/models/transaction_create_params.rbs

Overview

See Also:

  • ModernTreasury::Resources::Transactions#create

Defined Under Namespace

Modules: Type

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ModernTreasury

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(as_of_date:, direction:, internal_account_id:, vendor_code:, vendor_code_type:, amount: nil, amount_string: nil, metadata: nil, posted: nil, type: nil, vendor_customer_id: nil, vendor_description: nil, request_options: {}) ⇒ Object

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

Parameters:

  • as_of_date (Date, nil)

    The date on which the transaction occurred.

  • direction (String)

    Either credit or debit.

  • internal_account_id (String)

    The ID of the relevant Internal Account.

  • vendor_code (String, nil)

    When applicable, the bank-given code that determines the transaction's category.

  • vendor_code_type (String, nil)

    The type of vendor_code being reported. Can be one of bai2, bankprov, `bnk

  • amount (Integer) (defaults to: nil)

    Value in specified currency's smallest unit. e.g. $10 would be represented as 10

  • amount_string (String) (defaults to: nil)

    The transaction amount as a string, preserving full precision for values that ma

  • metadata (Hash{Symbol=>String}) (defaults to: nil)

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

  • posted (Boolean) (defaults to: nil)

    This field will be true if the transaction has posted to the account.

  • type (Symbol, ModernTreasury::Models::TransactionCreateParams::Type, nil) (defaults to: nil)

    The type of the transaction. Examples could be card, ach, wire, check, r

  • vendor_customer_id (String, nil) (defaults to: nil)

    An identifier given to this transaction by the bank, often null.

  • vendor_description (String, nil) (defaults to: nil)

    The transaction detail text that often appears in on your bank statement and in

  • request_options (ModernTreasury::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


# File 'lib/modern_treasury/models/transaction_create_params.rb', line 91

Instance Attribute Details

#amountInteger?

Value in specified currency's smallest unit. e.g. $10 would be represented as 1000.

Parameters:

  • (Integer)

Returns:

  • (Integer, nil)


49
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 49

optional :amount, Integer

#amount_stringString?

The transaction amount as a string, preserving full precision for values that may exceed safe integer limits in some languages.

Parameters:

  • (String)

Returns:

  • (String, nil)


56
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 56

optional :amount_string, String

#as_of_dateDate?

The date on which the transaction occurred.

Parameters:

  • value (Date, nil)

Returns:

  • (Date, nil)


14
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 14

required :as_of_date, Date, nil?: true

#directionString

Either credit or debit.

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 20

required :direction, String

#internal_account_idString

The ID of the relevant Internal Account.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 26

required :internal_account_id, String

#metadataHash{Symbol=>String}?

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

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


63
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 63

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

#postedBoolean?

This field will be true if the transaction has posted to the account.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


69
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 69

optional :posted, ModernTreasury::Internal::Type::Boolean

#typeSymbol, ...

The type of the transaction. Examples could be card, ach, wire, check, rtp, or book`.

Parameters:

  • value (ModernTreasury::Models::TransactionCreateParams::type_, nil)

Returns:



76
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 76

optional :type, enum: -> { ModernTreasury::TransactionCreateParams::Type }, nil?: true

#vendor_codeString?

When applicable, the bank-given code that determines the transaction's category. For most banks this is the BAI2/BTRS transaction code.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 33

required :vendor_code, String, nil?: true

#vendor_code_typeString?

The type of vendor_code being reported. Can be one of bai2, bankprov, bnk_dev, cleartouch, currencycloud, cross_river, dc_bank, dwolla, evolve, goldman_sachs, iso20022, jpmc, mx, silvergate, swift, us_bank, or others.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


42
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 42

required :vendor_code_type, String, nil?: true

#vendor_customer_idString?

An identifier given to this transaction by the bank, often null.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


82
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 82

optional :vendor_customer_id, String, nil?: true

#vendor_descriptionString?

The transaction detail text that often appears in on your bank statement and in your banking portal.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


89
# File 'lib/modern_treasury/models/transaction_create_params.rb', line 89

optional :vendor_description, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


72
# File 'sig/modern_treasury/models/transaction_create_params.rbs', line 72

def to_hash: -> {