Class: Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/yoomoney/models/payment_method_create_params.rb

Defined Under Namespace

Modules: Type Classes: Confirmation

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(type:, client_ip: nil, confirmation: nil, holder: nil) ⇒ Object

Данные для проверки и сохранения способа оплаты.

Parameters:



52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/yoomoney/models/payment_method_create_params.rb', line 52

class PaymentMethodData < Yoomoney::Internal::Type::BaseModel
  # @!attribute type
  #
  #   @return [Symbol, Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Type]
  required :type, enum: -> { Yoomoney::PaymentMethodCreateParams::PaymentMethodData::Type }

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

  # @!attribute confirmation
  #
  #   @return [Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Confirmation, nil]
  optional :confirmation, -> { Yoomoney::PaymentMethodCreateParams::PaymentMethodData::Confirmation }

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

  # @!method initialize(type:, client_ip: nil, confirmation: nil, holder: nil)
  #   Данные для проверки и сохранения способа оплаты.
  #
  #   @param type [Symbol, Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Type]
  #   @param client_ip [String]
  #   @param confirmation [Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Confirmation]
  #   @param holder [String]

  # @see Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData#type
  module Type
    extend Yoomoney::Internal::Type::Enum

    BANK_CARD = :bank_card

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

  # @see Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData#confirmation
  class Confirmation < Yoomoney::Internal::Type::BaseModel
    # @!attribute return_url
    #
    #   @return [String]
    required :return_url, String

    # @!attribute type
    #
    #   @return [Symbol, Yoomoney::Models::PaymentMethodsConfirmationType]
    required :type, enum: -> { Yoomoney::PaymentMethodsConfirmationType }

    # @!method initialize(return_url:, type:)
    #   @param return_url [String]
    #   @param type [Symbol, Yoomoney::Models::PaymentMethodsConfirmationType]
  end
end

Instance Attribute Details

#client_ipString?

Returns:

  • (String, nil)


61
# File 'lib/yoomoney/models/payment_method_create_params.rb', line 61

optional :client_ip, String

#confirmationYoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Confirmation?



66
# File 'lib/yoomoney/models/payment_method_create_params.rb', line 66

optional :confirmation, -> { Yoomoney::PaymentMethodCreateParams::PaymentMethodData::Confirmation }

#holderString?

Returns:

  • (String, nil)


71
# File 'lib/yoomoney/models/payment_method_create_params.rb', line 71

optional :holder, String

#typeSymbol, Yoomoney::Models::PaymentMethodCreateParams::PaymentMethodData::Type



56
# File 'lib/yoomoney/models/payment_method_create_params.rb', line 56

required :type, enum: -> { Yoomoney::PaymentMethodCreateParams::PaymentMethodData::Type }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/yoomoney/models/payment_method_create_params.rb', line 87