Class: GOBL::Bill::Discount

Inherits:
Object show all
Defined in:
lib/generated/gobl/bill/discount.rb

Overview

Discount represents an allowance applied to the complete document independent from the individual lines.

Constant Summary collapse

SCHEMA_ID =

The Schema ID of the GOBL Discount structure

'https://gobl.org/draft-0/bill/invoice#/$defs/Discount'

Instance Attribute Summary collapse

Method Summary

Methods inherited from Object

new

Methods inherited from Struct

#as_json, from_data, from_json!, #to_json

Instance Attribute Details

#amountGOBL::Num::Amount (readonly)

Amount to apply (calculated if percent present).



43
# File 'lib/generated/gobl/bill/discount.rb', line 43

property :amount, GOBL::Num::Amount

#baseGOBL::Num::Amount (readonly)

Base represents the value used as a base for percent calculations instead of the invoice’s sum of lines.



33
# File 'lib/generated/gobl/bill/discount.rb', line 33

property :base, GOBL::Num::Amount

#codeString (readonly)

Code for the reason this discount applied



53
# File 'lib/generated/gobl/bill/discount.rb', line 53

property :code, String

#iInteger (readonly)

Line number inside the list of discounts (calculated)



23
# File 'lib/generated/gobl/bill/discount.rb', line 23

property :i, Integer

#metaGOBL::CBC::Meta (readonly)

Additional semi-structured information.



63
# File 'lib/generated/gobl/bill/discount.rb', line 63

property :meta, GOBL::CBC::Meta

#percentGOBL::Num::Percentage (readonly)

Percentage to apply to the base or invoice’s sum.



38
# File 'lib/generated/gobl/bill/discount.rb', line 38

property :percent, GOBL::Num::Percentage

#reasonString (readonly)

Text description as to why the discount was applied



58
# File 'lib/generated/gobl/bill/discount.rb', line 58

property :reason, String

#refString (readonly)

Reference or ID for this Discount



28
# File 'lib/generated/gobl/bill/discount.rb', line 28

property :ref, String

#taxesGOBL::Tax::Set (readonly)

List of taxes to apply to the discount



48
# File 'lib/generated/gobl/bill/discount.rb', line 48

property :taxes, GOBL::Tax::Set

#uuidString (readonly)

Universally Unique Identifier.



18
# File 'lib/generated/gobl/bill/discount.rb', line 18

property :uuid, String