Class: MethodRuby::Models::PaymentCreateParams

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

Overview

See Also:

  • MethodRuby::Resources::Payments#create

Defined Under Namespace

Modules: MethodVersion Classes: Fee

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::MethodRuby

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

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 ⇒ Object



52
# File 'sig/method_ruby/models/payment_create_params.rbs', line 52

def initialize: (

Instance Attribute Details

#amount ⇒ Integer

Payment amount in cents.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


14
# File 'lib/method_ruby/models/payment_create_params.rb', line 14

required :amount, Integer

#description ⇒ String

Human-readable description for the payment.

Parameters:

  • value (String)

Returns:

  • (String)


20
# File 'lib/method_ruby/models/payment_create_params.rb', line 20

required :description, String

#destination ⇒ String

The destination account ID.

Parameters:

  • value (String)

Returns:

  • (String)


26
# File 'lib/method_ruby/models/payment_create_params.rb', line 26

required :destination, String

#dry_run ⇒ Boolean?

Validate the payment request without moving funds.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


43
# File 'lib/method_ruby/models/payment_create_params.rb', line 43

optional :dry_run, MethodRuby::Internal::Type::Boolean

#fee ⇒ MethodRuby::Models::PaymentCreateParams::Fee?

Optional fee configuration for the payment.



49
# File 'lib/method_ruby/models/payment_create_params.rb', line 49

optional :fee, -> { MethodRuby::PaymentCreateParams::Fee }

#idempotency_key ⇒ String?

Parameters:

  • (String)

Returns:

  • (String, nil)


66
# File 'lib/method_ruby/models/payment_create_params.rb', line 66

optional :idempotency_key, String

#metadata ⇒ Hash{Symbol=>Object}?

Arbitrary key-value metadata attached to the resource.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

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


55
# File 'lib/method_ruby/models/payment_create_params.rb', line 55

optional :metadata, MethodRuby::Internal::Type::HashOf[MethodRuby::Internal::Type::Unknown], nil?: true

#method_version ⇒ Symbol, MethodRuby::Models::PaymentCreateParams::MethodVersion

Parameters:

  • value (MethodRuby::Models::PaymentCreateParams::method_version)

Returns:



37
# File 'lib/method_ruby/models/payment_create_params.rb', line 37

required :method_version, enum: -> { MethodRuby::PaymentCreateParams::MethodVersion }

#reversal_account ⇒ String?

Account ID to use for the reversal leg of the payment, if applicable.

Parameters:

  • (String)

Returns:

  • (String, nil)


61
# File 'lib/method_ruby/models/payment_create_params.rb', line 61

optional :reversal_account, String

#source ⇒ String

The source account ID.

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/method_ruby/models/payment_create_params.rb', line 32

required :source, String

Class Method Details

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/method_ruby/models/payment_create_params.rb', line 96

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


66
# File 'sig/method_ruby/models/payment_create_params.rbs', line 66

def to_hash: -> {