Class: Nfe::Generated::NfConsumidorV2::VehicleDetailResource

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVehicleDetailResource

Returns a new instance of VehicleDetailResource.

Parameters:

  • brand_model_code: (String, nil)
  • chassis: (String, nil)
  • color_code: (String, nil)
  • color_description: (String, nil)
  • denatran_color_code: (String, nil)
  • engine_displacement: (String, nil)
  • engine_number: (String, nil)
  • engine_power: (String, nil)
  • fuel_type: (String, nil)
  • gross_weight: (String, nil)
  • manufacture_year: (Integer, nil)
  • maximum_traction_capacity: (String, nil)
  • model_year: (Integer, nil)
  • net_weight: (String, nil)
  • operation_type: (Integer, nil)
  • paint_type: (String, nil)
  • restriction_type: (Integer, nil)
  • seating_capacity: (Integer, nil)
  • serial_number: (String, nil)
  • vehicle_condition: (Integer, nil)
  • vehicle_species: (Integer, nil)
  • vehicle_type: (String, nil)
  • vin_condition: (String, nil)
  • wheel_base: (String, nil)


34
# File 'sig/nfe/generated/nf_consumidor_v2/vehicle_detail_resource.rbs', line 34

def initialize: (?brand_model_code: String?, ?chassis: String?, ?color_code: String?, ?color_description: String?, ?denatran_color_code: String?, ?engine_displacement: String?, ?engine_number: String?, ?engine_power: String?, ?fuel_type: String?, ?gross_weight: String?, ?manufacture_year: Integer?, ?maximum_traction_capacity: String?, ?model_year: Integer?, ?net_weight: String?, ?operation_type: Integer?, ?paint_type: String?, ?restriction_type: Integer?, ?seating_capacity: Integer?, ?serial_number: String?, ?vehicle_condition: Integer?, ?vehicle_species: Integer?, ?vehicle_type: String?, ?vin_condition: String?, ?wheel_base: String?) -> void

Instance Attribute Details

#brand_model_codeObject (readonly)

Returns the value of attribute brand_model_code

Returns:

  • (Object)

    the current value of brand_model_code



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

def brand_model_code
  @brand_model_code
end

#chassisObject (readonly)

Returns the value of attribute chassis

Returns:

  • (Object)

    the current value of chassis



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

def chassis
  @chassis
end

#color_codeObject (readonly)

Returns the value of attribute color_code

Returns:

  • (Object)

    the current value of color_code



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

def color_code
  @color_code
end

#color_descriptionObject (readonly)

Returns the value of attribute color_description

Returns:

  • (Object)

    the current value of color_description



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

def color_description
  @color_description
end

#denatran_color_codeObject (readonly)

Returns the value of attribute denatran_color_code

Returns:

  • (Object)

    the current value of denatran_color_code



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

def denatran_color_code
  @denatran_color_code
end

#engine_displacementObject (readonly)

Returns the value of attribute engine_displacement

Returns:

  • (Object)

    the current value of engine_displacement



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

def engine_displacement
  @engine_displacement
end

#engine_numberObject (readonly)

Returns the value of attribute engine_number

Returns:

  • (Object)

    the current value of engine_number



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

def engine_number
  @engine_number
end

#engine_powerObject (readonly)

Returns the value of attribute engine_power

Returns:

  • (Object)

    the current value of engine_power



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

def engine_power
  @engine_power
end

#fuel_typeObject (readonly)

Returns the value of attribute fuel_type

Returns:

  • (Object)

    the current value of fuel_type



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

def fuel_type
  @fuel_type
end

#gross_weightObject (readonly)

Returns the value of attribute gross_weight

Returns:

  • (Object)

    the current value of gross_weight



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

def gross_weight
  @gross_weight
end

#manufacture_yearObject (readonly)

Returns the value of attribute manufacture_year

Returns:

  • (Object)

    the current value of manufacture_year



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

def manufacture_year
  @manufacture_year
end

#maximum_traction_capacityObject (readonly)

Returns the value of attribute maximum_traction_capacity

Returns:

  • (Object)

    the current value of maximum_traction_capacity



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

def maximum_traction_capacity
  @maximum_traction_capacity
end

#model_yearObject (readonly)

Returns the value of attribute model_year

Returns:

  • (Object)

    the current value of model_year



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

def model_year
  @model_year
end

#net_weightObject (readonly)

Returns the value of attribute net_weight

Returns:

  • (Object)

    the current value of net_weight



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

def net_weight
  @net_weight
end

#operation_typeObject (readonly)

Returns the value of attribute operation_type

Returns:

  • (Object)

    the current value of operation_type



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

def operation_type
  @operation_type
end

#paint_typeObject (readonly)

Returns the value of attribute paint_type

Returns:

  • (Object)

    the current value of paint_type



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

def paint_type
  @paint_type
end

#restriction_typeObject (readonly)

Returns the value of attribute restriction_type

Returns:

  • (Object)

    the current value of restriction_type



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

def restriction_type
  @restriction_type
end

#seating_capacityObject (readonly)

Returns the value of attribute seating_capacity

Returns:

  • (Object)

    the current value of seating_capacity



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

def seating_capacity
  @seating_capacity
end

#serial_numberObject (readonly)

Returns the value of attribute serial_number

Returns:

  • (Object)

    the current value of serial_number



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

def serial_number
  @serial_number
end

#vehicle_conditionObject (readonly)

Returns the value of attribute vehicle_condition

Returns:

  • (Object)

    the current value of vehicle_condition



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

def vehicle_condition
  @vehicle_condition
end

#vehicle_speciesObject (readonly)

Returns the value of attribute vehicle_species

Returns:

  • (Object)

    the current value of vehicle_species



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

def vehicle_species
  @vehicle_species
end

#vehicle_typeObject (readonly)

Returns the value of attribute vehicle_type

Returns:

  • (Object)

    the current value of vehicle_type



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

def vehicle_type
  @vehicle_type
end

#vin_conditionObject (readonly)

Returns the value of attribute vin_condition

Returns:

  • (Object)

    the current value of vin_condition



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

def vin_condition
  @vin_condition
end

#wheel_baseObject (readonly)

Returns the value of attribute wheel_base

Returns:

  • (Object)

    the current value of wheel_base



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

def wheel_base
  @wheel_base
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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/nfe/generated/nf_consumidor_v2/vehicle_detail_resource.rb', line 10

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

  new(
    brand_model_code: payload["brandModelCode"],
    chassis: payload["chassis"],
    color_code: payload["colorCode"],
    color_description: payload["colorDescription"],
    denatran_color_code: payload["denatranColorCode"],
    engine_displacement: payload["engineDisplacement"],
    engine_number: payload["engineNumber"],
    engine_power: payload["enginePower"],
    fuel_type: payload["fuelType"],
    gross_weight: payload["grossWeight"],
    manufacture_year: payload["manufactureYear"],
    maximum_traction_capacity: payload["maximumTractionCapacity"],
    model_year: payload["modelYear"],
    net_weight: payload["netWeight"],
    operation_type: payload["operationType"],
    paint_type: payload["paintType"],
    restriction_type: payload["restrictionType"],
    seating_capacity: payload["seatingCapacity"],
    serial_number: payload["serialNumber"],
    vehicle_condition: payload["vehicleCondition"],
    vehicle_species: payload["vehicleSpecies"],
    vehicle_type: payload["vehicleType"],
    vin_condition: payload["vinCondition"],
    wheel_base: payload["wheelBase"],
  )
end

.newinstance

Parameters:

  • brand_model_code: (String, nil)
  • chassis: (String, nil)
  • color_code: (String, nil)
  • color_description: (String, nil)
  • denatran_color_code: (String, nil)
  • engine_displacement: (String, nil)
  • engine_number: (String, nil)
  • engine_power: (String, nil)
  • fuel_type: (String, nil)
  • gross_weight: (String, nil)
  • manufacture_year: (Integer, nil)
  • maximum_traction_capacity: (String, nil)
  • model_year: (Integer, nil)
  • net_weight: (String, nil)
  • operation_type: (Integer, nil)
  • paint_type: (String, nil)
  • restriction_type: (Integer, nil)
  • seating_capacity: (Integer, nil)
  • serial_number: (String, nil)
  • vehicle_condition: (Integer, nil)
  • vehicle_species: (Integer, nil)
  • vehicle_type: (String, nil)
  • vin_condition: (String, nil)
  • wheel_base: (String, nil)

Returns:

  • (instance)


33
# File 'sig/nfe/generated/nf_consumidor_v2/vehicle_detail_resource.rbs', line 33

def self.new: (?brand_model_code: String?, ?chassis: String?, ?color_code: String?, ?color_description: String?, ?denatran_color_code: String?, ?engine_displacement: String?, ?engine_number: String?, ?engine_power: String?, ?fuel_type: String?, ?gross_weight: String?, ?manufacture_year: Integer?, ?maximum_traction_capacity: String?, ?model_year: Integer?, ?net_weight: String?, ?operation_type: Integer?, ?paint_type: String?, ?restriction_type: Integer?, ?seating_capacity: Integer?, ?serial_number: String?, ?vehicle_condition: Integer?, ?vehicle_species: Integer?, ?vehicle_type: String?, ?vin_condition: String?, ?wheel_base: String?) -> instance