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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3581a5328737a93ee89d58d621cd5b0cd8ab33f77a8940b52e7a5992e96c17ae
4
- data.tar.gz: d6397da21ac9a71c372605d673fcf9f4afddf119405becae51a32228fdf4cb50
3
+ metadata.gz: 5f958a760fdf4430c7366b744e7c56aace6ed34cf48f6ee7a06d938cf947c7dd
4
+ data.tar.gz: b8f570f5c8bbe7f0f2dc577867d8f43c59362717015a9ca56f779129efd0254b
5
5
  SHA512:
6
- metadata.gz: 3b459aa49f87f0aef6aa7d6aad385b8488718c06c3b69f1d6950e4732a71d454d3649fa80f7fd89ebe72ddff63c84adc5b4b410dba9dc4585e6753f662eabe6c
7
- data.tar.gz: a484563a4340d88c652cfbaf24ba62ad4c875e501ccabccc7cce407e68574f1d335681bb62397adf75c5a1bda963443fc065e8c810d30218b5ea3a9779a8ed5a
6
+ metadata.gz: ec2964929d7df347bb30519395f465e3b1336acfb5967b5d57e97f237e7544613ffa579bcdc0204a4c43158049652f533de9b7db62ffbcb1ed39ce5118399835
7
+ data.tar.gz: 429bffca3aacd25c25ab4a8ed87bc1c6b56007c36e78c25290ce62b01277e021b5200a66b25934e37263944aed23c294a98e6eff8b7859cffa26ea257c05c448
data/LICENSE CHANGED
@@ -3,7 +3,7 @@ License:
3
3
  The MIT License (MIT)
4
4
  http://opensource.org/licenses/MIT
5
5
 
6
- Copyright (c) 2014 - 2024 APIMATIC Limited
6
+ Copyright (c) 2014 - 2025 APIMATIC Limited
7
7
 
8
8
  Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -27,17 +27,17 @@ Go to the Shell Developer Portal: [https://developer.shell.com](https://develope
27
27
 
28
28
  Install the gem from the command line:
29
29
 
30
- ```ruby
31
- gem install ev-recharge-sdk -v 1.2.0
30
+ ```bash
31
+ gem install ev-recharge-sdk -v 1.4.0
32
32
  ```
33
33
 
34
34
  Or add the gem to your Gemfile and run `bundle`:
35
35
 
36
36
  ```ruby
37
- gem 'ev-recharge-sdk', '1.2.0'
37
+ gem 'ev-recharge-sdk', '1.4.0'
38
38
  ```
39
39
 
40
- For additional gem details, see the [RubyGems page for the ev-recharge-sdk gem](https://rubygems.org/gems/ev-recharge-sdk/versions/1.2.0).
40
+ For additional gem details, see the [RubyGems page for the ev-recharge-sdk gem](https://rubygems.org/gems/ev-recharge-sdk/versions/1.4.0).
41
41
 
42
42
  ## Test the SDK
43
43
 
@@ -49,7 +49,7 @@ rake
49
49
 
50
50
  ## Initialize the API Client
51
51
 
52
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/client.md)
52
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/client.md)
53
53
 
54
54
  The following parameters are configurable for the API Client:
55
55
 
@@ -65,7 +65,7 @@ The following parameters are configurable for the API Client:
65
65
  | `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
66
66
  | `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
67
67
  | `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
68
- | `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/$a/https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
68
+ | `client_credentials_auth_credentials` | [`ClientCredentialsAuthCredentials`](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
69
69
 
70
70
  The API client can be initialized as follows:
71
71
 
@@ -87,23 +87,23 @@ The SDK can be configured to use a different environment for making API calls. A
87
87
 
88
88
  | Name | Description |
89
89
  | --- | --- |
90
- | production | **Default** Production |
91
- | environment2 | Test |
90
+ | production | **Default** Production Server |
91
+ | environment2 | Test Server |
92
92
 
93
93
  ## Authorization
94
94
 
95
95
  This API uses the following authentication schemes.
96
96
 
97
- * [`BearerAuth (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/$a/https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/oauth-2-client-credentials-grant.md)
97
+ * [`BearerAuth (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/auth/oauth-2-client-credentials-grant.md)
98
98
 
99
99
  ## List of APIs
100
100
 
101
- * [Locations](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/controllers/locations.md)
102
- * [Charging](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/controllers/charging.md)
101
+ * [Locations](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/controllers/locations.md)
102
+ * [Charging](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/controllers/charging.md)
103
103
 
104
104
  ## Classes Documentation
105
105
 
106
- * [Utility Classes](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/utility-classes.md)
107
- * [HttpResponse](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/http-response.md)
108
- * [HttpRequest](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.2.0/doc/http-request.md)
106
+ * [Utility Classes](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/utility-classes.md)
107
+ * [HttpResponse](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/http-response.md)
108
+ * [HttpRequest](https://www.github.com/sdks-io/ev-recharge-ruby-sdk/tree/1.4.0/doc/http-request.md)
109
109
 
@@ -6,8 +6,8 @@
6
6
  module ShellEv
7
7
  # An enum for SDK environments.
8
8
  class Environment
9
- # PRODUCTION: Production
10
- # ENVIRONMENT2: Test
9
+ # PRODUCTION: Production Server
10
+ # ENVIRONMENT2: Test Server
11
11
  ENVIRONMENT = [
12
12
  PRODUCTION = 'production'.freeze,
13
13
  ENVIRONMENT2 = 'environment2'.freeze
@@ -17,7 +17,8 @@ module ShellEv
17
17
  # An enum for API servers.
18
18
  class Server
19
19
  SERVER = [
20
- DEFAULT = 'default'.freeze
20
+ DEFAULT = 'default'.freeze,
21
+ ACCESS_TOKEN_SERVER = 'access token server'.freeze
21
22
  ].freeze
22
23
  end
23
24
 
@@ -143,10 +144,12 @@ module ShellEv
143
144
  # All the environments the SDK can run in.
144
145
  ENVIRONMENTS = {
145
146
  Environment::PRODUCTION => {
146
- Server::DEFAULT => 'https://api.shell.com'
147
+ Server::DEFAULT => 'https://api.shell.com/ev/v1',
148
+ Server::ACCESS_TOKEN_SERVER => 'https://api.shell.com/v2/oauth'
147
149
  },
148
150
  Environment::ENVIRONMENT2 => {
149
- Server::DEFAULT => 'https://api-test.shell.com'
151
+ Server::DEFAULT => 'https://api-test.shell.com/ev/v1',
152
+ Server::ACCESS_TOKEN_SERVER => 'https://api.shell.com/v2/oauth'
150
153
  }
151
154
  }.freeze
152
155
 
@@ -15,12 +15,12 @@ module ShellEv
15
15
  # 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4
16
16
  # hyphens) <br>
17
17
  # @param [ChargesessionStartBody] body Optional parameter: Example:
18
- # @return [InlineResponse202] response from the API call
18
+ # @return [InlineResponse202] response from the API call.
19
19
  def start(request_id,
20
20
  body: nil)
21
21
  new_api_call_builder
22
22
  .request(new_request_builder(HttpMethodEnum::POST,
23
- '/ev/v1/charge-session/start',
23
+ '/charge-session/start',
24
24
  Server::DEFAULT)
25
25
  .header_param(new_parameter(request_id, key: 'RequestId'))
26
26
  .header_param(new_parameter('application/json', key: 'Content-Type'))
@@ -66,12 +66,12 @@ module ShellEv
66
66
  # 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4
67
67
  # hyphens) <br>
68
68
  # @param [String] session_id Required parameter: Session Id
69
- # @return [InlineResponse2021] response from the API call
69
+ # @return [InlineResponse2021] response from the API call.
70
70
  def stop(request_id,
71
71
  session_id)
72
72
  new_api_call_builder
73
73
  .request(new_request_builder(HttpMethodEnum::POST,
74
- '/ev/v1/charge-session/stop',
74
+ '/charge-session/stop',
75
75
  Server::DEFAULT)
76
76
  .header_param(new_parameter(request_id, key: 'RequestId'))
77
77
  .query_param(new_parameter(session_id, key: 'sessionId'))
@@ -114,12 +114,12 @@ module ShellEv
114
114
  # 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4
115
115
  # hyphens) <br>
116
116
  # @param [String] session_id Required parameter: Session Id
117
- # @return [GetChargeSessionRetrieveResponse200Json] response from the API call
117
+ # @return [GetChargeSessionRetrieveResponse200Json] response from the API call.
118
118
  def get_charge_session_retrieve(request_id,
119
119
  session_id)
120
120
  new_api_call_builder
121
121
  .request(new_request_builder(HttpMethodEnum::GET,
122
- '/ev/v1/charge-session/retrieve',
122
+ '/charge-session/retrieve',
123
123
  Server::DEFAULT)
124
124
  .header_param(new_parameter(request_id, key: 'RequestId'))
125
125
  .query_param(new_parameter(session_id, key: 'sessionId'))
@@ -163,12 +163,12 @@ module ShellEv
163
163
  # hyphens) <br>
164
164
  # @param [String] ema_id Required parameter: Emobility Account
165
165
  # Identifier(Ema-ID)
166
- # @return [ActiveResponse200Json] response from the API call
166
+ # @return [ActiveResponse200Json] response from the API call.
167
167
  def active(request_id,
168
168
  ema_id)
169
169
  new_api_call_builder
170
170
  .request(new_request_builder(HttpMethodEnum::GET,
171
- '/ev/v1/charge-session/active',
171
+ '/charge-session/active',
172
172
  Server::DEFAULT)
173
173
  .header_param(new_parameter(request_id, key: 'RequestId'))
174
174
  .query_param(new_parameter(ema_id, key: 'emaId'))
@@ -57,7 +57,7 @@ module ShellEv
57
57
  # @param [Array[String]] exclude_country Optional parameter: Filter by
58
58
  # Locations that are not in one of the given countries (specified using ISO
59
59
  # 3166-1 alpha-3 codes)
60
- # @return [Response] response from the API call
60
+ # @return [Response] response from the API call.
61
61
  def get_ev_locations(request_id,
62
62
  evse_status: nil,
63
63
  connector_types: nil,
@@ -74,7 +74,7 @@ module ShellEv
74
74
  exclude_country: nil)
75
75
  new_api_call_builder
76
76
  .request(new_request_builder(HttpMethodEnum::GET,
77
- '/locations/v1/ev',
77
+ '/locations',
78
78
  Server::DEFAULT)
79
79
  .header_param(new_parameter(request_id, key: 'RequestId'))
80
80
  .query_param(new_parameter(evse_status, key: 'evseStatus'))
@@ -137,14 +137,14 @@ module ShellEv
137
137
  # wish to see locations and tariffs for
138
138
  # @param [String] since Optional parameter: to get the locations modified
139
139
  # after a date
140
- # @return [Response] response from the API call
140
+ # @return [Response] response from the API call.
141
141
  def ev_locations_by_id(request_id,
142
142
  id,
143
143
  provider_id: nil,
144
144
  since: nil)
145
145
  new_api_call_builder
146
146
  .request(new_request_builder(HttpMethodEnum::GET,
147
- '/locations/v1/ev/{id}',
147
+ '/locations/{id}',
148
148
  Server::DEFAULT)
149
149
  .header_param(new_parameter(request_id, key: 'RequestId'))
150
150
  .template_param(new_parameter(id, key: 'id')
@@ -216,14 +216,14 @@ module ShellEv
216
216
  # given by the Operator, unique for that Operator
217
217
  # @param [String] operator_name Optional parameter: Filter by Locations that
218
218
  # have the given operator
219
- # @param [NearbyLocationsEvseStatusEnum] evse_status Optional parameter:
219
+ # @param [GetEVLocationsEvseStatusEnum] evse_status Optional parameter:
220
220
  # Filter by Locations that have the given status
221
221
  # @param [NearbyLocationsConnectorTypesEnum] connector_types Optional
222
222
  # parameter: Filter by Locations that have Connectors with these Connector
223
223
  # Types
224
224
  # @param [Float] connector_min_power Optional parameter: Filter by Locations
225
225
  # that have a Connector with at least this power output (in kW)
226
- # @param [NearbyLocationsAuthorizationMethodsEnum] authorization_methods
226
+ # @param [GetEVLocationsAuthorizationMethodsEnum] authorization_methods
227
227
  # Optional parameter: Filter by Locations that support the given
228
228
  # Authorization Methods
229
229
  # @param [TrueClass | FalseClass] with_operator_name Optional parameter:
@@ -238,7 +238,7 @@ module ShellEv
238
238
  # @param [Array[String]] exclude_country Optional parameter: Filter by
239
239
  # Locations that are not in one of the given countries (specified using ISO
240
240
  # 3166-1 alpha-3 codes)
241
- # @return [Response] response from the API call
241
+ # @return [Response] response from the API call.
242
242
  def nearby_locations(request_id,
243
243
  latitude,
244
244
  longitude,
@@ -257,7 +257,7 @@ module ShellEv
257
257
  exclude_country: nil)
258
258
  new_api_call_builder
259
259
  .request(new_request_builder(HttpMethodEnum::GET,
260
- '/locations/v1/ev/nearby',
260
+ '/locations/nearby',
261
261
  Server::DEFAULT)
262
262
  .header_param(new_parameter(request_id, key: 'RequestId'))
263
263
  .query_param(new_parameter(latitude, key: 'latitude'))
@@ -330,14 +330,14 @@ module ShellEv
330
330
  # get the Shell Recharge Locations
331
331
  # @param [String] zoom Required parameter: Zoom level to show ex: (1: World,
332
332
  # 5: Landmass/continent, 10: City, 15: Streets, 20: Buildings)
333
- # @param [LocationsMarkersEvseStatusEnum] evse_status Optional parameter:
333
+ # @param [GetEVLocationsEvseStatusEnum] evse_status Optional parameter:
334
334
  # Filter by Locations that have the given status
335
- # @param [LocationsMarkersConnectorTypesEnum] connector_types Optional
335
+ # @param [GetEVLocationsConnectorTypesEnum] connector_types Optional
336
336
  # parameter: Filter by Locations that have Connectors with the set of
337
337
  # Connector Types
338
338
  # @param [Float] connector_min_power Optional parameter: Filter by Locations
339
339
  # that have a Connector with at least this power output (in kW)
340
- # @param [LocationsMarkersAuthorizationMethodsEnum] authorization_methods
340
+ # @param [GetEVLocationsAuthorizationMethodsEnum] authorization_methods
341
341
  # Optional parameter: Filter by Locations that support the given
342
342
  # Authorization Methods
343
343
  # @param [TrueClass | FalseClass] with_operator_name Optional parameter:
@@ -362,7 +362,7 @@ module ShellEv
362
362
  # @param [Array[String]] exclude_country Optional parameter: Filter by
363
363
  # Locations that are not in one of the given countries (specified using ISO
364
364
  # 3166-1 alpha-3 codes)
365
- # @return [SingleLocationMarkerResponse] response from the API call
365
+ # @return [SingleLocationMarkerResponse] response from the API call.
366
366
  def locations_markers(request_id,
367
367
  west,
368
368
  south,
@@ -383,7 +383,7 @@ module ShellEv
383
383
  exclude_country: nil)
384
384
  new_api_call_builder
385
385
  .request(new_request_builder(HttpMethodEnum::GET,
386
- '/locations/v1/ev/markers',
386
+ '/locations/markers',
387
387
  Server::DEFAULT)
388
388
  .header_param(new_parameter(request_id, key: 'RequestId'))
389
389
  .query_param(new_parameter(west, key: 'west'))
@@ -13,14 +13,14 @@ module ShellEv
13
13
  # space-delimited list.
14
14
  # @param [Hash] _field_parameters Additional optional form parameters are
15
15
  # supported by this endpoint.
16
- # @return [OAuthToken] response from the API call
16
+ # @return [OAuthToken] response from the API call.
17
17
  def request_token(authorization,
18
18
  scope: nil,
19
19
  _field_parameters: nil)
20
20
  new_api_call_builder
21
21
  .request(new_request_builder(HttpMethodEnum::POST,
22
- '/v1/oauth/token',
23
- Server::DEFAULT)
22
+ '/token',
23
+ Server::ACCESS_TOKEN_SERVER)
24
24
  .form_param(new_parameter('client_credentials', key: 'grant_type'))
25
25
  .header_param(new_parameter(authorization, key: 'Authorization'))
26
26
  .form_param(new_parameter(scope, key: 'scope'))
@@ -6,5 +6,16 @@
6
6
  module ShellEv
7
7
  # Class for exceptions when there is a network error, status code error, etc.
8
8
  class APIException < CoreLibrary::ApiException
9
+ # Provides a human-readable string representation of the object.
10
+ def to_s
11
+ class_name = self.class.name.split('::').last
12
+ "<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
13
+ end
14
+
15
+ # Provides a debugging-friendly string with detailed object information.
16
+ def inspect
17
+ class_name = self.class.name.split('::').last
18
+ "<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
19
+ end
9
20
  end
10
21
  end
@@ -48,5 +48,18 @@ module ShellEv
48
48
 
49
49
  @errors = SKIP unless hash.key?('errors')
50
50
  end
51
+
52
+ # Provides a human-readable string representation of the object.
53
+ def to_s
54
+ class_name = self.class.name.split('::').last
55
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
56
+ end
57
+
58
+ # Provides a debugging-friendly string with detailed object information.
59
+ def inspect
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
62
+ " #{@errors.inspect}>"
63
+ end
51
64
  end
52
65
  end
@@ -53,5 +53,19 @@ module ShellEv
53
53
  @errors = SKIP unless hash.key?('errors')
54
54
  @details = hash.key?('details') ? hash['details'] : SKIP
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} request_id: #{@request_id}, status: #{@status}, errors: #{@errors},"\
61
+ " details: #{@details}>"
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}, errors:"\
68
+ " #{@errors.inspect}, details: #{@details.inspect}>"
69
+ end
56
70
  end
57
71
  end
@@ -50,5 +50,18 @@ module ShellEv
50
50
 
51
51
  @errors = SKIP unless hash.key?('errors')
52
52
  end
53
+
54
+ # Provides a human-readable string representation of the object.
55
+ def to_s
56
+ class_name = self.class.name.split('::').last
57
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
58
+ end
59
+
60
+ # Provides a debugging-friendly string with detailed object information.
61
+ def inspect
62
+ class_name = self.class.name.split('::').last
63
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
64
+ " #{@errors.inspect}>"
65
+ end
53
66
  end
54
67
  end
@@ -44,5 +44,19 @@ module ShellEv
44
44
  hash.key?('error_description') ? hash['error_description'] : SKIP
45
45
  @error_uri = hash.key?('error_uri') ? hash['error_uri'] : SKIP
46
46
  end
47
+
48
+ # Provides a human-readable string representation of the object.
49
+ def to_s
50
+ class_name = self.class.name.split('::').last
51
+ "<#{class_name} error: #{@error}, error_description: #{@error_description}, error_uri:"\
52
+ " #{@error_uri}>"
53
+ end
54
+
55
+ # Provides a debugging-friendly string with detailed object information.
56
+ def inspect
57
+ class_name = self.class.name.split('::').last
58
+ "<#{class_name} error: #{@error.inspect}, error_description: #{@error_description.inspect},"\
59
+ " error_uri: #{@error_uri.inspect}>"
60
+ end
47
61
  end
48
62
  end
@@ -48,5 +48,18 @@ module ShellEv
48
48
 
49
49
  @errors = SKIP unless hash.key?('errors')
50
50
  end
51
+
52
+ # Provides a human-readable string representation of the object.
53
+ def to_s
54
+ class_name = self.class.name.split('::').last
55
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
56
+ end
57
+
58
+ # Provides a debugging-friendly string with detailed object information.
59
+ def inspect
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
62
+ " #{@errors.inspect}>"
63
+ end
51
64
  end
52
65
  end
@@ -48,5 +48,18 @@ module ShellEv
48
48
 
49
49
  @errors = SKIP unless hash.key?('errors')
50
50
  end
51
+
52
+ # Provides a human-readable string representation of the object.
53
+ def to_s
54
+ class_name = self.class.name.split('::').last
55
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
56
+ end
57
+
58
+ # Provides a debugging-friendly string with detailed object information.
59
+ def inspect
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
62
+ " #{@errors.inspect}>"
63
+ end
51
64
  end
52
65
  end
@@ -47,5 +47,18 @@ module ShellEv
47
47
 
48
48
  @errors = SKIP unless hash.key?('errors')
49
49
  end
50
+
51
+ # Provides a human-readable string representation of the object.
52
+ def to_s
53
+ class_name = self.class.name.split('::').last
54
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, errors: #{@errors}>"
55
+ end
56
+
57
+ # Provides a debugging-friendly string with detailed object information.
58
+ def inspect
59
+ class_name = self.class.name.split('::').last
60
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, errors:"\
61
+ " #{@errors.inspect}>"
62
+ end
50
63
  end
51
64
  end
@@ -55,5 +55,17 @@ module ShellEv
55
55
  Accessibility.new(status,
56
56
  remark)
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} status: #{@status}, remark: #{@remark}>"
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} status: #{@status.inspect}, remark: #{@remark.inspect}>"
69
+ end
58
70
  end
59
71
  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
18
- # @return [ActiveResponse200JsonStatusEnum]
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[DataActive]]
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
@@ -75,5 +75,19 @@ module ShellEv
75
75
  city,
76
76
  country)
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} street_and_number: #{@street_and_number}, postal_code: #{@postal_code},"\
83
+ " city: #{@city}, country: #{@country}>"
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} street_and_number: #{@street_and_number.inspect}, postal_code:"\
90
+ " #{@postal_code.inspect}, city: #{@city.inspect}, country: #{@country.inspect}>"
91
+ end
78
92
  end
79
93
  end
@@ -78,5 +78,19 @@ module ShellEv
78
78
  description,
79
79
  details)
80
80
  end
81
+
82
+ # Provides a human-readable string representation of the object.
83
+ def to_s
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} code: #{@code}, message: #{@message}, description: #{@description},"\
86
+ " details: #{@details}>"
87
+ end
88
+
89
+ # Provides a debugging-friendly string with detailed object information.
90
+ def inspect
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}, description:"\
93
+ " #{@description.inspect}, details: #{@details.inspect}>"
94
+ end
81
95
  end
82
96
  end