Class: Nfe::Generated::ProductInvoiceRtcV1::PumpResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePumpResource

Returns a new instance of PumpResource.

Parameters:

  • beginning_amount: (Float, nil)
  • end_amount: (Float, nil)
  • number: (Integer, nil)
  • percentage_bio: (Float, nil)
  • spout_number: (Integer, nil)
  • tank_number: (Integer, nil)


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

def initialize: (?beginning_amount: Float?, ?end_amount: Float?, ?number: Integer?, ?percentage_bio: Float?, ?spout_number: Integer?, ?tank_number: Integer?) -> void

Instance Attribute Details

#beginning_amountObject (readonly)

Returns the value of attribute beginning_amount

Returns:

  • (Object)

    the current value of beginning_amount



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

def beginning_amount
  @beginning_amount
end

#end_amountObject (readonly)

Returns the value of attribute end_amount

Returns:

  • (Object)

    the current value of end_amount



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

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

def number
  @number
end

#percentage_bioObject (readonly)

Returns the value of attribute percentage_bio

Returns:

  • (Object)

    the current value of percentage_bio



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

def percentage_bio
  @percentage_bio
end

#spout_numberObject (readonly)

Returns the value of attribute spout_number

Returns:

  • (Object)

    the current value of spout_number



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

def spout_number
  @spout_number
end

#tank_numberObject (readonly)

Returns the value of attribute tank_number

Returns:

  • (Object)

    the current value of tank_number



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

def tank_number
  @tank_number
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/pump_resource.rb', line 10

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

  new(
    beginning_amount: payload["beginningAmount"],
    end_amount: payload["endAmount"],
    number: payload["number"],
    percentage_bio: payload["percentageBio"],
    spout_number: payload["spoutNumber"],
    tank_number: payload["tankNumber"],
  )
end

.newinstance

Parameters:

  • beginning_amount: (Float, nil)
  • end_amount: (Float, nil)
  • number: (Integer, nil)
  • percentage_bio: (Float, nil)
  • spout_number: (Integer, nil)
  • tank_number: (Integer, nil)

Returns:

  • (instance)


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

def self.new: (?beginning_amount: Float?, ?end_amount: Float?, ?number: Integer?, ?percentage_bio: Float?, ?spout_number: Integer?, ?tank_number: Integer?) -> instance