Class: ModernTreasury::Models::AddressRequest

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

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(country: nil, line1: nil, line2: nil, locality: nil, postal_code: nil, region: nil) ⇒ Object

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

Parameters:

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

    Country code conforms to [ISO 3166-1 alpha-2]

  • line1 (String, nil) (defaults to: nil)
  • line2 (String, nil) (defaults to: nil)
  • locality (String, nil) (defaults to: nil)

    Locality or City. Use the full city name rather than an abbreviation (e.g. San F

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

    The postal code of the address.

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

    Region or State. This field is free-form; for US states, we recommend a two-lett



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

Instance Attribute Details

#countryString?

Country code conforms to [ISO 3166-1 alpha-2]

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :country, String, nil?: true

#line1String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :line1, String, nil?: true

#line2String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :line2, String, nil?: true

#localityString?

Locality or City. Use the full city name rather than an abbreviation (e.g. San Francisco).

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


27
# File 'lib/modern_treasury/models/address_request.rb', line 27

optional :locality, String, nil?: true

#postal_codeString?

The postal code of the address.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


33
# File 'lib/modern_treasury/models/address_request.rb', line 33

optional :postal_code, String, nil?: true

#regionString?

Region or State. This field is free-form; for US states, we recommend a two-letter code (e.g. CA). Full state names are also accepted.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


40
# File 'lib/modern_treasury/models/address_request.rb', line 40

optional :region, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


35
# File 'sig/modern_treasury/models/address_request.rbs', line 35

def to_hash: -> {