Class: Nfe::Generated::ProductInvoiceRtcV1::ProductInvoiceRequest

Inherits:
Data
  • Object
show all
Defined in:
lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb,
sig/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rbs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeProductInvoiceRequest

Returns a new instance of ProductInvoiceRequest.

Parameters:



42
# File 'sig/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rbs', line 42

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, ?delivery: DeliveryInformationResource, ?destination: untyped, ?expected_delivery_on: String?, ?export: ExportResource, ?government_purchase: GovernmentPurchaseResource, ?ibs_consumption_city_code: Integer?, ?id: String?, ?issuer_tax_substitute: IssuerFromRequestResource, items: Array[InvoiceItemResource], ?number: Integer?, ?operation_nature: String?, ?operation_on: String?, ?operation_type: untyped, payment: Array[PaymentResource], ?presence_type: untyped, ?print_type: untyped, ?purchase_information: PurchaseInformationResource, ?purpose_type: untyped, ?serie: Integer?, ?totals: Total, ?transaction_intermediate: IntermediateResource, ?transport: TransportInformationResource, ?withdrawal: WithdrawalInformationResource) -> void

Instance Attribute Details

#additional_informationObject (readonly)

Returns the value of attribute additional_information

Returns:

  • (Object)

    the current value of additional_information



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def additional_information
  @additional_information
end

#billingObject (readonly)

Returns the value of attribute billing

Returns:

  • (Object)

    the current value of billing



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def billing
  @billing
end

#buyerObject (readonly)

Returns the value of attribute buyer

Returns:

  • (Object)

    the current value of buyer



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def buyer
  @buyer
end

#consumer_typeObject (readonly)

Returns the value of attribute consumer_type

Returns:

  • (Object)

    the current value of consumer_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def consumer_type
  @consumer_type
end

#consumption_city_codeObject (readonly)

Returns the value of attribute consumption_city_code

Returns:

  • (Object)

    the current value of consumption_city_code



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def consumption_city_code
  @consumption_city_code
end

#contingency_justificationObject (readonly)

Returns the value of attribute contingency_justification

Returns:

  • (Object)

    the current value of contingency_justification



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def contingency_justification
  @contingency_justification
end

#contingency_onObject (readonly)

Returns the value of attribute contingency_on

Returns:

  • (Object)

    the current value of contingency_on



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def contingency_on
  @contingency_on
end

#credit_typeObject (readonly)

Returns the value of attribute credit_type

Returns:

  • (Object)

    the current value of credit_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def credit_type
  @credit_type
end

#debit_typeObject (readonly)

Returns the value of attribute debit_type

Returns:

  • (Object)

    the current value of debit_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def debit_type
  @debit_type
end

#deliveryObject (readonly)

Returns the value of attribute delivery

Returns:

  • (Object)

    the current value of delivery



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def delivery
  @delivery
end

#destinationObject (readonly)

Returns the value of attribute destination

Returns:

  • (Object)

    the current value of destination



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def destination
  @destination
end

#expected_delivery_onObject (readonly)

Returns the value of attribute expected_delivery_on

Returns:

  • (Object)

    the current value of expected_delivery_on



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def expected_delivery_on
  @expected_delivery_on
end

#exportObject (readonly)

Returns the value of attribute export

Returns:

  • (Object)

    the current value of export



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def export
  @export
end

#government_purchaseObject (readonly)

Returns the value of attribute government_purchase

Returns:

  • (Object)

    the current value of government_purchase



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def government_purchase
  @government_purchase
end

#ibs_consumption_city_codeObject (readonly)

Returns the value of attribute ibs_consumption_city_code

Returns:

  • (Object)

    the current value of ibs_consumption_city_code



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def ibs_consumption_city_code
  @ibs_consumption_city_code
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def id
  @id
end

#issuer_tax_substituteObject (readonly)

Returns the value of attribute issuer_tax_substitute

Returns:

  • (Object)

    the current value of issuer_tax_substitute



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def issuer_tax_substitute
  @issuer_tax_substitute
end

#itemsObject (readonly)

Returns the value of attribute items

Returns:

  • (Object)

    the current value of items



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def items
  @items
end

#numberObject (readonly)

Returns the value of attribute number

Returns:

  • (Object)

    the current value of number



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def number
  @number
end

#operation_natureObject (readonly)

Returns the value of attribute operation_nature

Returns:

  • (Object)

    the current value of operation_nature



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def operation_nature
  @operation_nature
end

#operation_onObject (readonly)

Returns the value of attribute operation_on

Returns:

  • (Object)

    the current value of operation_on



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def operation_on
  @operation_on
end

#operation_typeObject (readonly)

Returns the value of attribute operation_type

Returns:

  • (Object)

    the current value of operation_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def operation_type
  @operation_type
end

#paymentObject (readonly)

Returns the value of attribute payment

Returns:

  • (Object)

    the current value of payment



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def payment
  @payment
end

#presence_typeObject (readonly)

Returns the value of attribute presence_type

Returns:

  • (Object)

    the current value of presence_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def presence_type
  @presence_type
end

Returns the value of attribute print_type

Returns:

  • (Object)

    the current value of print_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def print_type
  @print_type
end

#purchase_informationObject (readonly)

Returns the value of attribute purchase_information

Returns:

  • (Object)

    the current value of purchase_information



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def purchase_information
  @purchase_information
end

#purpose_typeObject (readonly)

Returns the value of attribute purpose_type

Returns:

  • (Object)

    the current value of purpose_type



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def purpose_type
  @purpose_type
end

#serieObject (readonly)

Returns the value of attribute serie

Returns:

  • (Object)

    the current value of serie



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def serie
  @serie
end

#totalsObject (readonly)

Returns the value of attribute totals

Returns:

  • (Object)

    the current value of totals



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def totals
  @totals
end

#transaction_intermediateObject (readonly)

Returns the value of attribute transaction_intermediate

Returns:

  • (Object)

    the current value of transaction_intermediate



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def transaction_intermediate
  @transaction_intermediate
end

#transportObject (readonly)

Returns the value of attribute transport

Returns:

  • (Object)

    the current value of transport



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def transport
  @transport
end

#withdrawalObject (readonly)

Returns the value of attribute withdrawal

Returns:

  • (Object)

    the current value of withdrawal



9
10
11
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rb', line 9

def withdrawal
  @withdrawal
end

Class Method Details

.from_api(payload) ⇒ instance?

Parameters:

  • payload (Hash[String, untyped], nil)

Returns:

  • (instance, nil)


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
43
44
45
46
47
# File 'lib/nfe/generated/product_invoice_rtc_v1/product_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"],
    delivery: DeliveryInformationResource.from_api(payload["delivery"]),
    destination: payload["destination"],
    expected_delivery_on: payload["expectedDeliveryOn"],
    export: ExportResource.from_api(payload["export"]),
    government_purchase: GovernmentPurchaseResource.from_api(payload["governmentPurchase"]),
    ibs_consumption_city_code: payload["ibsConsumptionCityCode"],
    id: payload["id"],
    issuer_tax_substitute: IssuerFromRequestResource.from_api(payload["issuerTaxSubstitute"]),
    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"],
    purchase_information: PurchaseInformationResource.from_api(payload["purchaseInformation"]),
    purpose_type: payload["purposeType"],
    serie: payload["serie"],
    totals: Total.from_api(payload["totals"]),
    transaction_intermediate: IntermediateResource.from_api(payload["transactionIntermediate"]),
    transport: TransportInformationResource.from_api(payload["transport"]),
    withdrawal: WithdrawalInformationResource.from_api(payload["withdrawal"]),
  )
end

.newinstance

Parameters:

Returns:

  • (instance)


41
# File 'sig/nfe/generated/product_invoice_rtc_v1/product_invoice_request.rbs', line 41

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, ?delivery: DeliveryInformationResource, ?destination: untyped, ?expected_delivery_on: String?, ?export: ExportResource, ?government_purchase: GovernmentPurchaseResource, ?ibs_consumption_city_code: Integer?, ?id: String?, ?issuer_tax_substitute: IssuerFromRequestResource, items: Array[InvoiceItemResource], ?number: Integer?, ?operation_nature: String?, ?operation_on: String?, ?operation_type: untyped, payment: Array[PaymentResource], ?presence_type: untyped, ?print_type: untyped, ?purchase_information: PurchaseInformationResource, ?purpose_type: untyped, ?serie: Integer?, ?totals: Total, ?transaction_intermediate: IntermediateResource, ?transport: TransportInformationResource, ?withdrawal: WithdrawalInformationResource) -> instance