Class: Yoomoney::Models::PersonalDataAPI

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

Overview

See Also:

  • Yoomoney::Resources::PersonalData#create

Defined Under Namespace

Classes: CancellationDetails

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(id:, created_at:, status:, type:, cancellation_details: nil, expires_at: nil, metadata: nil) ⇒ Object

Some parameter documentations has been truncated, see Yoomoney::Models::PersonalDataAPI for more details.

Parameters:

  • id (String) —

    Идентификатор персональных данных.

  • created_at (Time) —

    Время создания персональных данных.

  • status (String) —

    Статус хранения персональных данных.

  • type (Symbol, Yoomoney::Models::PersonalDataType) —

    Тип персональных данных.

  • cancellation_details (Yoomoney::Models::PersonalDataAPI::CancellationDetails) (defaults to: nil) —

    Комментарий к статусу canceled.

  • expires_at (Time) (defaults to: nil) —

    Срок жизни персональных данных.

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

    Любые дополнительные данные, которые нужны вам для работы (например, номер заказ



# File 'lib/yoomoney/models/personal_data.rb', line 52

Instance Attribute Details

#cancellation_details ⇒ Yoomoney::Models::PersonalDataAPI::CancellationDetails?

Комментарий к статусу canceled.



35
# File 'lib/yoomoney/models/personal_data.rb', line 35

optional :cancellation_details, -> { Yoomoney::PersonalDataAPI::CancellationDetails }

#created_at ⇒ Time

Время создания персональных данных.

Parameters:

  • value (Time)

Returns:

  • (Time)


17
# File 'lib/yoomoney/models/personal_data.rb', line 17

required :created_at, Time

#expires_at ⇒ Time?

Срок жизни персональных данных.

Parameters:

  • (Time)

Returns:

  • (Time, nil)


41
# File 'lib/yoomoney/models/personal_data.rb', line 41

optional :expires_at, Time

#id ⇒ String

Идентификатор персональных данных.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/yoomoney/models/personal_data.rb', line 11

required :id, String

#metadata ⇒ Hash{Symbol=>String}?

Любые дополнительные данные, которые нужны вам для работы (например, номер заказа). Передаются в виде набора пар «ключ-значение» и возвращаются в ответе от ЮKassa. Ограничения: максимум 16 ключей, имя ключа не больше 32 символов, значение ключа не больше 512 символов, тип данных — строка в формате UTF-8.

Parameters:

  • (::Hash[Symbol, String])

Returns:

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


50
# File 'lib/yoomoney/models/personal_data.rb', line 50

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

#status ⇒ String

Статус хранения персональных данных.

Parameters:

  • value (String)

Returns:

  • (String)


23
# File 'lib/yoomoney/models/personal_data.rb', line 23

required :status, String

#type ⇒ Symbol, Yoomoney::Models::PersonalDataType

Тип персональных данных.

Parameters:

  • value (Yoomoney::Models::personal_data_type)

Returns:



29
# File 'lib/yoomoney/models/personal_data.rb', line 29

required :type, enum: -> { Yoomoney::PersonalDataType }

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


47
# File 'sig/yoomoney/models/personal_data.rbs', line 47

def to_hash: -> {