Class: Nfe::TaxCoupon::Total
- Inherits:
-
Data
- Object
- Data
- Nfe::TaxCoupon::Total
- Defined in:
- lib/nfe/resources/dto/consumer_invoice_query/tax_coupon.rb,
sig/nfe/resources/dto/consumer_invoice_query/tax_coupon.rbs
Overview
Monetary totals of the coupon (+total+). total_amount is the approximate
tax amount (vCFeLei12741) and coupon_amount is the coupon grand total
(vCFe).
Instance Attribute Summary collapse
-
#coupon_amount ⇒ Object
readonly
Returns the value of attribute coupon_amount.
-
#total_amount ⇒ Object
readonly
Returns the value of attribute total_amount.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Total
constructor
A new instance of Total.
Constructor Details
#initialize ⇒ Total
Returns a new instance of Total.
29 |
# File 'sig/nfe/resources/dto/consumer_invoice_query/tax_coupon.rbs', line 29
def initialize: (total_amount: untyped, coupon_amount: untyped) -> void
|
Instance Attribute Details
#coupon_amount ⇒ Object (readonly)
Returns the value of attribute coupon_amount.
25 26 27 |
# File 'sig/nfe/resources/dto/consumer_invoice_query/tax_coupon.rbs', line 25 def coupon_amount @coupon_amount end |
#total_amount ⇒ Object (readonly)
Returns the value of attribute total_amount.
24 25 26 |
# File 'sig/nfe/resources/dto/consumer_invoice_query/tax_coupon.rbs', line 24 def total_amount @total_amount end |
Class Method Details
.from_api(payload) ⇒ Nfe::TaxCoupon::Total?
67 68 69 70 71 72 73 74 |
# File 'lib/nfe/resources/dto/consumer_invoice_query/tax_coupon.rb', line 67 def self.from_api(payload) return nil if payload.nil? new( total_amount: payload["totalAmount"], coupon_amount: payload["couponAmount"] ) end |
.new ⇒ instance
28 |
# File 'sig/nfe/resources/dto/consumer_invoice_query/tax_coupon.rbs', line 28
def self.new: (total_amount: untyped, coupon_amount: untyped) -> instance
|