Class: GOBL::Bill::LineDiscount
- Defined in:
- lib/generated/gobl/bill/line_discount.rb
Overview
LineDiscount represents an amount deducted from the line, and will be applied before taxes.
Constant Summary collapse
- SCHEMA_ID =
The Schema ID of the GOBL LineDiscount structure
'https://gobl.org/draft-0/bill/invoice#/$defs/LineDiscount'
Instance Attribute Summary collapse
-
#amount ⇒ GOBL::Num::Amount
readonly
Fixed discount amount to apply (calculated if percent present).
-
#code ⇒ String
readonly
Reason code.
-
#percent ⇒ GOBL::Num::Percentage
readonly
Percentage if fixed amount not applied.
-
#reason ⇒ String
readonly
Text description as to why the discount was applied.
Method Summary
Methods inherited from Object
Methods inherited from Struct
#as_json, from_data, from_json!, #to_json
Instance Attribute Details
#amount ⇒ GOBL::Num::Amount (readonly)
Fixed discount amount to apply (calculated if percent present).
23 |
# File 'lib/generated/gobl/bill/line_discount.rb', line 23 property :amount, GOBL::Num::Amount |
#code ⇒ String (readonly)
Reason code.
28 |
# File 'lib/generated/gobl/bill/line_discount.rb', line 28 property :code, String |
#percent ⇒ GOBL::Num::Percentage (readonly)
Percentage if fixed amount not applied
18 |
# File 'lib/generated/gobl/bill/line_discount.rb', line 18 property :percent, GOBL::Num::Percentage |
#reason ⇒ String (readonly)
Text description as to why the discount was applied
33 |
# File 'lib/generated/gobl/bill/line_discount.rb', line 33 property :reason, String |