Class: Vatsense::Models::InvoiceAPI

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

Defined Under Namespace

Modules: Object, TaxType, Type Classes: Business, Customer, Totals

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(discount: nil, subtotal: nil, total: nil, vat: nil) ⇒ Object

Parameters:

  • discount (Float) (defaults to: nil)

    Total discount amount.

  • subtotal (Float) (defaults to: nil)

    Total before VAT.

  • total (Float) (defaults to: nil)

    Grand total.

  • vat (Float) (defaults to: nil)

    Total VAT amount.



# File 'lib/vatsense/models/invoice.rb', line 117

Instance Attribute Details

#businessVatsense::Models::InvoiceAPI::Business?



14
# File 'lib/vatsense/models/invoice.rb', line 14

optional :business, -> { Vatsense::InvoiceAPI::Business }

#conversionVatsense::Models::InvoiceConversionInput?



19
# File 'lib/vatsense/models/invoice.rb', line 19

optional :conversion, -> { Vatsense::InvoiceConversionInput }, nil?: true

#createdTime?

Returns:

  • (Time, nil)


24
# File 'lib/vatsense/models/invoice.rb', line 24

optional :created, Time

#currency_codeString?

Returns:

  • (String, nil)


29
# File 'lib/vatsense/models/invoice.rb', line 29

optional :currency_code, String

#customerVatsense::Models::InvoiceAPI::Customer?



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

optional :customer, -> { Vatsense::InvoiceAPI::Customer }, nil?: true

#dateString?

Returns:

  • (String, nil)


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

optional :date, String

#has_vatBoolean?

Returns:

  • (Boolean, nil)


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

optional :has_vat, Vatsense::Internal::Type::Boolean

#idString?

Returns:

  • (String, nil)


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

optional :id, String

#invoice_numberString?

Returns:

  • (String, nil)


49
# File 'lib/vatsense/models/invoice.rb', line 49

optional :invoice_number, String

#invoice_urlString?

Unique URL to view the invoice. Append “/pdf” to download a PDF copy.

Returns:

  • (String, nil)


55
# File 'lib/vatsense/models/invoice.rb', line 55

optional :invoice_url, String

#is_copyBoolean?

Returns:

  • (Boolean, nil)


60
# File 'lib/vatsense/models/invoice.rb', line 60

optional :is_copy, Vatsense::Internal::Type::Boolean

#is_reverse_chargeBoolean?

Returns:

  • (Boolean, nil)


65
# File 'lib/vatsense/models/invoice.rb', line 65

optional :is_reverse_charge, Vatsense::Internal::Type::Boolean

#itemsArray<Vatsense::Models::Invoice::InvoiceItem>?



70
# File 'lib/vatsense/models/invoice.rb', line 70

optional :items, -> { Vatsense::Internal::Type::ArrayOf[Vatsense::Invoice::InvoiceItem] }

#notesString?

Returns:

  • (String, nil)


75
# File 'lib/vatsense/models/invoice.rb', line 75

optional :notes, String, nil?: true

#num_itemsInteger?

Returns:

  • (Integer, nil)


80
# File 'lib/vatsense/models/invoice.rb', line 80

optional :num_items, Integer

#objectSymbol, ...

Returns:



85
# File 'lib/vatsense/models/invoice.rb', line 85

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

#tax_pointString?

Returns:

  • (String, nil)


90
# File 'lib/vatsense/models/invoice.rb', line 90

optional :tax_point, String

#tax_typeSymbol, ...

Returns:



95
# File 'lib/vatsense/models/invoice.rb', line 95

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

#totalsVatsense::Models::InvoiceAPI::Totals?



100
# File 'lib/vatsense/models/invoice.rb', line 100

optional :totals, -> { Vatsense::InvoiceAPI::Totals }

#typeSymbol, ...

Returns:



105
# File 'lib/vatsense/models/invoice.rb', line 105

optional :type, enum: -> { Vatsense::InvoiceAPI::Type }

#updatedTime?

Returns:

  • (Time, nil)


110
# File 'lib/vatsense/models/invoice.rb', line 110

optional :updated, Time

#zero_ratedBoolean?

Returns:

  • (Boolean, nil)


115
# File 'lib/vatsense/models/invoice.rb', line 115

optional :zero_rated, Vatsense::Internal::Type::Boolean

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vatsense/models/invoice.rb', line 238