Class: Nfe::Generated::NfConsumidorV2::ConsumerInvoiceRequest
- Inherits:
-
Data
- Object
- Data
- Nfe::Generated::NfConsumidorV2::ConsumerInvoiceRequest
- Defined in:
- lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb,
sig/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rbs
Instance Attribute Summary collapse
-
#additional_information ⇒ Object
readonly
Returns the value of attribute additional_information.
-
#billing ⇒ Object
readonly
Returns the value of attribute billing.
-
#buyer ⇒ Object
readonly
Returns the value of attribute buyer.
-
#consumer_type ⇒ Object
readonly
Returns the value of attribute consumer_type.
-
#consumption_city_code ⇒ Object
readonly
Returns the value of attribute consumption_city_code.
-
#contingency_justification ⇒ Object
readonly
Returns the value of attribute contingency_justification.
-
#contingency_on ⇒ Object
readonly
Returns the value of attribute contingency_on.
-
#credit_type ⇒ Object
readonly
Returns the value of attribute credit_type.
-
#debit_type ⇒ Object
readonly
Returns the value of attribute debit_type.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#government_purchase ⇒ Object
readonly
Returns the value of attribute government_purchase.
-
#ibs_consumption_city_code ⇒ Object
readonly
Returns the value of attribute ibs_consumption_city_code.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#issuer ⇒ Object
readonly
Returns the value of attribute issuer.
-
#items ⇒ Object
readonly
Returns the value of attribute items.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#operation_nature ⇒ Object
readonly
Returns the value of attribute operation_nature.
-
#operation_on ⇒ Object
readonly
Returns the value of attribute operation_on.
-
#operation_type ⇒ Object
readonly
Returns the value of attribute operation_type.
-
#payment ⇒ Object
readonly
Returns the value of attribute payment.
-
#presence_type ⇒ Object
readonly
Returns the value of attribute presence_type.
-
#print_type ⇒ Object
readonly
Returns the value of attribute print_type.
-
#purpose_type ⇒ Object
readonly
Returns the value of attribute purpose_type.
-
#serie ⇒ Object
readonly
Returns the value of attribute serie.
-
#totals ⇒ Object
readonly
Returns the value of attribute totals.
-
#transaction_intermediate ⇒ Object
readonly
Returns the value of attribute transaction_intermediate.
-
#transport ⇒ Object
readonly
Returns the value of attribute transport.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ConsumerInvoiceRequest
constructor
A new instance of ConsumerInvoiceRequest.
Constructor Details
#initialize ⇒ ConsumerInvoiceRequest
Returns a new instance of ConsumerInvoiceRequest.
37 |
# File 'sig/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rbs', line 37
def initialize: (?additional_information: AdditionalInformationResource, ?billing: BillingResource, ?buyer: BuyerResource, ?consumer_type: untyped, ?consumption_city_code: Integer?, ?contingency_justification: String?, ?contingency_on: String?, ?credit_type: untyped, ?debit_type: untyped, ?destination: untyped, ?government_purchase: GovernmentPurchaseResource, ?ibs_consumption_city_code: Integer?, ?id: String?, ?issuer: IssuerFromRequestResource, items: Array[InvoiceItemResource], ?number: Integer?, ?operation_nature: String?, ?operation_on: String?, ?operation_type: untyped, ?payment: Array[PaymentResource]?, ?presence_type: untyped, ?print_type: untyped, ?purpose_type: untyped, ?serie: Integer?, ?totals: TotalResource, ?transaction_intermediate: IntermediateResource, ?transport: TransportInformationResource) -> void
|
Instance Attribute Details
#additional_information ⇒ Object (readonly)
Returns the value of attribute additional_information
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def additional_information @additional_information end |
#billing ⇒ Object (readonly)
Returns the value of attribute billing
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def billing @billing end |
#buyer ⇒ Object (readonly)
Returns the value of attribute buyer
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def buyer @buyer end |
#consumer_type ⇒ Object (readonly)
Returns the value of attribute consumer_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def consumer_type @consumer_type end |
#consumption_city_code ⇒ Object (readonly)
Returns the value of attribute consumption_city_code
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def consumption_city_code @consumption_city_code end |
#contingency_justification ⇒ Object (readonly)
Returns the value of attribute contingency_justification
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def contingency_justification @contingency_justification end |
#contingency_on ⇒ Object (readonly)
Returns the value of attribute contingency_on
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def contingency_on @contingency_on end |
#credit_type ⇒ Object (readonly)
Returns the value of attribute credit_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def credit_type @credit_type end |
#debit_type ⇒ Object (readonly)
Returns the value of attribute debit_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def debit_type @debit_type end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def destination @destination end |
#government_purchase ⇒ Object (readonly)
Returns the value of attribute government_purchase
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def government_purchase @government_purchase end |
#ibs_consumption_city_code ⇒ Object (readonly)
Returns the value of attribute ibs_consumption_city_code
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def ibs_consumption_city_code @ibs_consumption_city_code end |
#id ⇒ Object (readonly)
Returns the value of attribute id
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def id @id end |
#issuer ⇒ Object (readonly)
Returns the value of attribute issuer
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def issuer @issuer end |
#items ⇒ Object (readonly)
Returns the value of attribute items
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def items @items end |
#number ⇒ Object (readonly)
Returns the value of attribute number
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def number @number end |
#operation_nature ⇒ Object (readonly)
Returns the value of attribute operation_nature
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def operation_nature @operation_nature end |
#operation_on ⇒ Object (readonly)
Returns the value of attribute operation_on
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def operation_on @operation_on end |
#operation_type ⇒ Object (readonly)
Returns the value of attribute operation_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def operation_type @operation_type end |
#payment ⇒ Object (readonly)
Returns the value of attribute payment
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def payment @payment end |
#presence_type ⇒ Object (readonly)
Returns the value of attribute presence_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def presence_type @presence_type end |
#print_type ⇒ Object (readonly)
Returns the value of attribute print_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def print_type @print_type end |
#purpose_type ⇒ Object (readonly)
Returns the value of attribute purpose_type
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def purpose_type @purpose_type end |
#serie ⇒ Object (readonly)
Returns the value of attribute serie
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def serie @serie end |
#totals ⇒ Object (readonly)
Returns the value of attribute totals
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def totals @totals end |
#transaction_intermediate ⇒ Object (readonly)
Returns the value of attribute transaction_intermediate
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def transaction_intermediate @transaction_intermediate end |
#transport ⇒ Object (readonly)
Returns the value of attribute transport
9 10 11 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 9 def transport @transport end |
Class Method Details
.from_api(payload) ⇒ instance?
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rb', line 10 def self.from_api(payload) return nil if payload.nil? new( additional_information: AdditionalInformationResource.from_api(payload["additionalInformation"]), billing: BillingResource.from_api(payload["billing"]), buyer: BuyerResource.from_api(payload["buyer"]), consumer_type: payload["consumerType"], consumption_city_code: payload["consumptionCityCode"], contingency_justification: payload["contingencyJustification"], contingency_on: payload["contingencyOn"], credit_type: payload["creditType"], debit_type: payload["debitType"], destination: payload["destination"], government_purchase: GovernmentPurchaseResource.from_api(payload["governmentPurchase"]), ibs_consumption_city_code: payload["ibsConsumptionCityCode"], id: payload["id"], issuer: IssuerFromRequestResource.from_api(payload["issuer"]), items: (payload["items"] || []).map { |e| InvoiceItemResource.from_api(e) }, number: payload["number"], operation_nature: payload["operationNature"], operation_on: payload["operationOn"], operation_type: payload["operationType"], payment: (payload["payment"] || []).map { |e| PaymentResource.from_api(e) }, presence_type: payload["presenceType"], print_type: payload["printType"], purpose_type: payload["purposeType"], serie: payload["serie"], totals: TotalResource.from_api(payload["totals"]), transaction_intermediate: IntermediateResource.from_api(payload["transactionIntermediate"]), transport: TransportInformationResource.from_api(payload["transport"]), ) end |
.new ⇒ instance
36 |
# File 'sig/nfe/generated/nf_consumidor_v2/consumer_invoice_request.rbs', line 36
def self.new: (?additional_information: AdditionalInformationResource, ?billing: BillingResource, ?buyer: BuyerResource, ?consumer_type: untyped, ?consumption_city_code: Integer?, ?contingency_justification: String?, ?contingency_on: String?, ?credit_type: untyped, ?debit_type: untyped, ?destination: untyped, ?government_purchase: GovernmentPurchaseResource, ?ibs_consumption_city_code: Integer?, ?id: String?, ?issuer: IssuerFromRequestResource, items: Array[InvoiceItemResource], ?number: Integer?, ?operation_nature: String?, ?operation_on: String?, ?operation_type: untyped, ?payment: Array[PaymentResource]?, ?presence_type: untyped, ?print_type: untyped, ?purpose_type: untyped, ?serie: Integer?, ?totals: TotalResource, ?transaction_intermediate: IntermediateResource, ?transport: TransportInformationResource) -> instance
|