Class: TerminalShop::Models::AddressAPI

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/terminal_shop/models/address.rb,
sig/terminal_shop/models/address.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(id:, city:, country:, created:, name:, street1:, zip:, phone: nil, province: nil, street2: nil) ⇒ Object

Some parameter documentations has been truncated, see TerminalShop::Models::AddressAPI for more details.

Physical address associated with a Terminal shop user.

Parameters:

  • id (String) —

    Unique object identifier.

  • city (String) —

    City of the address.

  • country (String) —

    ISO 3166-1 alpha-2 country code of the address.

  • created (String) —

    Date the address was created.

  • name (String) —

    The recipient's name.

  • street1 (String) —

    Street of the address.

  • zip (String) —

    Zip code of the address.

  • phone (String) (defaults to: nil) —

    Phone number of the recipient.

  • province (String) (defaults to: nil) —

    Province or state of the address.

  • street2 (String) (defaults to: nil) —

    Apartment, suite, etc. of the address.



# File 'lib/terminal_shop/models/address.rb', line 66


Instance Attribute Details

#city ⇒ String

City of the address.

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/terminal_shop/models/address.rb', line 16

required :city, String

#country ⇒ String

ISO 3166-1 alpha-2 country code of the address.

Parameters:

  • value (String)

Returns:

  • (String)


22
# File 'lib/terminal_shop/models/address.rb', line 22

required :country, String

#created ⇒ String

Date the address was created.

Parameters:

  • value (String)

Returns:

  • (String)


28
# File 'lib/terminal_shop/models/address.rb', line 28

required :created, String

#id ⇒ String

Unique object identifier. The format and length of IDs may change over time.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/terminal_shop/models/address.rb', line 10

required :id, String

#name ⇒ String

The recipient's name.

Parameters:

  • value (String)

Returns:

  • (String)


34
# File 'lib/terminal_shop/models/address.rb', line 34

required :name, String

#phone ⇒ String?

Phone number of the recipient.

Parameters:

  • (String)

Returns:

  • (String, nil)


52
# File 'lib/terminal_shop/models/address.rb', line 52

optional :phone, String

#province ⇒ String?

Province or state of the address.

Parameters:

  • (String)

Returns:

  • (String, nil)


58
# File 'lib/terminal_shop/models/address.rb', line 58

optional :province, String

#street1 ⇒ String

Street of the address.

Parameters:

  • value (String)

Returns:

  • (String)


40
# File 'lib/terminal_shop/models/address.rb', line 40

required :street1, String

#street2 ⇒ String?

Apartment, suite, etc. of the address.

Parameters:

  • (String)

Returns:

  • (String, nil)


64
# File 'lib/terminal_shop/models/address.rb', line 64

optional :street2, String

#zip ⇒ String

Zip code of the address.

Parameters:

  • value (String)

Returns:

  • (String)


46
# File 'lib/terminal_shop/models/address.rb', line 46

required :zip, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


57
# File 'sig/terminal_shop/models/address.rbs', line 57

def to_hash: -> {