Class: Vatsense::Models::CreateInvoice

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

Direct Known Subclasses

InvoiceCreateParams, InvoiceUpdateParams

Defined Under Namespace

Modules: TaxType, Type

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(business:, currency_code:, date:, items:, tax_point:, conversion: nil, customer: nil, has_vat: nil, invoice_number: nil, is_copy: nil, is_reverse_charge: nil, notes: nil, pad_invoice_number: nil, serial: nil, tax_type: nil, type: nil, zero_rated: nil) ⇒ Object

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

Parameters:

  • business (Vatsense::Models::InvoiceBusinessInput)
  • currency_code (String)

    The 3-character currency code the invoice is billed in.

  • date (String)

    The date the invoice was issued (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).

  • items (Array<Vatsense::Models::Invoice::InvoiceItemInput>)
  • tax_point (String)

    The tax point or “time of supply” (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).

  • conversion (Vatsense::Models::InvoiceConversionInput) (defaults to: nil)
  • customer (Vatsense::Models::InvoiceCustomerInput) (defaults to: nil)
  • has_vat (Boolean) (defaults to: nil)

    Whether the invoice is subject to VAT.

  • invoice_number (String) (defaults to: nil)

    A unique invoice number. If not provided, defaults to an auto-incremented number

  • is_copy (Boolean) (defaults to: nil)

    Whether the invoice is a copy of a primary invoice.

  • is_reverse_charge (Boolean) (defaults to: nil)

    Whether the invoice is zero-rated due to reverse charge.

  • notes (String) (defaults to: nil)

    Any additional notes for the invoice.

  • pad_invoice_number (Integer) (defaults to: nil)

    Pad the auto-generated invoice number with leading zeros to this length.

  • serial (String) (defaults to: nil)

    A serial prepended to the auto-generated invoice number. Each unique serial has

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

    Whether item prices include or exclude VAT.

  • type (Symbol, Vatsense::Models::CreateInvoice::Type) (defaults to: nil)

    The type of invoice.

  • zero_rated (Boolean) (defaults to: nil)

    Whether the invoice has been zero-rated.



# File 'lib/vatsense/models/create_invoice.rb', line 106

Instance Attribute Details

#businessVatsense::Models::InvoiceBusinessInput



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

required :business, -> { Vatsense::InvoiceBusinessInput }

#conversionVatsense::Models::InvoiceConversionInput?



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

optional :conversion, -> { Vatsense::InvoiceConversionInput }

#currency_codeString

The 3-character currency code the invoice is billed in.

Returns:

  • (String)


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

required :currency_code, String

#customerVatsense::Models::InvoiceCustomerInput?



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

optional :customer, -> { Vatsense::InvoiceCustomerInput }

#dateString

The date the invoice was issued (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).

Returns:

  • (String)


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

required :date, String

#has_vatBoolean?

Whether the invoice is subject to VAT.

Returns:

  • (Boolean, nil)


48
# File 'lib/vatsense/models/create_invoice.rb', line 48

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

#invoice_numberString?

A unique invoice number. If not provided, defaults to an auto-incremented number.

Returns:

  • (String, nil)


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

optional :invoice_number, String

#is_copyBoolean?

Whether the invoice is a copy of a primary invoice.

Returns:

  • (Boolean, nil)


61
# File 'lib/vatsense/models/create_invoice.rb', line 61

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

#is_reverse_chargeBoolean?

Whether the invoice is zero-rated due to reverse charge.

Returns:

  • (Boolean, nil)


67
# File 'lib/vatsense/models/create_invoice.rb', line 67

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

#itemsArray<Vatsense::Models::Invoice::InvoiceItemInput>



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

required :items, -> { Vatsense::Internal::Type::ArrayOf[Vatsense::Invoice::InvoiceItemInput] }

#notesString?

Any additional notes for the invoice.

Returns:

  • (String, nil)


73
# File 'lib/vatsense/models/create_invoice.rb', line 73

optional :notes, String

#pad_invoice_numberInteger?

Pad the auto-generated invoice number with leading zeros to this length.

Returns:

  • (Integer, nil)


79
# File 'lib/vatsense/models/create_invoice.rb', line 79

optional :pad_invoice_number, Integer

#serialString?

A serial prepended to the auto-generated invoice number. Each unique serial has its own auto-increment range.

Returns:

  • (String, nil)


86
# File 'lib/vatsense/models/create_invoice.rb', line 86

optional :serial, String

#tax_pointString

The tax point or “time of supply” (YYYY-MM-DD or YYYY-MM-DD HH:MM:SS).

Returns:

  • (String)


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

required :tax_point, String

#tax_typeSymbol, ...

Whether item prices include or exclude VAT.



92
# File 'lib/vatsense/models/create_invoice.rb', line 92

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

#typeSymbol, ...

The type of invoice.

Returns:



98
# File 'lib/vatsense/models/create_invoice.rb', line 98

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

#zero_ratedBoolean?

Whether the invoice has been zero-rated.

Returns:

  • (Boolean, nil)


104
# File 'lib/vatsense/models/create_invoice.rb', line 104

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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/vatsense/models/create_invoice.rb', line 153