Class: Vatsense::Models::VatPrice

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

Defined Under Namespace

Modules: Object, TaxType

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(object: nil, price: nil, price_excl_vat: nil, price_incl_vat: nil, tax_type: nil, vat: nil, vat_rate: nil) ⇒ Object

Parameters:

  • object (Symbol, Vatsense::Models::VatPrice::Object) (defaults to: nil)
  • price (Float) (defaults to: nil)

    The price provided.

  • price_excl_vat (Float) (defaults to: nil)

    The calculated price exclusive of VAT.

  • price_incl_vat (Float) (defaults to: nil)

    The calculated price inclusive of VAT.

  • tax_type (Symbol, Vatsense::Models::VatPrice::TaxType) (defaults to: nil)

    Whether the price is inclusive or exclusive of VAT.

  • vat (Float) (defaults to: nil)

    The total VAT amount.

  • vat_rate (Float) (defaults to: nil)

    The VAT rate percentage.



# File 'lib/vatsense/models/vat_price.rb', line 47

Instance Attribute Details

#objectSymbol, ...

Returns:



9
# File 'lib/vatsense/models/vat_price.rb', line 9

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

#priceFloat?

The price provided.

Returns:

  • (Float, nil)


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

optional :price, Float

#price_excl_vatFloat?

The calculated price exclusive of VAT.

Returns:

  • (Float, nil)


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

optional :price_excl_vat, Float

#price_incl_vatFloat?

The calculated price inclusive of VAT.

Returns:

  • (Float, nil)


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

optional :price_incl_vat, Float

#tax_typeSymbol, ...

Whether the price is inclusive or exclusive of VAT.

Returns:



33
# File 'lib/vatsense/models/vat_price.rb', line 33

optional :tax_type, enum: -> { Vatsense::VatPrice::TaxType }

#vatFloat?

The total VAT amount.

Returns:

  • (Float, nil)


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

optional :vat, Float

#vat_rateFloat?

The VAT rate percentage.

Returns:

  • (Float, nil)


45
# File 'lib/vatsense/models/vat_price.rb', line 45

optional :vat_rate, Float

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vatsense/models/vat_price.rb', line 68