Class: ModernTreasury::Models::PaymentFlow

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

Overview

Defined Under Namespace

Modules: Direction, ExistingExternalAccountsFilter, ExternalAccountCollection, Status

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, amount: nil, client_token: nil, counterparty_id: nil, created_at: nil, currency: nil, direction: nil, due_date: nil, effective_date_selection_enabled: nil, existing_external_accounts_filter: nil, external_account_collection: nil, live_mode: nil, object: nil, originating_account_id: nil, payment_order_id: nil, receiving_account_id: nil, selected_effective_date: nil, status: nil, updated_at: nil) ⇒ Object

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

Parameters:

  • id (String) (defaults to: nil)
  • amount (Integer) (defaults to: nil)

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

  • client_token (String) (defaults to: nil)

    The client token of the payment flow. This token can be used to embed a payment

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

    The ID of a counterparty associated with the payment. As part of the payment wor

  • created_at (Time) (defaults to: nil)
  • currency (String) (defaults to: nil)

    The currency of the payment.

  • direction (Symbol, ModernTreasury::Models::PaymentFlow::Direction) (defaults to: nil)

    Describes the direction money is flowing in the transaction. Can only be ‘debit`

  • due_date (Date, nil) (defaults to: nil)

    The due date for the flow. Can only be passed in when ‘effective*date_selection*

  • effective_date_selection_enabled (Boolean) (defaults to: nil)

    When ‘true`, your end-user can schedule the payment `effective_date` while compl

  • existing_external_accounts_filter (Symbol, ModernTreasury::Models::PaymentFlow::ExistingExternalAccountsFilter, nil) (defaults to: nil)

    When ‘verified` and `external_account_collection` is `enabled`, filters the list

  • external_account_collection (Symbol, ModernTreasury::Models::PaymentFlow::ExternalAccountCollection) (defaults to: nil)

    When ‘enabled`, your end-user can select from an existing external account when

  • live_mode (Boolean) (defaults to: nil)

    This field will be true if this object exists in the live environment or false i

  • object (String) (defaults to: nil)
  • originating_account_id (String, nil) (defaults to: nil)

    The ID of one of your organization’s internal accounts.

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

    If present, the ID of the payment order created using this flow.

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

    If present, the ID of the external account created using this flow.

  • selected_effective_date (Date, nil) (defaults to: nil)

    This field is set after your end-user selects a payment date while completing th

  • status (Symbol, ModernTreasury::Models::PaymentFlow::Status) (defaults to: nil)

    The current status of the payment flow. One of ‘pending`, `completed`, `expired`

  • updated_at (Time) (defaults to: nil)


# File 'lib/modern_treasury/models/payment_flow.rb', line 133


Instance Attribute Details

#amountInteger?

Value in specified currency’s smallest unit. e.g. $10 would be represented as 1000. Can be any integer up to 36 digits.

Returns:

  • (Integer, nil)


17
# File 'lib/modern_treasury/models/payment_flow.rb', line 17

optional :amount, Integer

#client_tokenString?

The client token of the payment flow. This token can be used to embed a payment workflow in your client-side application.

Returns:

  • (String, nil)


24
# File 'lib/modern_treasury/models/payment_flow.rb', line 24

optional :client_token, String

#counterparty_idString?

The ID of a counterparty associated with the payment. As part of the payment workflow an external account will be associated with this counterparty.

Returns:

  • (String, nil)


31
# File 'lib/modern_treasury/models/payment_flow.rb', line 31

optional :counterparty_id, String, nil?: true

#created_atTime?

Returns:

  • (Time, nil)


36
# File 'lib/modern_treasury/models/payment_flow.rb', line 36

optional :created_at, Time

#currencyString?

The currency of the payment.

Returns:

  • (String, nil)


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

optional :currency, String

#directionSymbol, ...

Describes the direction money is flowing in the transaction. Can only be ‘debit`. A `debit` pulls money from someone else’s account to your own.



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

optional :direction, enum: -> { ModernTreasury::PaymentFlow::Direction }

#due_dateDate?

The due date for the flow. Can only be passed in when ‘effective_date_selection_enabled` is `true`.

Returns:

  • (Date, nil)


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

optional :due_date, Date, nil?: true

#effective_date_selection_enabledBoolean?

When ‘true`, your end-user can schedule the payment `effective_date` while completing the pre-built UI.

Returns:

  • (Boolean, nil)


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

optional :effective_date_selection_enabled, ModernTreasury::Internal::Type::Boolean

#existing_external_accounts_filterSymbol, ...

When ‘verified` and `external_account_collection` is `enabled`, filters the list of external accounts your end-user can select to those with a `verification_status` of `verified`.



71
72
73
# File 'lib/modern_treasury/models/payment_flow.rb', line 71

optional :existing_external_accounts_filter,
enum: -> { ModernTreasury::PaymentFlow::ExistingExternalAccountsFilter },
nil?: true

#external_account_collectionSymbol, ...

When ‘enabled`, your end-user can select from an existing external account when completing the flow. When `disabled`, your end-user must add new payment details when completing the flow.



81
# File 'lib/modern_treasury/models/payment_flow.rb', line 81

optional :external_account_collection, enum: -> { ModernTreasury::PaymentFlow::ExternalAccountCollection }

#idString?

Returns:

  • (String, nil)


10
# File 'lib/modern_treasury/models/payment_flow.rb', line 10

optional :id, String

#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)


88
# File 'lib/modern_treasury/models/payment_flow.rb', line 88

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

#objectString?

Returns:

  • (String, nil)


93
# File 'lib/modern_treasury/models/payment_flow.rb', line 93

optional :object, String

#originating_account_idString?

The ID of one of your organization’s internal accounts.

Returns:

  • (String, nil)


99
# File 'lib/modern_treasury/models/payment_flow.rb', line 99

optional :originating_account_id, String, nil?: true

#payment_order_idString?

If present, the ID of the payment order created using this flow.

Returns:

  • (String, nil)


105
# File 'lib/modern_treasury/models/payment_flow.rb', line 105

optional :payment_order_id, String, nil?: true

#receiving_account_idString?

If present, the ID of the external account created using this flow.

Returns:

  • (String, nil)


111
# File 'lib/modern_treasury/models/payment_flow.rb', line 111

optional :receiving_account_id, String, nil?: true

#selected_effective_dateDate?

This field is set after your end-user selects a payment date while completing the pre-built UI. This field is always ‘null` unless `effective_date_selection_enabled` is `true`.

Returns:

  • (Date, nil)


119
# File 'lib/modern_treasury/models/payment_flow.rb', line 119

optional :selected_effective_date, Date, nil?: true

#statusSymbol, ...

The current status of the payment flow. One of ‘pending`, `completed`, `expired`, or `cancelled`.



126
# File 'lib/modern_treasury/models/payment_flow.rb', line 126

optional :status, enum: -> { ModernTreasury::PaymentFlow::Status }

#updated_atTime?

Returns:

  • (Time, nil)


131
# File 'lib/modern_treasury/models/payment_flow.rb', line 131

optional :updated_at, Time

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/modern_treasury/models/payment_flow.rb', line 185