Class: Nfe::Generated::NfProdutoV2::BillingResource
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfProdutoV2::BillingResource
- Defined in:
- lib/nfe/generated/nf_produto_v2/billing_resource.rb,
sig/nfe/generated/nf_produto_v2/billing_resource.rbs
Instance Attribute Summary collapse
-
#bill ⇒ Object
readonly
Returns the value of attribute bill.
-
#duplicates ⇒ Object
readonly
Returns the value of attribute duplicates.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ BillingResource
constructor
A new instance of BillingResource.
Constructor Details
#initialize ⇒ BillingResource
Returns a new instance of BillingResource.
12 |
# File 'sig/nfe/generated/nf_produto_v2/billing_resource.rbs', line 12
def initialize: (?bill: BillResource, ?duplicates: Array[DuplicateResource]?) -> void
|
Instance Attribute Details
#bill ⇒ Object (readonly)
Returns the value of attribute bill
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/billing_resource.rb', line 9 def bill @bill end |
#duplicates ⇒ Object (readonly)
Returns the value of attribute duplicates
9 10 11 |
# File 'lib/nfe/generated/nf_produto_v2/billing_resource.rb', line 9 def duplicates @duplicates end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 |
# File 'lib/nfe/generated/nf_produto_v2/billing_resource.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( bill: BillResource.from_api(payload["bill"]), duplicates: (payload["duplicates"] || []).map { |e| DuplicateResource.from_api(e) }, ) end |
.new ⇒ instance
11 |
# File 'sig/nfe/generated/nf_produto_v2/billing_resource.rbs', line 11
def self.new: (?bill: BillResource, ?duplicates: Array[DuplicateResource]?) -> instance
|