Class: ModernTreasury::Models::Identification

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

Overview

See Also:

  • ModernTreasury::Resources::Identifications#create

Defined Under Namespace

Modules: IDType

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:, discarded_at:, documents:, expiration_date:, id_type:, issuing_country:, issuing_region:, live_mode:, object:, updated_at:) ⇒ Object

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

Parameters:

  • id (String)
  • created_at (Time)
  • discarded_at (Time, nil)
  • documents (Array<ModernTreasury::Models::Document>)
  • expiration_date (Date, nil) —

    The date when the Identification is no longer considered valid by the issuing au

  • id_type (Symbol, ModernTreasury::Models::Identification::IDType) —

    The type of ID number.

  • issuing_country (String, nil) —

    The ISO 3166-1 alpha-2 country code of the country that issued the identificatio

  • issuing_region (String, nil) —

    The region in which the identifcation was issued.

  • live_mode (Boolean) —

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

  • object (String)
  • updated_at (Time)


# File 'lib/modern_treasury/models/identification.rb', line 70


Instance Attribute Details

#created_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


15
# File 'lib/modern_treasury/models/identification.rb', line 15

required :created_at, Time

#discarded_at ⇒ Time?

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


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

required :discarded_at, Time, nil?: true

#documents ⇒ Array<ModernTreasury::Models::Document>

Parameters:

Returns:



25
# File 'lib/modern_treasury/models/identification.rb', line 25

required :documents, -> { ModernTreasury::Internal::Type::ArrayOf[ModernTreasury::Document] }

#expiration_date ⇒ Date?

The date when the Identification is no longer considered valid by the issuing authority.

Parameters:

  • value (Date, nil)

Returns:

  • (Date, nil)


32
# File 'lib/modern_treasury/models/identification.rb', line 32

required :expiration_date, Date, nil?: true

#id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#id_type ⇒ Symbol, ModernTreasury::Models::Identification::IDType

The type of ID number.

Parameters:

  • value (ModernTreasury::Models::Identification::id_type)

Returns:



38
# File 'lib/modern_treasury/models/identification.rb', line 38

required :id_type, enum: -> { ModernTreasury::Identification::IDType }

#issuing_country ⇒ String?

The ISO 3166-1 alpha-2 country code of the country that issued the identification

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


45
# File 'lib/modern_treasury/models/identification.rb', line 45

required :issuing_country, String, nil?: true

#issuing_region ⇒ String?

The region in which the identifcation was issued.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


51
# File 'lib/modern_treasury/models/identification.rb', line 51

required :issuing_region, String, nil?: true

#live_mode ⇒ Boolean

This field will be true if this object exists in the live environment or false if it exists in the test environment.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


58
# File 'lib/modern_treasury/models/identification.rb', line 58

required :live_mode, ModernTreasury::Internal::Type::Boolean

#object ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


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

required :object, String

#updated_at ⇒ Time

Parameters:

  • value (Time)

Returns:

  • (Time)


68
# File 'lib/modern_treasury/models/identification.rb', line 68

required :updated_at, Time

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


55
# File 'sig/modern_treasury/models/identification.rbs', line 55

def to_hash: -> {