Class: Samsara::Types::IftaReportTroubleshootingObjectResponseBody
- Inherits:
-
Object
- Object
- Samsara::Types::IftaReportTroubleshootingObjectResponseBody
- Defined in:
- lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb
Overview
IFTA report troubleshooting information.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#no_purchases_found ⇒ Boolean
readonly
Whether or not fuel purchases were found for this report.
-
#unassigned_fuel_type_purchases ⇒ Object
readonly
used to calculate tax paid gallons.
-
#unassigned_fuel_type_vehicles ⇒ Object
readonly
assigned fuel type may affect total mileage.
-
#unassigned_vehicle_purchases ⇒ Object
readonly
mpg.
Class Method Summary collapse
- .from_json(json_object:) ⇒ Samsara::Types::IftaReportTroubleshootingObjectResponseBody
- .validate_raw(obj:) ⇒ Void
Instance Method Summary collapse
- #initialize(no_purchases_found:, unassigned_fuel_type_purchases:, unassigned_fuel_type_vehicles:, unassigned_vehicle_purchases:, additional_properties: nil) ⇒ Samsara::Types::IftaReportTroubleshootingObjectResponseBody constructor
- #to_json ⇒ String
Constructor Details
#initialize(no_purchases_found:, unassigned_fuel_type_purchases:, unassigned_fuel_type_vehicles:, unassigned_vehicle_purchases:, additional_properties: nil) ⇒ Samsara::Types::IftaReportTroubleshootingObjectResponseBody
37 38 39 40 41 42 43 44 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 37 def initialize(no_purchases_found:, unassigned_fuel_type_purchases:, unassigned_fuel_type_vehicles:, unassigned_vehicle_purchases:, additional_properties: nil) @no_purchases_found = no_purchases_found @unassigned_fuel_type_purchases = unassigned_fuel_type_purchases @unassigned_fuel_type_vehicles = unassigned_fuel_type_vehicles @unassigned_vehicle_purchases = unassigned_vehicle_purchases @additional_properties = additional_properties @_field_set = { "noPurchasesFound": no_purchases_found, "unassignedFuelTypePurchases": unassigned_fuel_type_purchases, "unassignedFuelTypeVehicles": unassigned_fuel_type_vehicles, "unassignedVehiclePurchases": unassigned_vehicle_purchases } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
21 22 23 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 21 def additional_properties @additional_properties end |
#no_purchases_found ⇒ Boolean (readonly)
Returns Whether or not fuel purchases were found for this report.
10 11 12 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 10 def no_purchases_found @no_purchases_found end |
#unassigned_fuel_type_purchases ⇒ Object (readonly)
used to calculate tax paid gallons.
13 14 15 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 13 def unassigned_fuel_type_purchases @unassigned_fuel_type_purchases end |
#unassigned_fuel_type_vehicles ⇒ Object (readonly)
assigned fuel type may affect total mileage.
16 17 18 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 16 def unassigned_fuel_type_vehicles @unassigned_fuel_type_vehicles end |
#unassigned_vehicle_purchases ⇒ Object (readonly)
mpg.
19 20 21 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 19 def unassigned_vehicle_purchases @unassigned_vehicle_purchases end |
Class Method Details
.from_json(json_object:) ⇒ Samsara::Types::IftaReportTroubleshootingObjectResponseBody
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 50 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) no_purchases_found = parsed_json["noPurchasesFound"] unassigned_fuel_type_purchases = parsed_json["unassignedFuelTypePurchases"] unassigned_fuel_type_vehicles = parsed_json["unassignedFuelTypeVehicles"] unassigned_vehicle_purchases = parsed_json["unassignedVehiclePurchases"] new( no_purchases_found: no_purchases_found, unassigned_fuel_type_purchases: unassigned_fuel_type_purchases, unassigned_fuel_type_vehicles: unassigned_fuel_type_vehicles, unassigned_vehicle_purchases: unassigned_vehicle_purchases, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
78 79 80 81 82 83 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 78 def self.validate_raw(obj:) obj.no_purchases_found.is_a?(Boolean) != false || raise("Passed value for field obj.no_purchases_found is not the expected type, validation failed.") obj.unassigned_fuel_type_purchases.is_a?(Long) != false || raise("Passed value for field obj.unassigned_fuel_type_purchases is not the expected type, validation failed.") obj.unassigned_fuel_type_vehicles.is_a?(Long) != false || raise("Passed value for field obj.unassigned_fuel_type_vehicles is not the expected type, validation failed.") obj.unassigned_vehicle_purchases.is_a?(Long) != false || raise("Passed value for field obj.unassigned_vehicle_purchases is not the expected type, validation failed.") end |
Instance Method Details
#to_json ⇒ String
69 70 71 |
# File 'lib/samsara_api/types/ifta_report_troubleshooting_object_response_body.rb', line 69 def to_json @_field_set&.to_json end |