Class: Nfe::Generated::NfConsumidorV2::TransportRateResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTransportRateResource

Returns a new instance of TransportRateResource.

Parameters:

  • bc_retention_amount: (Float, nil)
  • cfop: (Integer, nil)
  • city_generator_fact_code: (Integer, nil)
  • icms_retention_amount: (Float, nil)
  • icms_retention_rate: (Float, nil)
  • service_amount: (Float, nil)


16
# File 'sig/nfe/generated/nf_consumidor_v2/transport_rate_resource.rbs', line 16

def initialize: (?bc_retention_amount: Float?, ?cfop: Integer?, ?city_generator_fact_code: Integer?, ?icms_retention_amount: Float?, ?icms_retention_rate: Float?, ?service_amount: Float?) -> void

Instance Attribute Details

#bc_retention_amountObject (readonly)

Returns the value of attribute bc_retention_amount

Returns:

  • (Object)

    the current value of bc_retention_amount



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def bc_retention_amount
  @bc_retention_amount
end

#cfopObject (readonly)

Returns the value of attribute cfop

Returns:

  • (Object)

    the current value of cfop



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def cfop
  @cfop
end

#city_generator_fact_codeObject (readonly)

Returns the value of attribute city_generator_fact_code

Returns:

  • (Object)

    the current value of city_generator_fact_code



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def city_generator_fact_code
  @city_generator_fact_code
end

#icms_retention_amountObject (readonly)

Returns the value of attribute icms_retention_amount

Returns:

  • (Object)

    the current value of icms_retention_amount



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def icms_retention_amount
  @icms_retention_amount
end

#icms_retention_rateObject (readonly)

Returns the value of attribute icms_retention_rate

Returns:

  • (Object)

    the current value of icms_retention_rate



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def icms_retention_rate
  @icms_retention_rate
end

#service_amountObject (readonly)

Returns the value of attribute service_amount

Returns:

  • (Object)

    the current value of service_amount



9
10
11
# File 'lib/nfe/generated/nf_consumidor_v2/transport_rate_resource.rb', line 9

def service_amount
  @service_amount
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/nf_consumidor_v2/transport_rate_resource.rb', line 10

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

  new(
    bc_retention_amount: payload["bcRetentionAmount"],
    cfop: payload["cfop"],
    city_generator_fact_code: payload["cityGeneratorFactCode"],
    icms_retention_amount: payload["icmsRetentionAmount"],
    icms_retention_rate: payload["icmsRetentionRate"],
    service_amount: payload["serviceAmount"],
  )
end

.newinstance

Parameters:

  • bc_retention_amount: (Float, nil)
  • cfop: (Integer, nil)
  • city_generator_fact_code: (Integer, nil)
  • icms_retention_amount: (Float, nil)
  • icms_retention_rate: (Float, nil)
  • service_amount: (Float, nil)

Returns:

  • (instance)


15
# File 'sig/nfe/generated/nf_consumidor_v2/transport_rate_resource.rbs', line 15

def self.new: (?bc_retention_amount: Float?, ?cfop: Integer?, ?city_generator_fact_code: Integer?, ?icms_retention_amount: Float?, ?icms_retention_rate: Float?, ?service_amount: Float?) -> instance