Class: Vatsense::Models::Country

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/vatsense/models/country.rb

Defined Under Namespace

Modules: Object

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_code: nil, country_name: nil, eu: nil, latitude: nil, longitude: nil, object: nil, vat: nil) ⇒ Object

Parameters:

  • country_code (String) (defaults to: nil)

    2-character ISO 3166-1 alpha-2 country code.

  • country_name (String) (defaults to: nil)
  • eu (Boolean) (defaults to: nil)

    Whether the country is subject to EU VAT.

  • latitude (Float) (defaults to: nil)
  • longitude (Float) (defaults to: nil)
  • object (Symbol, Vatsense::Models::Country::Object) (defaults to: nil)
  • vat (Boolean) (defaults to: nil)

    Whether the country is subject to VAT/GST.



# File 'lib/vatsense/models/country.rb', line 44

Instance Attribute Details

#country_codeString?

2-character ISO 3166-1 alpha-2 country code.

Returns:

  • (String, nil)


10
# File 'lib/vatsense/models/country.rb', line 10

optional :country_code, String

#country_nameString?

Returns:

  • (String, nil)


15
# File 'lib/vatsense/models/country.rb', line 15

optional :country_name, String

#euBoolean?

Whether the country is subject to EU VAT.

Returns:

  • (Boolean, nil)


21
# File 'lib/vatsense/models/country.rb', line 21

optional :eu, Vatsense::Internal::Type::Boolean

#latitudeFloat?

Returns:

  • (Float, nil)


26
# File 'lib/vatsense/models/country.rb', line 26

optional :latitude, Float

#longitudeFloat?

Returns:

  • (Float, nil)


31
# File 'lib/vatsense/models/country.rb', line 31

optional :longitude, Float

#objectSymbol, ...

Returns:



36
# File 'lib/vatsense/models/country.rb', line 36

optional :object, enum: -> { Vatsense::Country::Object }

#vatBoolean?

Whether the country is subject to VAT/GST.

Returns:

  • (Boolean, nil)


42
# File 'lib/vatsense/models/country.rb', line 42

optional :vat, Vatsense::Internal::Type::Boolean