Class: Nfe::Generated::ServiceInvoiceRtcV1::Construction

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConstruction

Returns a new instance of Construction.

Parameters:

  • cib_code: (String)
  • encapsulation_number: (String)
  • property_fiscal_registration: (String)
  • site_address: (AddressDefinition)
  • work_id: (Hash[String, untyped])


15
# File 'sig/nfe/generated/service_invoice_rtc_v1/construction.rbs', line 15

def initialize: (?cib_code: String, ?encapsulation_number: String, ?property_fiscal_registration: String, ?site_address: AddressDefinition, ?work_id: Hash[String, untyped]) -> void

Instance Attribute Details

#cib_codeObject (readonly)

Returns the value of attribute cib_code

Returns:

  • (Object)

    the current value of cib_code



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 9

def cib_code
  @cib_code
end

#encapsulation_numberObject (readonly)

Returns the value of attribute encapsulation_number

Returns:

  • (Object)

    the current value of encapsulation_number



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 9

def encapsulation_number
  @encapsulation_number
end

#property_fiscal_registrationObject (readonly)

Returns the value of attribute property_fiscal_registration

Returns:

  • (Object)

    the current value of property_fiscal_registration



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 9

def property_fiscal_registration
  @property_fiscal_registration
end

#site_addressObject (readonly)

Returns the value of attribute site_address

Returns:

  • (Object)

    the current value of site_address



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 9

def site_address
  @site_address
end

#work_idObject (readonly)

Returns the value of attribute work_id

Returns:

  • (Object)

    the current value of work_id



9
10
11
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 9

def work_id
  @work_id
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
# File 'lib/nfe/generated/service_invoice_rtc_v1/construction.rb', line 10

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

  new(
    cib_code: payload["cibCode"],
    encapsulation_number: payload["encapsulationNumber"],
    property_fiscal_registration: payload["propertyFiscalRegistration"],
    site_address: AddressDefinition.from_api(payload["siteAddress"]),
    work_id: payload["workId"],
  )
end

.newinstance

Parameters:

  • cib_code: (String)
  • encapsulation_number: (String)
  • property_fiscal_registration: (String)
  • site_address: (AddressDefinition)
  • work_id: (Hash[String, untyped])

Returns:

  • (instance)


14
# File 'sig/nfe/generated/service_invoice_rtc_v1/construction.rbs', line 14

def self.new: (?cib_code: String, ?encapsulation_number: String, ?property_fiscal_registration: String, ?site_address: AddressDefinition, ?work_id: Hash[String, untyped]) -> instance