ev-recharge-sdk 1.2.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +14 -14
  4. data/lib/shell_ev/configuration.rb +8 -5
  5. data/lib/shell_ev/controllers/charging_controller.rb +8 -8
  6. data/lib/shell_ev/controllers/locations_controller.rb +13 -13
  7. data/lib/shell_ev/controllers/o_auth_authorization_controller.rb +3 -3
  8. data/lib/shell_ev/exceptions/api_exception.rb +11 -0
  9. data/lib/shell_ev/exceptions/bad_request_exception.rb +13 -0
  10. data/lib/shell_ev/exceptions/internal_server_error_exception.rb +14 -0
  11. data/lib/shell_ev/exceptions/not_found_exception.rb +13 -0
  12. data/lib/shell_ev/exceptions/o_auth_provider_exception.rb +14 -0
  13. data/lib/shell_ev/exceptions/serviceunavailable_exception.rb +13 -0
  14. data/lib/shell_ev/exceptions/too_many_requests_exception.rb +13 -0
  15. data/lib/shell_ev/exceptions/unauthorized_exception.rb +13 -0
  16. data/lib/shell_ev/models/accessibility.rb +12 -0
  17. data/lib/shell_ev/models/active_response200_json.rb +18 -3
  18. data/lib/shell_ev/models/address.rb +14 -0
  19. data/lib/shell_ev/models/bad_request_err_msg.rb +14 -0
  20. data/lib/shell_ev/models/base_model.rb +76 -28
  21. data/lib/shell_ev/models/charge_error.rb +12 -0
  22. data/lib/shell_ev/models/charge_retrieve_state.rb +12 -0
  23. data/lib/shell_ev/models/chargesession_start_body.rb +13 -0
  24. data/lib/shell_ev/models/connector_vo.rb +25 -5
  25. data/lib/shell_ev/models/coordinates.rb +12 -0
  26. data/lib/shell_ev/models/data_active.rb +17 -0
  27. data/lib/shell_ev/models/data_retrieve.rb +17 -0
  28. data/lib/shell_ev/models/electrical_properties.rb +15 -1
  29. data/lib/shell_ev/models/evse_vo.rb +17 -0
  30. data/lib/shell_ev/models/get_charge_session_retrieve_response200_json.rb +17 -2
  31. data/lib/shell_ev/models/get_ev_locations_authorization_methods_enum.rb +1 -1
  32. data/lib/shell_ev/models/get_ev_locations_connector_types_enum.rb +1 -1
  33. data/lib/shell_ev/models/get_ev_locations_evse_status_enum.rb +1 -1
  34. data/lib/shell_ev/models/inline_response202.rb +18 -3
  35. data/lib/shell_ev/models/inline_response2021.rb +15 -2
  36. data/lib/shell_ev/models/inline_response202_data.rb +12 -0
  37. data/lib/shell_ev/models/internal_error_object.rb +13 -0
  38. data/lib/shell_ev/models/location_respone_object.rb +19 -0
  39. data/lib/shell_ev/models/locations_markers_authorization_methods_enum.rb +1 -1
  40. data/lib/shell_ev/models/locations_markers_connector_types_enum.rb +1 -1
  41. data/lib/shell_ev/models/locations_markers_evse_status_enum.rb +1 -1
  42. data/lib/shell_ev/models/multi_location_marker.rb +17 -0
  43. data/lib/shell_ev/models/nearby_locations_authorization_methods_enum.rb +1 -1
  44. data/lib/shell_ev/models/nearby_locations_connector_types_enum.rb +1 -1
  45. data/lib/shell_ev/models/nearby_locations_evse_status_enum.rb +1 -1
  46. data/lib/shell_ev/models/not_found_err_msg.rb +14 -0
  47. data/lib/shell_ev/models/opening_hours_object.rb +15 -1
  48. data/lib/shell_ev/models/ratelimit_err_msg.rb +14 -0
  49. data/lib/shell_ev/models/response.rb +13 -0
  50. data/lib/shell_ev/models/serviceunavailable_err_msg.rb +14 -0
  51. data/lib/shell_ev/models/single_location_marker.rb +20 -2
  52. data/lib/shell_ev/models/single_location_marker_response.rb +13 -0
  53. data/lib/shell_ev/models/tariff.rb +124 -0
  54. data/lib/shell_ev/models/tariff_vo.rb +18 -1
  55. data/lib/shell_ev/models/unauthorized_err_msg.rb +14 -0
  56. data/lib/shell_ev/utilities/file_wrapper.rb +14 -2
  57. data/lib/shell_ev.rb +1 -0
  58. metadata +7 -12
@@ -5,6 +5,7 @@
5
5
 
6
6
  module ShellEv
7
7
  # Base model.
8
+ # rubocop:disable all
8
9
  class BaseModel < CoreLibrary::BaseModel
9
10
  # Returns a Hash representation of the current object.
10
11
  def to_hash
@@ -15,48 +16,95 @@ module ShellEv
15
16
  instance_variables.each do |name|
16
17
  value = instance_variable_get(name)
17
18
  name = name[1..]
18
- key = self.class.names.key?(name) ? self.class.names[name] : name
19
- optional_fields = self.class.optionals
20
- nullable_fields = self.class.nullables
21
- if value.nil?
22
- next unless nullable_fields.include?(name)
23
-
24
- if !optional_fields.include?(name) && !nullable_fields.include?(name)
25
- raise ArgumentError,
26
- "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
19
+ if name == 'additional_properties'
20
+ additional_properties = process_additional_properties(value, self.class.names)
21
+ hash.merge!(additional_properties)
22
+ else
23
+ key = self.class.names.key?(name) ? self.class.names[name] : name
24
+ optional_fields = self.class.optionals
25
+ nullable_fields = self.class.nullables
26
+ if value.nil?
27
+ next unless nullable_fields.include?(name)
28
+
29
+ if !optional_fields.include?(name) && !nullable_fields.include?(name)
30
+ raise ArgumentError,
31
+ "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
32
+ end
27
33
  end
28
- end
29
34
 
30
- hash[key] = nil
31
- unless value.nil?
32
- if respond_to?("to_custom_#{name}")
33
- if (value.instance_of? Array) || (value.instance_of? Hash)
34
- params = [hash, key]
35
- hash[key] = send("to_custom_#{name}", *params)
35
+ hash[key] = nil
36
+ unless value.nil?
37
+ if respond_to?("to_custom_#{name}")
38
+ if (value.instance_of? Array) || (value.instance_of? Hash)
39
+ params = [hash, key]
40
+ hash[key] = send("to_custom_#{name}", *params)
41
+ else
42
+ hash[key] = send("to_custom_#{name}")
43
+ end
44
+ elsif respond_to?("to_union_type_#{name}")
45
+ hash[key] = send("to_union_type_#{name}")
46
+ elsif value.instance_of? Array
47
+ hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
48
+ elsif value.instance_of? Hash
49
+ hash[key] = {}
50
+ value.each do |k, v|
51
+ hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
52
+ end
36
53
  else
37
- hash[key] = send("to_custom_#{name}")
54
+ hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
38
55
  end
39
- elsif respond_to?("to_union_type_#{name}")
40
- hash[key] = send("to_union_type_#{name}")
41
- elsif value.instance_of? Array
42
- hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
43
- elsif value.instance_of? Hash
44
- hash[key] = {}
45
- value.each do |k, v|
46
- hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
47
- end
48
- else
49
- hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
50
56
  end
51
57
  end
52
58
  end
53
59
  hash
54
60
  end
55
61
 
62
+ # Processes additional properties, ensuring no conflicts with existing properties.
63
+ def process_additional_properties(additional_properties, existing_prop_names)
64
+ hash = {}
65
+ additional_properties.each do |name, value|
66
+ check_for_conflict(name, existing_prop_names)
67
+
68
+ hash[name] = if value.is_a?(Array)
69
+ process_array(value)
70
+ elsif value.is_a?(Hash)
71
+ process_hash(value)
72
+ else
73
+ process_basic_value(value)
74
+ end
75
+ end
76
+ hash
77
+ end
78
+
79
+ # Checks if an additional property conflicts with a model's existing property.
80
+ def check_for_conflict(name, existing_prop_names)
81
+ return unless existing_prop_names.key?(name)
82
+
83
+ raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
84
+ end
85
+
86
+ # Processes an array of values, recursively calling `to_hash` on BaseModel objects.
87
+ def process_array(value)
88
+ value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
89
+ end
90
+
91
+ # Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
92
+ def process_hash(value)
93
+ value.transform_values do |v|
94
+ v.is_a?(BaseModel) ? v.to_hash : v
95
+ end
96
+ end
97
+
98
+ # Processes a basic value (non-array, non-hash).
99
+ def process_basic_value(value)
100
+ value.is_a?(BaseModel) ? value.to_hash : value
101
+ end
102
+
56
103
  # Returns a JSON representation of the curent object.
57
104
  def to_json(options = {})
58
105
  hash = to_hash
59
106
  hash.to_json(options)
60
107
  end
61
108
  end
109
+ # rubocop:enable all
62
110
  end
@@ -55,5 +55,17 @@ module ShellEv
55
55
  ChargeError.new(code,
56
56
  message)
57
57
  end
58
+
59
+ # Provides a human-readable string representation of the object.
60
+ def to_s
61
+ class_name = self.class.name.split('::').last
62
+ "<#{class_name} code: #{@code}, message: #{@message}>"
63
+ end
64
+
65
+ # Provides a debugging-friendly string with detailed object information.
66
+ def inspect
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}>"
69
+ end
58
70
  end
59
71
  end
@@ -59,5 +59,17 @@ module ShellEv
59
59
  ChargeRetrieveState.new(status,
60
60
  error)
61
61
  end
62
+
63
+ # Provides a human-readable string representation of the object.
64
+ def to_s
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} status: #{@status}, error: #{@error}>"
67
+ end
68
+
69
+ # Provides a debugging-friendly string with detailed object information.
70
+ def inspect
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} status: #{@status.inspect}, error: #{@error.inspect}>"
73
+ end
62
74
  end
63
75
  end
@@ -53,5 +53,18 @@ module ShellEv
53
53
  ChargesessionStartBody.new(ev_charge_number,
54
54
  evse_id)
55
55
  end
56
+
57
+ # Provides a human-readable string representation of the object.
58
+ def to_s
59
+ class_name = self.class.name.split('::').last
60
+ "<#{class_name} ev_charge_number: #{@ev_charge_number}, evse_id: #{@evse_id}>"
61
+ end
62
+
63
+ # Provides a debugging-friendly string with detailed object information.
64
+ def inspect
65
+ class_name = self.class.name.split('::').last
66
+ "<#{class_name} ev_charge_number: #{@ev_charge_number.inspect}, evse_id:"\
67
+ " #{@evse_id.inspect}>"
68
+ end
56
69
  end
57
70
  end
@@ -19,7 +19,8 @@ module ShellEv
19
19
  # @return [String]
20
20
  attr_accessor :external_id
21
21
 
22
- # Type of the connector in the EVSE unit.
22
+ # Identifier of the Evse as given by the Operator, unique for the containing
23
+ # EVSE'
23
24
  # @return [ConnectorVOConnectorTypeEnum]
24
25
  attr_accessor :connector_type
25
26
 
@@ -32,15 +33,16 @@ module ShellEv
32
33
  # @return [TrueClass | FalseClass]
33
34
  attr_accessor :fixed_cable
34
35
 
35
- # Tariff details for charging on this Connector
36
- # @return [TariffVO]
36
+ # Indicates whether Connector has a fixed cable attached. False by default
37
+ # (not sent in this case)
38
+ # @return [Tariff]
37
39
  attr_accessor :tariff
38
40
 
39
41
  # ISO8601-compliant UTC datetime of the last update of the Connector’s data
40
42
  # @return [String]
41
43
  attr_accessor :updated
42
44
 
43
- # Source of the last update
45
+ # ISO8601-compliant UTC datetime of the last update of the Connector’s data
44
46
  # @return [ConnectorVOUpdatedByEnum]
45
47
  attr_accessor :updated_by
46
48
 
@@ -109,7 +111,7 @@ module ShellEv
109
111
  electrical_properties = ElectricalProperties.from_hash(hash['electricalProperties']) if
110
112
  hash['electricalProperties']
111
113
  fixed_cable = hash.key?('fixedCable') ? hash['fixedCable'] : SKIP
112
- tariff = TariffVO.from_hash(hash['tariff']) if hash['tariff']
114
+ tariff = Tariff.from_hash(hash['tariff']) if hash['tariff']
113
115
  updated = hash.key?('updated') ? hash['updated'] : SKIP
114
116
  updated_by = hash.key?('updatedBy') ? hash['updatedBy'] : SKIP
115
117
  deleted = hash.key?('deleted') ? hash['deleted'] : SKIP
@@ -125,5 +127,23 @@ module ShellEv
125
127
  updated_by,
126
128
  deleted)
127
129
  end
130
+
131
+ # Provides a human-readable string representation of the object.
132
+ def to_s
133
+ class_name = self.class.name.split('::').last
134
+ "<#{class_name} uid: #{@uid}, external_id: #{@external_id}, connector_type:"\
135
+ " #{@connector_type}, electrical_properties: #{@electrical_properties}, fixed_cable:"\
136
+ " #{@fixed_cable}, tariff: #{@tariff}, updated: #{@updated}, updated_by: #{@updated_by},"\
137
+ " deleted: #{@deleted}>"
138
+ end
139
+
140
+ # Provides a debugging-friendly string with detailed object information.
141
+ def inspect
142
+ class_name = self.class.name.split('::').last
143
+ "<#{class_name} uid: #{@uid.inspect}, external_id: #{@external_id.inspect}, connector_type:"\
144
+ " #{@connector_type.inspect}, electrical_properties: #{@electrical_properties.inspect},"\
145
+ " fixed_cable: #{@fixed_cable.inspect}, tariff: #{@tariff.inspect}, updated:"\
146
+ " #{@updated.inspect}, updated_by: #{@updated_by.inspect}, deleted: #{@deleted.inspect}>"
147
+ end
128
148
  end
129
149
  end
@@ -65,5 +65,17 @@ module ShellEv
65
65
 
66
66
  true
67
67
  end
68
+
69
+ # Provides a human-readable string representation of the object.
70
+ def to_s
71
+ class_name = self.class.name.split('::').last
72
+ "<#{class_name} latitude: #{@latitude}, longitude: #{@longitude}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} latitude: #{@latitude.inspect}, longitude: #{@longitude.inspect}>"
79
+ end
68
80
  end
69
81
  end
@@ -131,5 +131,22 @@ module ShellEv
131
131
  def to_custom_stopped_at
132
132
  DateTimeHelper.to_rfc3339(stopped_at)
133
133
  end
134
+
135
+ # Provides a human-readable string representation of the object.
136
+ def to_s
137
+ class_name = self.class.name.split('::').last
138
+ "<#{class_name} id: #{@id}, user_id: #{@user_id}, ema_id: #{@ema_id}, evse_id: #{@evse_id},"\
139
+ " started_at: #{@started_at}, stopped_at: #{@stopped_at}, session_state: #{@session_state},"\
140
+ " last_updated: #{@last_updated}>"
141
+ end
142
+
143
+ # Provides a debugging-friendly string with detailed object information.
144
+ def inspect
145
+ class_name = self.class.name.split('::').last
146
+ "<#{class_name} id: #{@id.inspect}, user_id: #{@user_id.inspect}, ema_id:"\
147
+ " #{@ema_id.inspect}, evse_id: #{@evse_id.inspect}, started_at: #{@started_at.inspect},"\
148
+ " stopped_at: #{@stopped_at.inspect}, session_state: #{@session_state.inspect},"\
149
+ " last_updated: #{@last_updated.inspect}>"
150
+ end
134
151
  end
135
152
  end
@@ -130,5 +130,22 @@ module ShellEv
130
130
  def to_custom_stopped_at
131
131
  DateTimeHelper.to_rfc3339(stopped_at)
132
132
  end
133
+
134
+ # Provides a human-readable string representation of the object.
135
+ def to_s
136
+ class_name = self.class.name.split('::').last
137
+ "<#{class_name} id: #{@id}, user_id: #{@user_id}, ema_id: #{@ema_id}, evse_id: #{@evse_id},"\
138
+ " last_updated: #{@last_updated}, started_at: #{@started_at}, stopped_at: #{@stopped_at},"\
139
+ " session_state: #{@session_state}>"
140
+ end
141
+
142
+ # Provides a debugging-friendly string with detailed object information.
143
+ def inspect
144
+ class_name = self.class.name.split('::').last
145
+ "<#{class_name} id: #{@id.inspect}, user_id: #{@user_id.inspect}, ema_id:"\
146
+ " #{@ema_id.inspect}, evse_id: #{@evse_id.inspect}, last_updated: #{@last_updated.inspect},"\
147
+ " started_at: #{@started_at.inspect}, stopped_at: #{@stopped_at.inspect}, session_state:"\
148
+ " #{@session_state.inspect}>"
149
+ end
133
150
  end
134
151
  end
@@ -9,7 +9,7 @@ module ShellEv
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Power Type used in this connector.
12
+ # TODO: Write general description for this method
13
13
  # @return [ElectricalPropertiesPowerTypeEnum]
14
14
  attr_accessor :power_type
15
15
 
@@ -75,5 +75,19 @@ module ShellEv
75
75
  amperage,
76
76
  max_electric_power)
77
77
  end
78
+
79
+ # Provides a human-readable string representation of the object.
80
+ def to_s
81
+ class_name = self.class.name.split('::').last
82
+ "<#{class_name} power_type: #{@power_type}, voltage: #{@voltage}, amperage: #{@amperage},"\
83
+ " max_electric_power: #{@max_electric_power}>"
84
+ end
85
+
86
+ # Provides a debugging-friendly string with detailed object information.
87
+ def inspect
88
+ class_name = self.class.name.split('::').last
89
+ "<#{class_name} power_type: #{@power_type.inspect}, voltage: #{@voltage.inspect}, amperage:"\
90
+ " #{@amperage.inspect}, max_electric_power: #{@max_electric_power.inspect}>"
91
+ end
78
92
  end
79
93
  end
@@ -134,5 +134,22 @@ module ShellEv
134
134
  deleted,
135
135
  physical_reference)
136
136
  end
137
+
138
+ # Provides a human-readable string representation of the object.
139
+ def to_s
140
+ class_name = self.class.name.split('::').last
141
+ "<#{class_name} uid: #{@uid}, external_id: #{@external_id}, evse_id: #{@evse_id}, status:"\
142
+ " #{@status}, connectors: #{@connectors}, authorization_methods: #{@authorization_methods},"\
143
+ " updated: #{@updated}, deleted: #{@deleted}, physical_reference: #{@physical_reference}>"
144
+ end
145
+
146
+ # Provides a debugging-friendly string with detailed object information.
147
+ def inspect
148
+ class_name = self.class.name.split('::').last
149
+ "<#{class_name} uid: #{@uid.inspect}, external_id: #{@external_id.inspect}, evse_id:"\
150
+ " #{@evse_id.inspect}, status: #{@status.inspect}, connectors: #{@connectors.inspect},"\
151
+ " authorization_methods: #{@authorization_methods.inspect}, updated: #{@updated.inspect},"\
152
+ " deleted: #{@deleted.inspect}, physical_reference: #{@physical_reference.inspect}>"
153
+ end
137
154
  end
138
155
  end
@@ -14,11 +14,13 @@ module ShellEv
14
14
  # @return [UUID | String]
15
15
  attr_accessor :request_id
16
16
 
17
- # Indicates overall status of the request
17
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
18
+ # responses. This will be played back in the response from the request.
18
19
  # @return [GetChargeSessionRetrieveResponse200JsonStatusEnum]
19
20
  attr_accessor :status
20
21
 
21
- # Indicates overall status of the request
22
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
23
+ # responses. This will be played back in the response from the request.
22
24
  # @return [Array[DataRetrieve]]
23
25
  attr_accessor :data
24
26
 
@@ -72,5 +74,18 @@ module ShellEv
72
74
  status,
73
75
  data)
74
76
  end
77
+
78
+ # Provides a human-readable string representation of the object.
79
+ def to_s
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}>"
82
+ end
83
+
84
+ # Provides a debugging-friendly string with detailed object information.
85
+ def inspect
86
+ class_name = self.class.name.split('::').last
87
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
88
+ " #{@data.inspect}>"
89
+ end
75
90
  end
76
91
  end
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # getEVLocationsAuthorizationMethods.
7
+ # Filter by Locations that support the given Authorization Methods
8
8
  class GetEVLocationsAuthorizationMethodsEnum
9
9
  GET_EV_LOCATIONS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # getEVLocationsConnectorTypes.
7
+ # Filter by Locations that have Connectors with the set of Connector Types
8
8
  class GetEVLocationsConnectorTypesEnum
9
9
  GET_EV_LOCATIONS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # getEVLocationsEvseStatus.
7
+ # Filter by Locations that have the given status
8
8
  class GetEVLocationsEvseStatusEnum
9
9
  GET_EV_LOCATIONS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE
@@ -14,11 +14,13 @@ module ShellEv
14
14
  # @return [UUID | String]
15
15
  attr_accessor :request_id
16
16
 
17
- # Indicates overall status of the request
18
- # @return [InlineResponse202StatusEnum]
17
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
18
+ # responses. This will be played back in the response from the request.
19
+ # @return [GetChargeSessionRetrieveResponse200JsonStatusEnum]
19
20
  attr_accessor :status
20
21
 
21
- # Indicates overall status of the request
22
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
23
+ # responses. This will be played back in the response from the request.
22
24
  # @return [Array[InlineResponse202Data]]
23
25
  attr_accessor :data
24
26
 
@@ -70,5 +72,18 @@ module ShellEv
70
72
  status,
71
73
  data)
72
74
  end
75
+
76
+ # Provides a human-readable string representation of the object.
77
+ def to_s
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}>"
80
+ end
81
+
82
+ # Provides a debugging-friendly string with detailed object information.
83
+ def inspect
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
86
+ " #{@data.inspect}>"
87
+ end
73
88
  end
74
89
  end
@@ -14,8 +14,9 @@ module ShellEv
14
14
  # @return [UUID | String]
15
15
  attr_accessor :request_id
16
16
 
17
- # Indicates overall status of the request
18
- # @return [InlineResponse2021StatusEnum]
17
+ # Mandatory UUID (according to RFC 4122 standards) for requests and
18
+ # responses. This will be played back in the response from the request.
19
+ # @return [GetChargeSessionRetrieveResponse200JsonStatusEnum]
19
20
  attr_accessor :status
20
21
 
21
22
  # A mapping from model property names to API property names.
@@ -53,5 +54,17 @@ module ShellEv
53
54
  InlineResponse2021.new(request_id,
54
55
  status)
55
56
  end
57
+
58
+ # Provides a human-readable string representation of the object.
59
+ def to_s
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}>"
62
+ end
63
+
64
+ # Provides a debugging-friendly string with detailed object information.
65
+ def inspect
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}>"
68
+ end
56
69
  end
57
70
  end
@@ -46,5 +46,17 @@ module ShellEv
46
46
  # Create object from extracted values.
47
47
  InlineResponse202Data.new(session_id)
48
48
  end
49
+
50
+ # Provides a human-readable string representation of the object.
51
+ def to_s
52
+ class_name = self.class.name.split('::').last
53
+ "<#{class_name} session_id: #{@session_id}>"
54
+ end
55
+
56
+ # Provides a debugging-friendly string with detailed object information.
57
+ def inspect
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} session_id: #{@session_id.inspect}>"
60
+ end
49
61
  end
50
62
  end
@@ -66,5 +66,18 @@ module ShellEv
66
66
  message,
67
67
  description)
68
68
  end
69
+
70
+ # Provides a human-readable string representation of the object.
71
+ def to_s
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} code: #{@code}, message: #{@message}, description: #{@description}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}, description:"\
80
+ " #{@description.inspect}>"
81
+ end
69
82
  end
70
83
  end
@@ -161,5 +161,24 @@ module ShellEv
161
161
  operator_comment,
162
162
  location_type)
163
163
  end
164
+
165
+ # Provides a human-readable string representation of the object.
166
+ def to_s
167
+ class_name = self.class.name.split('::').last
168
+ "<#{class_name} uid: #{@uid}, external_id: #{@external_id}, coordinates: #{@coordinates},"\
169
+ " operator_name: #{@operator_name}, address: #{@address}, accessibility: #{@accessibility},"\
170
+ " evses: #{@evses}, opening_hours: #{@opening_hours}, updated: #{@updated},"\
171
+ " operator_comment: #{@operator_comment}, location_type: #{@location_type}>"
172
+ end
173
+
174
+ # Provides a debugging-friendly string with detailed object information.
175
+ def inspect
176
+ class_name = self.class.name.split('::').last
177
+ "<#{class_name} uid: #{@uid.inspect}, external_id: #{@external_id.inspect}, coordinates:"\
178
+ " #{@coordinates.inspect}, operator_name: #{@operator_name.inspect}, address:"\
179
+ " #{@address.inspect}, accessibility: #{@accessibility.inspect}, evses: #{@evses.inspect},"\
180
+ " opening_hours: #{@opening_hours.inspect}, updated: #{@updated.inspect}, operator_comment:"\
181
+ " #{@operator_comment.inspect}, location_type: #{@location_type.inspect}>"
182
+ end
164
183
  end
165
184
  end
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # locationsMarkersAuthorizationMethods.
7
+ # Filter by Locations that support the given Authorization Methods
8
8
  class LocationsMarkersAuthorizationMethodsEnum
9
9
  LOCATIONS_MARKERS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # locationsMarkersConnectorTypes.
7
+ # Filter by Locations that have Connectors with the set of Connector Types
8
8
  class LocationsMarkersConnectorTypesEnum
9
9
  LOCATIONS_MARKERS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # locationsMarkersEvseStatus.
7
+ # Filter by Locations that have the given status
8
8
  class LocationsMarkersEvseStatusEnum
9
9
  LOCATIONS_MARKERS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE
@@ -118,5 +118,22 @@ module ShellEv
118
118
  APIHelper.valid_type?(value['markerType'],
119
119
  ->(val) { val.instance_of? String })
120
120
  end
121
+
122
+ # Provides a human-readable string representation of the object.
123
+ def to_s
124
+ class_name = self.class.name.split('::').last
125
+ "<#{class_name} marker_type: #{@marker_type}, unique_key: #{@unique_key}, coordinates:"\
126
+ " #{@coordinates}, location_count: #{@location_count}, evse_count: #{@evse_count},"\
127
+ " max_power: #{@max_power}, geo_hash: #{@geo_hash}>"
128
+ end
129
+
130
+ # Provides a debugging-friendly string with detailed object information.
131
+ def inspect
132
+ class_name = self.class.name.split('::').last
133
+ "<#{class_name} marker_type: #{@marker_type.inspect}, unique_key: #{@unique_key.inspect},"\
134
+ " coordinates: #{@coordinates.inspect}, location_count: #{@location_count.inspect},"\
135
+ " evse_count: #{@evse_count.inspect}, max_power: #{@max_power.inspect}, geo_hash:"\
136
+ " #{@geo_hash.inspect}>"
137
+ end
121
138
  end
122
139
  end
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # nearbyLocationsAuthorizationMethods.
7
+ # Filter by Locations that support the given Authorization Methods
8
8
  class NearbyLocationsAuthorizationMethodsEnum
9
9
  NEARBY_LOCATIONS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # nearbyLocationsConnectorTypes.
7
+ # Filter by Locations that have Connectors with these Connector Types
8
8
  class NearbyLocationsConnectorTypesEnum
9
9
  NEARBY_LOCATIONS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
@@ -4,7 +4,7 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # nearbyLocationsEvseStatus.
7
+ # Filter by Locations that have the given status
8
8
  class NearbyLocationsEvseStatusEnum
9
9
  NEARBY_LOCATIONS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE