Class: Vatsense::Models::TaxRate

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

Direct Known Subclasses

Rate::Other

Defined Under Namespace

Modules: Object, Types

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(class_: nil, description: nil, object: nil, rate: nil, types: nil) ⇒ Object

Some parameter documentations has been truncated, see Vatsense::Models::TaxRate for more details.

Parameters:

  • class_ (String) (defaults to: nil)

    The rate class (e.g. “standard”, “reduced”, “zero”).

  • description (String) (defaults to: nil)

    A description of what goods/services this rate applies to.

  • object (Symbol, Vatsense::Models::TaxRate::Object) (defaults to: nil)
  • rate (Float) (defaults to: nil)

    The tax rate percentage.

  • types (String, Boolean) (defaults to: nil)

    Comma-separated list of product types this rate applies to, or false if it appli



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

Instance Attribute Details

#class_String?

The rate class (e.g. “standard”, “reduced”, “zero”).

Returns:

  • (String, nil)


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

optional :class_, String, api_name: :class

#descriptionString?

A description of what goods/services this rate applies to.

Returns:

  • (String, nil)


16
# File 'lib/vatsense/models/tax_rate.rb', line 16

optional :description, String

#objectSymbol, ...

Returns:



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

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

#rateFloat?

The tax rate percentage.

Returns:

  • (Float, nil)


27
# File 'lib/vatsense/models/tax_rate.rb', line 27

optional :rate, Float

#typesString, ...

Comma-separated list of product types this rate applies to, or false if it applies generally.

Returns:

  • (String, Boolean, nil)


34
# File 'lib/vatsense/models/tax_rate.rb', line 34

optional :types, union: -> { Vatsense::TaxRate::Types }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vatsense/models/tax_rate.rb', line 56