Class: Nfe::Generated::ServiceInvoiceRtcV1::Lease

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeLease

Returns a new instance of Lease.

Parameters:

  • category: (String)
  • object_type: (String)
  • poles_count: (Integer)
  • total_length: (Float)


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

def initialize: (?category: String, ?object_type: String, ?poles_count: Integer, ?total_length: Float) -> void

Instance Attribute Details

#categoryObject (readonly)

Returns the value of attribute category

Returns:

  • (Object)

    the current value of category



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

def category
  @category
end

#object_typeObject (readonly)

Returns the value of attribute object_type

Returns:

  • (Object)

    the current value of object_type



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

def object_type
  @object_type
end

#poles_countObject (readonly)

Returns the value of attribute poles_count

Returns:

  • (Object)

    the current value of poles_count



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

def poles_count
  @poles_count
end

#total_lengthObject (readonly)

Returns the value of attribute total_length

Returns:

  • (Object)

    the current value of total_length



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

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

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

  new(
    category: payload["category"],
    object_type: payload["objectType"],
    poles_count: payload["polesCount"],
    total_length: payload["totalLength"],
  )
end

.newinstance

Parameters:

  • category: (String)
  • object_type: (String)
  • poles_count: (Integer)
  • total_length: (Float)

Returns:

  • (instance)


13
# File 'sig/nfe/generated/service_invoice_rtc_v1/lease.rbs', line 13

def self.new: (?category: String, ?object_type: String, ?poles_count: Integer, ?total_length: Float) -> instance