Class: Nfe::Generated::ProductInvoiceRtcV1::DocumentInvoiceReferenceResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeDocumentInvoiceReferenceResource

Returns a new instance of DocumentInvoiceReferenceResource.

Parameters:

  • federal_tax_number: (String, nil)
  • model: (String, nil)
  • number: (String, nil)
  • series: (String, nil)
  • state: (Float, nil)
  • year_month: (String, nil)


16
# File 'sig/nfe/generated/product_invoice_rtc_v1/document_invoice_reference_resource.rbs', line 16

def initialize: (?federal_tax_number: String?, ?model: String?, ?number: String?, ?series: String?, ?state: Float?, ?year_month: String?) -> void

Instance Attribute Details

#federal_tax_numberObject (readonly)

Returns the value of attribute federal_tax_number

Returns:

  • (Object)

    the current value of federal_tax_number



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

def federal_tax_number
  @federal_tax_number
end

#modelObject (readonly)

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



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

def model
  @model
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/document_invoice_reference_resource.rb', line 9

def number
  @number
end

#seriesObject (readonly)

Returns the value of attribute series

Returns:

  • (Object)

    the current value of series



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

def series
  @series
end

#stateObject (readonly)

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



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

def state
  @state
end

#year_monthObject (readonly)

Returns the value of attribute year_month

Returns:

  • (Object)

    the current value of year_month



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

def year_month
  @year_month
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
# File 'lib/nfe/generated/product_invoice_rtc_v1/document_invoice_reference_resource.rb', line 10

def self.from_api(payload)
  return nil if payload.nil?

  new(
    federal_tax_number: payload["federalTaxNumber"],
    model: payload["model"],
    number: payload["number"],
    series: payload["series"],
    state: payload["state"],
    year_month: payload["yearMonth"],
  )
end

.newinstance

Parameters:

  • federal_tax_number: (String, nil)
  • model: (String, nil)
  • number: (String, nil)
  • series: (String, nil)
  • state: (Float, nil)
  • year_month: (String, nil)

Returns:

  • (instance)


15
# File 'sig/nfe/generated/product_invoice_rtc_v1/document_invoice_reference_resource.rbs', line 15

def self.new: (?federal_tax_number: String?, ?model: String?, ?number: String?, ?series: String?, ?state: Float?, ?year_month: String?) -> instance