ev-recharge-sdk 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -21
  3. data/lib/shell_ev/client.rb +12 -8
  4. data/lib/shell_ev/configuration.rb +70 -19
  5. data/lib/shell_ev/controllers/base_controller.rb +9 -9
  6. data/lib/shell_ev/controllers/charging_controller.rb +121 -154
  7. data/lib/shell_ev/controllers/locations_controller.rb +226 -142
  8. data/lib/shell_ev/controllers/o_auth_authorization_controller.rb +8 -8
  9. data/lib/shell_ev/exceptions/bad_request_exception.rb +33 -18
  10. data/lib/shell_ev/exceptions/{m405_error_response_error1_exception.rb → internal_server_error_exception.rb} +31 -26
  11. data/lib/shell_ev/exceptions/not_found_exception.rb +36 -19
  12. data/lib/shell_ev/exceptions/o_auth_provider_exception.rb +15 -15
  13. data/lib/shell_ev/exceptions/{m400_error_response_error1_exception.rb → serviceunavailable_exception.rb} +28 -28
  14. data/lib/shell_ev/exceptions/{m401_error_response_error1_exception.rb → too_many_requests_exception.rb} +28 -28
  15. data/lib/shell_ev/exceptions/unauthorized_exception.rb +32 -18
  16. data/lib/shell_ev/http/auth/o_auth2.rb +54 -10
  17. data/lib/shell_ev/models/accessibility.rb +1 -2
  18. data/lib/shell_ev/models/active_response200_json.rb +11 -13
  19. data/lib/shell_ev/models/address.rb +1 -3
  20. data/lib/shell_ev/models/bad_request_err_msg.rb +82 -0
  21. data/lib/shell_ev/models/{stop_charge_session_request_body_json.rb → charge_error.rb} +21 -10
  22. data/lib/shell_ev/models/charge_retrieve_state.rb +63 -0
  23. data/lib/shell_ev/models/chargesession_start_body.rb +7 -9
  24. data/lib/shell_ev/models/connector_vo.rb +4 -9
  25. data/lib/shell_ev/models/coordinates.rb +1 -2
  26. data/lib/shell_ev/models/data_active.rb +27 -45
  27. data/lib/shell_ev/models/data_retrieve.rb +31 -49
  28. data/lib/shell_ev/models/electrical_properties.rb +1 -3
  29. data/lib/shell_ev/models/evse_vo.rb +3 -8
  30. data/lib/shell_ev/models/get_charge_session_retrieve_response200_json.rb +11 -13
  31. data/lib/shell_ev/models/{get_markers_list_authorization_methods_enum.rb → get_ev_locations_authorization_methods_enum.rb} +4 -4
  32. data/lib/shell_ev/models/{get_markers_list_connector_types_enum.rb → get_ev_locations_connector_types_enum.rb} +4 -4
  33. data/lib/shell_ev/models/{get_markers_list_evse_status_enum.rb → get_ev_locations_evse_status_enum.rb} +4 -4
  34. data/lib/shell_ev/models/inline_response202.rb +9 -11
  35. data/lib/shell_ev/models/inline_response2021.rb +5 -6
  36. data/lib/shell_ev/models/inline_response202_data.rb +7 -5
  37. data/lib/shell_ev/models/internal_error_object.rb +70 -0
  38. data/lib/shell_ev/models/location_respone_object.rb +4 -11
  39. data/lib/shell_ev/models/{get_locations_list_authorization_methods_enum.rb → locations_markers_authorization_methods_enum.rb} +4 -4
  40. data/lib/shell_ev/models/{get_locations_list_connector_types_enum.rb → locations_markers_connector_types_enum.rb} +4 -4
  41. data/lib/shell_ev/models/{get_locations_list_evse_status_enum.rb → locations_markers_evse_status_enum.rb} +4 -4
  42. data/lib/shell_ev/models/multi_location_marker.rb +2 -6
  43. data/lib/shell_ev/models/{get_nearby_locations_authorization_methods_enum.rb → nearby_locations_authorization_methods_enum.rb} +4 -4
  44. data/lib/shell_ev/models/{get_nearby_locations_connector_types_enum.rb → nearby_locations_connector_types_enum.rb} +4 -4
  45. data/lib/shell_ev/models/{get_nearby_locations_evse_status_enum.rb → nearby_locations_evse_status_enum.rb} +4 -4
  46. data/lib/shell_ev/models/not_found_err_msg.rb +82 -0
  47. data/lib/shell_ev/models/o_auth_token.rb +2 -6
  48. data/lib/shell_ev/models/opening_hours_object.rb +1 -3
  49. data/lib/shell_ev/models/ratelimit_err_msg.rb +82 -0
  50. data/lib/shell_ev/models/response.rb +78 -0
  51. data/lib/shell_ev/models/serviceunavailable_err_msg.rb +82 -0
  52. data/lib/shell_ev/models/single_location_marker.rb +5 -11
  53. data/lib/shell_ev/models/single_location_marker_authorization_methods_items_enum.rb +1 -1
  54. data/lib/shell_ev/models/single_location_marker_response.rb +81 -0
  55. data/lib/shell_ev/models/tariff_vo.rb +3 -7
  56. data/lib/shell_ev/models/unauthorized_err_msg.rb +82 -0
  57. data/lib/shell_ev/utilities/file_wrapper.rb +9 -9
  58. data/lib/shell_ev/utilities/union_type_lookup.rb +3 -2
  59. data/lib/shell_ev.rb +40 -60
  60. data/test/controllers/controller_test_base.rb +0 -5
  61. data/test/controllers/test_charging_controller.rb +74 -17
  62. data/test/controllers/test_locations_controller.rb +65 -0
  63. metadata +31 -49
  64. data/lib/shell_ev/exceptions/http401_error_response_exception.rb +0 -52
  65. data/lib/shell_ev/exceptions/m404_error_response_error1_exception.rb +0 -53
  66. data/lib/shell_ev/exceptions/m429_error_response_error1_exception.rb +0 -52
  67. data/lib/shell_ev/exceptions/m500_error_response_error1_exception.rb +0 -52
  68. data/lib/shell_ev/exceptions/m503_error_response_error1_exception.rb +0 -52
  69. data/lib/shell_ev/models/data_active_session_code_enum.rb +0 -44
  70. data/lib/shell_ev/models/data_active_session_state_enum.rb +0 -35
  71. data/lib/shell_ev/models/data_retrieve_session_code_enum.rb +0 -44
  72. data/lib/shell_ev/models/data_retrieve_session_state_enum.rb +0 -35
  73. data/lib/shell_ev/models/env_enum.rb +0 -23
  74. data/lib/shell_ev/models/m400_error_response.rb +0 -78
  75. data/lib/shell_ev/models/m400_error_response_error.rb +0 -80
  76. data/lib/shell_ev/models/m401_error_response.rb +0 -78
  77. data/lib/shell_ev/models/m401_error_response_error.rb +0 -80
  78. data/lib/shell_ev/models/m404_error_response.rb +0 -79
  79. data/lib/shell_ev/models/m404_error_response_error.rb +0 -80
  80. data/lib/shell_ev/models/m405_error_response.rb +0 -78
  81. data/lib/shell_ev/models/m405_error_response_error.rb +0 -80
  82. data/lib/shell_ev/models/m429_error_response.rb +0 -78
  83. data/lib/shell_ev/models/m429_error_response_error.rb +0 -80
  84. data/lib/shell_ev/models/m500_error_response.rb +0 -78
  85. data/lib/shell_ev/models/m500_error_response_error.rb +0 -80
  86. data/lib/shell_ev/models/m503_error_response.rb +0 -78
  87. data/lib/shell_ev/models/m503_error_response_error.rb +0 -80
  88. data/lib/shell_ev/models/response_base_status_enum.rb +0 -26
  89. data/lib/shell_ev/models/response_error401_all_of1.rb +0 -57
  90. data/lib/shell_ev/models/response_error401_all_of1_errors_items.rb +0 -80
  91. data/lib/shell_ev/models/success_response.rb +0 -58
@@ -13,17 +13,14 @@ class ChargingControllerTests < ControllerTestBase
13
13
  @response_catcher = @controller.http_call_back
14
14
  end
15
15
 
16
- # This API initiates to start a session on a EVSE (Electric Vehicle Supply Equipement). When the EV Charge Card number and the unique EVSE ID on the location is provided, the session is initiated.
17
- #
18
- #Please note that this is an asynchronous request, the request will be passed on to the operator/platform to be processed further.
19
- #
20
- def test_start_charge_session
16
+ # This endpoint start the charging session for the user.
17
+ def test_start
21
18
  # Parameters for the API call
22
- request_id = 'eb621f45-a543-4d9a-a934-2f223b263c42'
19
+ request_id = '123e4567-e89b-12d3-a456-426614174000'
23
20
  body = nil
24
21
 
25
22
  # Perform the API call through the SDK function
26
- result = @controller.start_charge_session(request_id, body: body)
23
+ result = @controller.start(request_id, body: body)
27
24
 
28
25
  # Test response code
29
26
  assert_equal(200, @response_catcher.response.status_code)
@@ -37,21 +34,80 @@ class ChargingControllerTests < ControllerTestBase
37
34
  # Test whether the captured response is as we expected
38
35
  refute_nil(result)
39
36
  expected_body = JSON.parse(
40
- '{"RequestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","Status":"SUCCESS",'\
41
- '"Data":[{"SessionId":"c3e332f0-1bb2-4f50-a96b-e075bbb71e68"}]}'
37
+ '{"requestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","status":"SUCCESS",'\
38
+ '"data":[{"sessionId":"c3e332f0-1bb2-4f50-a96b-e075bbb71e68"}]}'
42
39
  )
43
40
  received_body = JSON.parse(@response_catcher.response.raw_body)
44
41
  assert(ComparisonHelper.match_body(expected_body, received_body))
45
42
  end
46
43
 
47
- # This API retrieves the list of active sessions for a given set of EMAIds
44
+ # Accepts a request to stop an active session when a valid session id is provided.
45
+ def test_stop
46
+ # Parameters for the API call
47
+ request_id = '123e4567-e89b-12d3-a456-426614174000'
48
+ session_id = 'c3e332f0-1bb2-4f50-a96b-e075bbb71e68'
49
+
50
+ # Perform the API call through the SDK function
51
+ result = @controller.stop(request_id, session_id)
52
+
53
+ # Test response code
54
+ assert_equal(200, @response_catcher.response.status_code)
55
+
56
+ # Test headers
57
+ expected_headers = {}
58
+ expected_headers['content-type'] = 'application/json'
59
+
60
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
61
+
62
+ # Test whether the captured response is as we expected
63
+ refute_nil(result)
64
+ expected_body = JSON.parse(
65
+ '{"requestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","status":"SUCCESS"}'
66
+ )
67
+ received_body = JSON.parse(@response_catcher.response.raw_body)
68
+ assert(ComparisonHelper.match_body(expected_body, received_body))
69
+ end
70
+
71
+ # This endpoint returns the details of the session if the session is found.
72
+ def test_get_charge_session_retrieve
73
+ # Parameters for the API call
74
+ request_id = '123e4567-e89b-12d3-a456-426614174000'
75
+ session_id = 'c3e332f0-1bb2-4f50-a96b-e075bbb71e68'
76
+
77
+ # Perform the API call through the SDK function
78
+ result = @controller.get_charge_session_retrieve(request_id, session_id)
79
+
80
+ # Test response code
81
+ assert_equal(200, @response_catcher.response.status_code)
82
+
83
+ # Test headers
84
+ expected_headers = {}
85
+ expected_headers['content-type'] = 'application/json'
86
+
87
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
88
+
89
+ # Test whether the captured response is as we expected
90
+ refute_nil(result)
91
+ expected_body = JSON.parse(
92
+ '{"requestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","status":"SUCCESS",'\
93
+ '"data":[{"id":"78b5d7a3-bdba-43d7-9851-1c84fcddb782","userId":"281482b6'\
94
+ '-2c9a-4fd1-b3ea-1928edb40ef9","emaId":"NL-TNM-C00122045-K","evseId":"NL'\
95
+ '*TNM*E02003451*0","lastUpdated":"2024-06-19T07:36:57.985998Z","startedA'\
96
+ 't":"2024-06-19T11:20:27Z","stoppedAt":"2014-06-19T12:20:27Z","sessionSt'\
97
+ 'ate":{"status":"Started"}}]}'
98
+ )
99
+ received_body = JSON.parse(@response_catcher.response.raw_body)
100
+ assert(ComparisonHelper.match_body(expected_body, received_body))
101
+ end
102
+
103
+ # Fetrches the active sessions for user.
48
104
  def test_active
49
105
  # Parameters for the API call
106
+ request_id = '123e4567-e89b-12d3-a456-426614174000'
50
107
  ema_id = 'NL-TNM-C0216599X-A'
51
- request_id = 'eb621f45-a543-4d9a-a934-2f223b263c42'
52
108
 
53
109
  # Perform the API call through the SDK function
54
- result = @controller.active(ema_id, request_id)
110
+ result = @controller.active(request_id, ema_id)
55
111
 
56
112
  # Test response code
57
113
  assert_equal(200, @response_catcher.response.status_code)
@@ -65,11 +121,12 @@ class ChargingControllerTests < ControllerTestBase
65
121
  # Test whether the captured response is as we expected
66
122
  refute_nil(result)
67
123
  expected_body = JSON.parse(
68
- '{"RequestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","Status":"SUCCESS",'\
69
- '"Data":[{"EmaId":"NL-TNM-C0216599X-A","EvseId":"NL*TNM*EVIRTUALCP0002*0'\
70
- '","Id":"260f17a9-52d4-4b40-ae74-83832b538975","StartedAt":"2022-10-21T0'\
71
- '9:11:23.455Z","SessionState":"started","SessionCode":null,"SessionMessa'\
72
- 'ge":null,"UserId":"96f69b3b-8ad4-487a-baaa-f1d3db741e88"}]}'
124
+ '{"requestId":"9d2dee33-7803-485a-a2b1-2c7538e597ee","status":"SUCCESS",'\
125
+ '"data":[{"id":"78b5d7a3-bdba-43d7-9851-1c84fcddb782","userId":"281482b6'\
126
+ '-2c9a-4fd1-b3ea-1928edb40ef9","emaId":"NL-TNM-C00122045-K","evseId":"NL'\
127
+ '*TNM*E02003451*0","startedAt":"2015-08-19T11:20:27Z","stoppedAt":"2015-'\
128
+ '08-19T11:20:27Z","SessionState":{"status":"Started"},"lastUpdated":"202'\
129
+ '4-07-17T07:36:57.985998Z"}]}'
73
130
  )
74
131
  received_body = JSON.parse(@response_catcher.response.raw_body)
75
132
  assert(ComparisonHelper.match_body(expected_body, received_body))
@@ -0,0 +1,65 @@
1
+ # shell_ev
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ require_relative 'controller_test_base'
7
+
8
+ class LocationsControllerTests < ControllerTestBase
9
+ # Called only once for the class before any test has executed
10
+ def setup
11
+ setup_class
12
+ @controller = @client.locations
13
+ @response_catcher = @controller.http_call_back
14
+ end
15
+
16
+ # This API provides the list of all Shell Recharge locations. The list includes all Shell Recharge network and all locations available through our roaming partners. The end point provides flexible search criteria in order to get the list of Shell Recharge Network. The end point provides the details such as the exact location/address of the site along with the up-to-date status information of all the charging units in the site.
17
+ #
18
+ #Supported Search Options
19
+ #
20
+ #* Based on status of the Charging units. Eg : Available or Occupied
21
+ #* Based on available connector types.
22
+ #* Based on minimum Power output (in kW) available
23
+ #* Based on a specific charging unit ID (EVSE ID)
24
+ def test_get_ev_locations
25
+ # Parameters for the API call
26
+ request_id = '123e4567-e89b-12d3-a456-426614174000'
27
+ evse_status = nil
28
+ connector_types = nil
29
+ connector_min_power = nil
30
+ authorization_methods = nil
31
+ with_operator_name = nil
32
+ evse_id = 'NL*TNM*E01000401*0'
33
+ location_external_id = nil
34
+ evse_external_id = nil
35
+ page_number = nil
36
+ per_page = nil
37
+ updated_since = nil
38
+ country = APIHelper.json_deserialize(
39
+ '["NED"]', false)
40
+ exclude_country = APIHelper.json_deserialize(
41
+ '["NED"]', false)
42
+
43
+ # Perform the API call through the SDK function
44
+ result = @controller.get_ev_locations(
45
+ request_id, evse_status: evse_status, connector_types: connector_types,
46
+ connector_min_power: connector_min_power,
47
+ authorization_methods: authorization_methods,
48
+ with_operator_name: with_operator_name, evse_id: evse_id,
49
+ location_external_id: location_external_id,
50
+ evse_external_id: evse_external_id, page_number: page_number,
51
+ per_page: per_page, updated_since: updated_since, country: country,
52
+ exclude_country: exclude_country
53
+ )
54
+
55
+ # Test response code
56
+ assert_equal(200, @response_catcher.response.status_code)
57
+
58
+ # Test headers
59
+ expected_headers = {}
60
+ expected_headers['content-type'] = 'application/json'
61
+
62
+ assert(ComparisonHelper.match_headers(expected_headers, @response_catcher.response.headers))
63
+ end
64
+
65
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ev-recharge-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - developer sdksio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-28 00:00:00.000000000 Z
11
+ date: 2024-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: apimatic_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.3.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.3.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: apimatic_faraday_client_adapter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.0
47
+ version: 0.1.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.0
54
+ version: 0.1.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -107,16 +107,11 @@ files:
107
107
  - lib/shell_ev/controllers/o_auth_authorization_controller.rb
108
108
  - lib/shell_ev/exceptions/api_exception.rb
109
109
  - lib/shell_ev/exceptions/bad_request_exception.rb
110
- - lib/shell_ev/exceptions/http401_error_response_exception.rb
111
- - lib/shell_ev/exceptions/m400_error_response_error1_exception.rb
112
- - lib/shell_ev/exceptions/m401_error_response_error1_exception.rb
113
- - lib/shell_ev/exceptions/m404_error_response_error1_exception.rb
114
- - lib/shell_ev/exceptions/m405_error_response_error1_exception.rb
115
- - lib/shell_ev/exceptions/m429_error_response_error1_exception.rb
116
- - lib/shell_ev/exceptions/m500_error_response_error1_exception.rb
117
- - lib/shell_ev/exceptions/m503_error_response_error1_exception.rb
110
+ - lib/shell_ev/exceptions/internal_server_error_exception.rb
118
111
  - lib/shell_ev/exceptions/not_found_exception.rb
119
112
  - lib/shell_ev/exceptions/o_auth_provider_exception.rb
113
+ - lib/shell_ev/exceptions/serviceunavailable_exception.rb
114
+ - lib/shell_ev/exceptions/too_many_requests_exception.rb
120
115
  - lib/shell_ev/exceptions/unauthorized_exception.rb
121
116
  - lib/shell_ev/http/auth/o_auth2.rb
122
117
  - lib/shell_ev/http/http_call_back.rb
@@ -128,75 +123,62 @@ files:
128
123
  - lib/shell_ev/models/active_response200_json.rb
129
124
  - lib/shell_ev/models/active_response200_json_status_enum.rb
130
125
  - lib/shell_ev/models/address.rb
126
+ - lib/shell_ev/models/bad_request_err_msg.rb
131
127
  - lib/shell_ev/models/base_model.rb
128
+ - lib/shell_ev/models/charge_error.rb
129
+ - lib/shell_ev/models/charge_retrieve_state.rb
132
130
  - lib/shell_ev/models/chargesession_start_body.rb
133
131
  - lib/shell_ev/models/connector_vo.rb
134
132
  - lib/shell_ev/models/connector_vo_connector_type_enum.rb
135
133
  - lib/shell_ev/models/connector_vo_updated_by_enum.rb
136
134
  - lib/shell_ev/models/coordinates.rb
137
135
  - lib/shell_ev/models/data_active.rb
138
- - lib/shell_ev/models/data_active_session_code_enum.rb
139
- - lib/shell_ev/models/data_active_session_state_enum.rb
140
136
  - lib/shell_ev/models/data_retrieve.rb
141
- - lib/shell_ev/models/data_retrieve_session_code_enum.rb
142
- - lib/shell_ev/models/data_retrieve_session_state_enum.rb
143
137
  - lib/shell_ev/models/electrical_properties.rb
144
138
  - lib/shell_ev/models/electrical_properties_power_type_enum.rb
145
- - lib/shell_ev/models/env_enum.rb
146
139
  - lib/shell_ev/models/evse_vo.rb
147
140
  - lib/shell_ev/models/evse_vo_authorization_methods_enum.rb
148
141
  - lib/shell_ev/models/evse_vo_status_enum.rb
149
142
  - lib/shell_ev/models/get_charge_session_retrieve_response200_json.rb
150
143
  - lib/shell_ev/models/get_charge_session_retrieve_response200_json_status_enum.rb
151
- - lib/shell_ev/models/get_locations_list_authorization_methods_enum.rb
152
- - lib/shell_ev/models/get_locations_list_connector_types_enum.rb
153
- - lib/shell_ev/models/get_locations_list_evse_status_enum.rb
154
- - lib/shell_ev/models/get_markers_list_authorization_methods_enum.rb
155
- - lib/shell_ev/models/get_markers_list_connector_types_enum.rb
156
- - lib/shell_ev/models/get_markers_list_evse_status_enum.rb
157
- - lib/shell_ev/models/get_nearby_locations_authorization_methods_enum.rb
158
- - lib/shell_ev/models/get_nearby_locations_connector_types_enum.rb
159
- - lib/shell_ev/models/get_nearby_locations_evse_status_enum.rb
144
+ - lib/shell_ev/models/get_ev_locations_authorization_methods_enum.rb
145
+ - lib/shell_ev/models/get_ev_locations_connector_types_enum.rb
146
+ - lib/shell_ev/models/get_ev_locations_evse_status_enum.rb
160
147
  - lib/shell_ev/models/inline_response202.rb
161
148
  - lib/shell_ev/models/inline_response2021.rb
162
149
  - lib/shell_ev/models/inline_response2021_status_enum.rb
163
150
  - lib/shell_ev/models/inline_response202_data.rb
164
151
  - lib/shell_ev/models/inline_response202_status_enum.rb
152
+ - lib/shell_ev/models/internal_error_object.rb
165
153
  - lib/shell_ev/models/location_respone_object.rb
166
- - lib/shell_ev/models/m400_error_response.rb
167
- - lib/shell_ev/models/m400_error_response_error.rb
168
- - lib/shell_ev/models/m401_error_response.rb
169
- - lib/shell_ev/models/m401_error_response_error.rb
170
- - lib/shell_ev/models/m404_error_response.rb
171
- - lib/shell_ev/models/m404_error_response_error.rb
172
- - lib/shell_ev/models/m405_error_response.rb
173
- - lib/shell_ev/models/m405_error_response_error.rb
174
- - lib/shell_ev/models/m429_error_response.rb
175
- - lib/shell_ev/models/m429_error_response_error.rb
176
- - lib/shell_ev/models/m500_error_response.rb
177
- - lib/shell_ev/models/m500_error_response_error.rb
178
- - lib/shell_ev/models/m503_error_response.rb
179
- - lib/shell_ev/models/m503_error_response_error.rb
154
+ - lib/shell_ev/models/locations_markers_authorization_methods_enum.rb
155
+ - lib/shell_ev/models/locations_markers_connector_types_enum.rb
156
+ - lib/shell_ev/models/locations_markers_evse_status_enum.rb
180
157
  - lib/shell_ev/models/multi_location_marker.rb
158
+ - lib/shell_ev/models/nearby_locations_authorization_methods_enum.rb
159
+ - lib/shell_ev/models/nearby_locations_connector_types_enum.rb
160
+ - lib/shell_ev/models/nearby_locations_evse_status_enum.rb
161
+ - lib/shell_ev/models/not_found_err_msg.rb
181
162
  - lib/shell_ev/models/o_auth_provider_error_enum.rb
182
163
  - lib/shell_ev/models/o_auth_token.rb
183
164
  - lib/shell_ev/models/opening_hours_object.rb
184
165
  - lib/shell_ev/models/opening_hours_object_week_day_enum.rb
185
- - lib/shell_ev/models/response_base_status_enum.rb
186
- - lib/shell_ev/models/response_error401_all_of1.rb
187
- - lib/shell_ev/models/response_error401_all_of1_errors_items.rb
166
+ - lib/shell_ev/models/ratelimit_err_msg.rb
167
+ - lib/shell_ev/models/response.rb
168
+ - lib/shell_ev/models/serviceunavailable_err_msg.rb
188
169
  - lib/shell_ev/models/single_location_marker.rb
189
170
  - lib/shell_ev/models/single_location_marker_authorization_methods_items_enum.rb
171
+ - lib/shell_ev/models/single_location_marker_response.rb
190
172
  - lib/shell_ev/models/single_location_marker_status_enum.rb
191
- - lib/shell_ev/models/stop_charge_session_request_body_json.rb
192
- - lib/shell_ev/models/success_response.rb
193
173
  - lib/shell_ev/models/tariff_vo.rb
194
174
  - lib/shell_ev/models/tariff_vo_updated_by_enum.rb
175
+ - lib/shell_ev/models/unauthorized_err_msg.rb
195
176
  - lib/shell_ev/utilities/date_time_helper.rb
196
177
  - lib/shell_ev/utilities/file_wrapper.rb
197
178
  - lib/shell_ev/utilities/union_type_lookup.rb
198
179
  - test/controllers/controller_test_base.rb
199
180
  - test/controllers/test_charging_controller.rb
181
+ - test/controllers/test_locations_controller.rb
200
182
  - test/http_response_catcher.rb
201
183
  homepage: https://www.shell.com/
202
184
  licenses:
@@ -1,52 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # HTTP 401 Error Response class.
8
- class HTTP401ErrorResponseException < APIException
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # A unique request id in GUID format. The value is written to the Shell API
13
- # Platform audit log for end to end traceability of a request.
14
- # @return [String]
15
- attr_accessor :request_id
16
-
17
- # Indicates overall status of the request
18
- # @return [ResponseBaseStatusEnum]
19
- attr_accessor :status
20
-
21
- # Details of error(s) encountered
22
- # @return [Array[ResponseError401AllOf1ErrorsItems]]
23
- attr_accessor :errors
24
-
25
- # The constructor.
26
- # @param [String] The reason for raising an exception.
27
- # @param [HttpResponse] The HttpReponse of the API call.
28
- def initialize(reason, response)
29
- super(reason, response)
30
- hash = APIHelper.json_deserialize(@response.raw_body)
31
- unbox(hash)
32
- end
33
-
34
- # Populates this object by extracting properties from a hash.
35
- # @param [Hash] The deserialized response sent by the server in the
36
- # response body.
37
- def unbox(hash)
38
- @request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
39
- @status = hash.key?('Status') ? hash['Status'] : nil
40
- # Parameter is an array, so we need to iterate through it
41
- @errors = nil
42
- unless hash['Errors'].nil?
43
- @errors = []
44
- hash['Errors'].each do |structure|
45
- @errors << (ResponseError401AllOf1ErrorsItems.from_hash(structure) if structure)
46
- end
47
- end
48
-
49
- @errors = nil unless hash.key?('Errors')
50
- end
51
- end
52
- end
@@ -1,53 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # Invalid charge token with given EmaId was not found. Backend HTTP 410 should
8
- # be transformed to 404.
9
- class M404ErrorResponseError1Exception < APIException
10
- SKIP = Object.new
11
- private_constant :SKIP
12
-
13
- # Mandatory UUID (according to RFC 4122 standards) for requests and
14
- # responses. This will be played back in the response from the request.
15
- # @return [String]
16
- attr_accessor :request_id
17
-
18
- # Indicates overall status of the request
19
- # @return [String]
20
- attr_accessor :status
21
-
22
- # Indicates overall status of the request
23
- # @return [Array[M404ErrorResponseError]]
24
- attr_accessor :errors
25
-
26
- # The constructor.
27
- # @param [String] The reason for raising an exception.
28
- # @param [HttpResponse] The HttpReponse of the API call.
29
- def initialize(reason, response)
30
- super(reason, response)
31
- hash = APIHelper.json_deserialize(@response.raw_body)
32
- unbox(hash)
33
- end
34
-
35
- # Populates this object by extracting properties from a hash.
36
- # @param [Hash] The deserialized response sent by the server in the
37
- # response body.
38
- def unbox(hash)
39
- @request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
40
- @status = hash.key?('Status') ? hash['Status'] : nil
41
- # Parameter is an array, so we need to iterate through it
42
- @errors = nil
43
- unless hash['Errors'].nil?
44
- @errors = []
45
- hash['Errors'].each do |structure|
46
- @errors << (M404ErrorResponseError.from_hash(structure) if structure)
47
- end
48
- end
49
-
50
- @errors = SKIP unless hash.key?('Errors')
51
- end
52
- end
53
- end
@@ -1,52 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # Too Many Requests
8
- class M429ErrorResponseError1Exception < APIException
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # Mandatory UUID (according to RFC 4122 standards) for requests and
13
- # responses. This will be played back in the response from the request.
14
- # @return [String]
15
- attr_accessor :request_id
16
-
17
- # Indicates overall status of the request
18
- # @return [String]
19
- attr_accessor :status
20
-
21
- # Indicates overall status of the request
22
- # @return [Array[M429ErrorResponseError]]
23
- attr_accessor :errors
24
-
25
- # The constructor.
26
- # @param [String] The reason for raising an exception.
27
- # @param [HttpResponse] The HttpReponse of the API call.
28
- def initialize(reason, response)
29
- super(reason, response)
30
- hash = APIHelper.json_deserialize(@response.raw_body)
31
- unbox(hash)
32
- end
33
-
34
- # Populates this object by extracting properties from a hash.
35
- # @param [Hash] The deserialized response sent by the server in the
36
- # response body.
37
- def unbox(hash)
38
- @request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
39
- @status = hash.key?('Status') ? hash['Status'] : nil
40
- # Parameter is an array, so we need to iterate through it
41
- @errors = nil
42
- unless hash['Errors'].nil?
43
- @errors = []
44
- hash['Errors'].each do |structure|
45
- @errors << (M429ErrorResponseError.from_hash(structure) if structure)
46
- end
47
- end
48
-
49
- @errors = SKIP unless hash.key?('Errors')
50
- end
51
- end
52
- end
@@ -1,52 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # 500ErrorResponse_Error1 class.
8
- class M500ErrorResponseError1Exception < APIException
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # Mandatory UUID (according to RFC 4122 standards) for requests and
13
- # responses. This will be played back in the response from the request.
14
- # @return [String]
15
- attr_accessor :request_id
16
-
17
- # Indicates overall status of the request
18
- # @return [String]
19
- attr_accessor :status
20
-
21
- # Indicates overall status of the request
22
- # @return [Array[M500ErrorResponseError]]
23
- attr_accessor :errors
24
-
25
- # The constructor.
26
- # @param [String] The reason for raising an exception.
27
- # @param [HttpResponse] The HttpReponse of the API call.
28
- def initialize(reason, response)
29
- super(reason, response)
30
- hash = APIHelper.json_deserialize(@response.raw_body)
31
- unbox(hash)
32
- end
33
-
34
- # Populates this object by extracting properties from a hash.
35
- # @param [Hash] The deserialized response sent by the server in the
36
- # response body.
37
- def unbox(hash)
38
- @request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
39
- @status = hash.key?('Status') ? hash['Status'] : nil
40
- # Parameter is an array, so we need to iterate through it
41
- @errors = nil
42
- unless hash['Errors'].nil?
43
- @errors = []
44
- hash['Errors'].each do |structure|
45
- @errors << (M500ErrorResponseError.from_hash(structure) if structure)
46
- end
47
- end
48
-
49
- @errors = SKIP unless hash.key?('Errors')
50
- end
51
- end
52
- end
@@ -1,52 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # 503ErrorResponse_Error1 class.
8
- class M503ErrorResponseError1Exception < APIException
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # Mandatory UUID (according to RFC 4122 standards) for requests and
13
- # responses. This will be played back in the response from the request.
14
- # @return [String]
15
- attr_accessor :request_id
16
-
17
- # Indicates overall status of the request
18
- # @return [String]
19
- attr_accessor :status
20
-
21
- # Indicates overall status of the request
22
- # @return [Array[M503ErrorResponseError]]
23
- attr_accessor :errors
24
-
25
- # The constructor.
26
- # @param [String] The reason for raising an exception.
27
- # @param [HttpResponse] The HttpReponse of the API call.
28
- def initialize(reason, response)
29
- super(reason, response)
30
- hash = APIHelper.json_deserialize(@response.raw_body)
31
- unbox(hash)
32
- end
33
-
34
- # Populates this object by extracting properties from a hash.
35
- # @param [Hash] The deserialized response sent by the server in the
36
- # response body.
37
- def unbox(hash)
38
- @request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
39
- @status = hash.key?('Status') ? hash['Status'] : nil
40
- # Parameter is an array, so we need to iterate through it
41
- @errors = nil
42
- unless hash['Errors'].nil?
43
- @errors = []
44
- hash['Errors'].each do |structure|
45
- @errors << (M503ErrorResponseError.from_hash(structure) if structure)
46
- end
47
- end
48
-
49
- @errors = SKIP unless hash.key?('Errors')
50
- end
51
- end
52
- end