Class: Vatsense::Models::Rate

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

Defined Under Namespace

Modules: Object Classes: Other

Instance Attribute Summary collapse

Class Method 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, object: nil, other: nil, standard: 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 an EU member.

  • object (Symbol, Vatsense::Models::Rate::Object) (defaults to: nil)
  • other (Array<Vatsense::Models::Rate::Other>, nil) (defaults to: nil)

    A list of other tax rates. Null if no additional rates exist.

  • standard (Vatsense::Models::TaxRate) (defaults to: nil)


# File 'lib/vatsense/models/rate.rb', line 39

Instance Attribute Details

#country_codeString?

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

Returns:

  • (String, nil)


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

optional :country_code, String

#country_nameString?

Returns:

  • (String, nil)


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

optional :country_name, String

#euBoolean?

Whether the country is an EU member.

Returns:

  • (Boolean, nil)


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

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

#objectSymbol, ...

Returns:



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

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

#otherArray<Vatsense::Models::Rate::Other>?

A list of other tax rates. Null if no additional rates exist.

Returns:



32
# File 'lib/vatsense/models/rate.rb', line 32

optional :other, -> { Vatsense::Internal::Type::ArrayOf[Vatsense::Rate::Other] }, nil?: true

#standardVatsense::Models::TaxRate?

Returns:



37
# File 'lib/vatsense/models/rate.rb', line 37

optional :standard, -> { Vatsense::TaxRate }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vatsense/models/rate.rb', line 58