ev-recharge-sdk 1.0.0 → 1.1.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 (91) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -21
  3. data/lib/shell_ev/client.rb +8 -8
  4. data/lib/shell_ev/configuration.rb +13 -17
  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
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetMarkersListAuthorizationMethods.
8
- class GetMarkersListAuthorizationMethodsEnum
9
- GET_MARKERS_LIST_AUTHORIZATION_METHODS_ENUM = [
7
+ # getEVLocationsAuthorizationMethods.
8
+ class GetEVLocationsAuthorizationMethodsEnum
9
+ GET_EV_LOCATIONS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
11
11
  NEWMOTIONAPP = 'NewMotionApp'.freeze,
12
12
 
@@ -20,7 +20,7 @@ module ShellEv
20
20
  def self.validate(value)
21
21
  return false if value.nil?
22
22
 
23
- GET_MARKERS_LIST_AUTHORIZATION_METHODS_ENUM.include?(value)
23
+ GET_EV_LOCATIONS_AUTHORIZATION_METHODS_ENUM.include?(value)
24
24
  end
25
25
  end
26
26
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetMarkersListConnectorTypes.
8
- class GetMarkersListConnectorTypesEnum
9
- GET_MARKERS_LIST_CONNECTOR_TYPES_ENUM = [
7
+ # getEVLocationsConnectorTypes.
8
+ class GetEVLocationsConnectorTypesEnum
9
+ GET_EV_LOCATIONS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
11
11
  AVCON = 'Avcon'.freeze,
12
12
 
@@ -65,7 +65,7 @@ module ShellEv
65
65
  def self.validate(value)
66
66
  return false if value.nil?
67
67
 
68
- GET_MARKERS_LIST_CONNECTOR_TYPES_ENUM.include?(value)
68
+ GET_EV_LOCATIONS_CONNECTOR_TYPES_ENUM.include?(value)
69
69
  end
70
70
  end
71
71
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetMarkersListEvseStatus.
8
- class GetMarkersListEvseStatusEnum
9
- GET_MARKERS_LIST_EVSE_STATUS_ENUM = [
7
+ # getEVLocationsEvseStatus.
8
+ class GetEVLocationsEvseStatusEnum
9
+ GET_EV_LOCATIONS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE
11
11
  AVAILABLE = 'Available'.freeze,
12
12
 
@@ -23,7 +23,7 @@ module ShellEv
23
23
  def self.validate(value)
24
24
  return false if value.nil?
25
25
 
26
- GET_MARKERS_LIST_EVSE_STATUS_ENUM.include?(value)
26
+ GET_EV_LOCATIONS_EVSE_STATUS_ENUM.include?(value)
27
27
  end
28
28
  end
29
29
  end
@@ -25,9 +25,9 @@ module ShellEv
25
25
  # A mapping from model property names to API property names.
26
26
  def self.names
27
27
  @_hash = {} if @_hash.nil?
28
- @_hash['request_id'] = 'RequestId'
29
- @_hash['status'] = 'Status'
30
- @_hash['data'] = 'Data'
28
+ @_hash['request_id'] = 'requestId'
29
+ @_hash['status'] = 'status'
30
+ @_hash['data'] = 'data'
31
31
  @_hash
32
32
  end
33
33
 
@@ -41,9 +41,7 @@ module ShellEv
41
41
  []
42
42
  end
43
43
 
44
- def initialize(request_id = nil,
45
- status = nil,
46
- data = nil)
44
+ def initialize(request_id = nil, status = nil, data = nil)
47
45
  @request_id = request_id
48
46
  @status = status
49
47
  @data = data
@@ -54,18 +52,18 @@ module ShellEv
54
52
  return nil unless hash
55
53
 
56
54
  # Extract variables from the hash.
57
- request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
58
- status = hash.key?('Status') ? hash['Status'] : nil
55
+ request_id = hash.key?('requestId') ? hash['requestId'] : nil
56
+ status = hash.key?('status') ? hash['status'] : nil
59
57
  # Parameter is an array, so we need to iterate through it
60
58
  data = nil
61
- unless hash['Data'].nil?
59
+ unless hash['data'].nil?
62
60
  data = []
63
- hash['Data'].each do |structure|
61
+ hash['data'].each do |structure|
64
62
  data << (InlineResponse202Data.from_hash(structure) if structure)
65
63
  end
66
64
  end
67
65
 
68
- data = nil unless hash.key?('Data')
66
+ data = nil unless hash.key?('data')
69
67
 
70
68
  # Create object from extracted values.
71
69
  InlineResponse202.new(request_id,
@@ -21,8 +21,8 @@ module ShellEv
21
21
  # A mapping from model property names to API property names.
22
22
  def self.names
23
23
  @_hash = {} if @_hash.nil?
24
- @_hash['request_id'] = 'RequestId'
25
- @_hash['status'] = 'Status'
24
+ @_hash['request_id'] = 'requestId'
25
+ @_hash['status'] = 'status'
26
26
  @_hash
27
27
  end
28
28
 
@@ -36,8 +36,7 @@ module ShellEv
36
36
  []
37
37
  end
38
38
 
39
- def initialize(request_id = nil,
40
- status = nil)
39
+ def initialize(request_id = nil, status = nil)
41
40
  @request_id = request_id
42
41
  @status = status
43
42
  end
@@ -47,8 +46,8 @@ module ShellEv
47
46
  return nil unless hash
48
47
 
49
48
  # Extract variables from the hash.
50
- request_id = hash.key?('RequestId') ? hash['RequestId'] : nil
51
- status = hash.key?('Status') ? hash['Status'] : nil
49
+ request_id = hash.key?('requestId') ? hash['requestId'] : nil
50
+ status = hash.key?('status') ? hash['status'] : nil
52
51
 
53
52
  # Create object from extracted values.
54
53
  InlineResponse2021.new(request_id,
@@ -16,13 +16,15 @@ module ShellEv
16
16
  # A mapping from model property names to API property names.
17
17
  def self.names
18
18
  @_hash = {} if @_hash.nil?
19
- @_hash['session_id'] = 'SessionId'
19
+ @_hash['session_id'] = 'sessionId'
20
20
  @_hash
21
21
  end
22
22
 
23
23
  # An array for optional fields
24
24
  def self.optionals
25
- []
25
+ %w[
26
+ session_id
27
+ ]
26
28
  end
27
29
 
28
30
  # An array for nullable fields
@@ -30,8 +32,8 @@ module ShellEv
30
32
  []
31
33
  end
32
34
 
33
- def initialize(session_id = nil)
34
- @session_id = session_id
35
+ def initialize(session_id = SKIP)
36
+ @session_id = session_id unless session_id == SKIP
35
37
  end
36
38
 
37
39
  # Creates an instance of the object from a hash.
@@ -39,7 +41,7 @@ module ShellEv
39
41
  return nil unless hash
40
42
 
41
43
  # Extract variables from the hash.
42
- session_id = hash.key?('SessionId') ? hash['SessionId'] : nil
44
+ session_id = hash.key?('sessionId') ? hash['sessionId'] : SKIP
43
45
 
44
46
  # Create object from extracted values.
45
47
  InlineResponse202Data.new(session_id)
@@ -0,0 +1,70 @@
1
+ # shell_ev
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellEv
7
+ # InternalErrorObject Model.
8
+ class InternalErrorObject < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Error code
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # Error description in English
17
+ # @return [String]
18
+ attr_accessor :message
19
+
20
+ # Technical details of the error message, the example which is given in the
21
+ # sample payload is one of the scenario. actual response will vary based on
22
+ # the technical nature
23
+ # @return [String]
24
+ attr_accessor :description
25
+
26
+ # A mapping from model property names to API property names.
27
+ def self.names
28
+ @_hash = {} if @_hash.nil?
29
+ @_hash['code'] = 'code'
30
+ @_hash['message'] = 'message'
31
+ @_hash['description'] = 'description'
32
+ @_hash
33
+ end
34
+
35
+ # An array for optional fields
36
+ def self.optionals
37
+ %w[
38
+ code
39
+ message
40
+ description
41
+ ]
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(code = SKIP, message = SKIP, description = SKIP)
50
+ @code = code unless code == SKIP
51
+ @message = message unless message == SKIP
52
+ @description = description unless description == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ code = hash.key?('code') ? hash['code'] : SKIP
61
+ message = hash.key?('message') ? hash['message'] : SKIP
62
+ description = hash.key?('description') ? hash['description'] : SKIP
63
+
64
+ # Create object from extracted values.
65
+ InternalErrorObject.new(code,
66
+ message,
67
+ description)
68
+ end
69
+ end
70
+ end
@@ -95,17 +95,10 @@ module ShellEv
95
95
  []
96
96
  end
97
97
 
98
- def initialize(uid = SKIP,
99
- external_id = SKIP,
100
- coordinates = SKIP,
101
- operator_name = SKIP,
102
- address = SKIP,
103
- accessibility = SKIP,
104
- evses = SKIP,
105
- opening_hours = SKIP,
106
- updated = SKIP,
107
- operator_comment = SKIP,
108
- location_type = SKIP)
98
+ def initialize(uid = SKIP, external_id = SKIP, coordinates = SKIP,
99
+ operator_name = SKIP, address = SKIP, accessibility = SKIP,
100
+ evses = SKIP, opening_hours = SKIP, updated = SKIP,
101
+ operator_comment = SKIP, location_type = SKIP)
109
102
  @uid = uid unless uid == SKIP
110
103
  @external_id = external_id unless external_id == SKIP
111
104
  @coordinates = coordinates unless coordinates == SKIP
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetLocationsListAuthorizationMethods.
8
- class GetLocationsListAuthorizationMethodsEnum
9
- GET_LOCATIONS_LIST_AUTHORIZATION_METHODS_ENUM = [
7
+ # locationsMarkersAuthorizationMethods.
8
+ class LocationsMarkersAuthorizationMethodsEnum
9
+ LOCATIONS_MARKERS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
11
11
  NEWMOTIONAPP = 'NewMotionApp'.freeze,
12
12
 
@@ -20,7 +20,7 @@ module ShellEv
20
20
  def self.validate(value)
21
21
  return false if value.nil?
22
22
 
23
- GET_LOCATIONS_LIST_AUTHORIZATION_METHODS_ENUM.include?(value)
23
+ LOCATIONS_MARKERS_AUTHORIZATION_METHODS_ENUM.include?(value)
24
24
  end
25
25
  end
26
26
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetLocationsListConnectorTypes.
8
- class GetLocationsListConnectorTypesEnum
9
- GET_LOCATIONS_LIST_CONNECTOR_TYPES_ENUM = [
7
+ # locationsMarkersConnectorTypes.
8
+ class LocationsMarkersConnectorTypesEnum
9
+ LOCATIONS_MARKERS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
11
11
  AVCON = 'Avcon'.freeze,
12
12
 
@@ -65,7 +65,7 @@ module ShellEv
65
65
  def self.validate(value)
66
66
  return false if value.nil?
67
67
 
68
- GET_LOCATIONS_LIST_CONNECTOR_TYPES_ENUM.include?(value)
68
+ LOCATIONS_MARKERS_CONNECTOR_TYPES_ENUM.include?(value)
69
69
  end
70
70
  end
71
71
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetLocationsListEvseStatus.
8
- class GetLocationsListEvseStatusEnum
9
- GET_LOCATIONS_LIST_EVSE_STATUS_ENUM = [
7
+ # locationsMarkersEvseStatus.
8
+ class LocationsMarkersEvseStatusEnum
9
+ LOCATIONS_MARKERS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE
11
11
  AVAILABLE = 'Available'.freeze,
12
12
 
@@ -23,7 +23,7 @@ module ShellEv
23
23
  def self.validate(value)
24
24
  return false if value.nil?
25
25
 
26
- GET_LOCATIONS_LIST_EVSE_STATUS_ENUM.include?(value)
26
+ LOCATIONS_MARKERS_EVSE_STATUS_ENUM.include?(value)
27
27
  end
28
28
  end
29
29
  end
@@ -70,12 +70,8 @@ module ShellEv
70
70
  []
71
71
  end
72
72
 
73
- def initialize(marker_type = nil,
74
- unique_key = SKIP,
75
- coordinates = SKIP,
76
- location_count = SKIP,
77
- evse_count = SKIP,
78
- max_power = SKIP,
73
+ def initialize(marker_type = nil, unique_key = SKIP, coordinates = SKIP,
74
+ location_count = SKIP, evse_count = SKIP, max_power = SKIP,
79
75
  geo_hash = SKIP)
80
76
  @marker_type = marker_type
81
77
  @unique_key = unique_key unless unique_key == SKIP
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetNearbyLocationsAuthorizationMethods.
8
- class GetNearbyLocationsAuthorizationMethodsEnum
9
- GET_NEARBY_LOCATIONS_AUTHORIZATION_METHODS_ENUM = [
7
+ # nearbyLocationsAuthorizationMethods.
8
+ class NearbyLocationsAuthorizationMethodsEnum
9
+ NEARBY_LOCATIONS_AUTHORIZATION_METHODS_ENUM = [
10
10
  # TODO: Write general description for NEWMOTIONAPP
11
11
  NEWMOTIONAPP = 'NewMotionApp'.freeze,
12
12
 
@@ -20,7 +20,7 @@ module ShellEv
20
20
  def self.validate(value)
21
21
  return false if value.nil?
22
22
 
23
- GET_NEARBY_LOCATIONS_AUTHORIZATION_METHODS_ENUM.include?(value)
23
+ NEARBY_LOCATIONS_AUTHORIZATION_METHODS_ENUM.include?(value)
24
24
  end
25
25
  end
26
26
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetNearbyLocationsConnectorTypes.
8
- class GetNearbyLocationsConnectorTypesEnum
9
- GET_NEARBY_LOCATIONS_CONNECTOR_TYPES_ENUM = [
7
+ # nearbyLocationsConnectorTypes.
8
+ class NearbyLocationsConnectorTypesEnum
9
+ NEARBY_LOCATIONS_CONNECTOR_TYPES_ENUM = [
10
10
  # TODO: Write general description for AVCON
11
11
  AVCON = 'Avcon'.freeze,
12
12
 
@@ -65,7 +65,7 @@ module ShellEv
65
65
  def self.validate(value)
66
66
  return false if value.nil?
67
67
 
68
- GET_NEARBY_LOCATIONS_CONNECTOR_TYPES_ENUM.include?(value)
68
+ NEARBY_LOCATIONS_CONNECTOR_TYPES_ENUM.include?(value)
69
69
  end
70
70
  end
71
71
  end
@@ -4,9 +4,9 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellEv
7
- # GetNearbyLocationsEvseStatus.
8
- class GetNearbyLocationsEvseStatusEnum
9
- GET_NEARBY_LOCATIONS_EVSE_STATUS_ENUM = [
7
+ # nearbyLocationsEvseStatus.
8
+ class NearbyLocationsEvseStatusEnum
9
+ NEARBY_LOCATIONS_EVSE_STATUS_ENUM = [
10
10
  # TODO: Write general description for AVAILABLE
11
11
  AVAILABLE = 'Available'.freeze,
12
12
 
@@ -23,7 +23,7 @@ module ShellEv
23
23
  def self.validate(value)
24
24
  return false if value.nil?
25
25
 
26
- GET_NEARBY_LOCATIONS_EVSE_STATUS_ENUM.include?(value)
26
+ NEARBY_LOCATIONS_EVSE_STATUS_ENUM.include?(value)
27
27
  end
28
28
  end
29
29
  end
@@ -0,0 +1,82 @@
1
+ # shell_ev
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellEv
7
+ # NotFoundErrMsg Model.
8
+ class NotFoundErrMsg < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Error code
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # Error desctiption in English
17
+ # @return [String]
18
+ attr_accessor :message
19
+
20
+ # Technical details of the error message, the example which is given in the
21
+ # sample payload is one of the scenarios. actual response will vary based on
22
+ # the technical nature
23
+ # @return [String]
24
+ attr_accessor :description
25
+
26
+ # Technical details of the error message, the example which is given in the
27
+ # sample payload is one of the scenarios. actual response will vary based on
28
+ # the technical nature
29
+ # @return [Array[String]]
30
+ attr_accessor :details
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['code'] = 'code'
36
+ @_hash['message'] = 'message'
37
+ @_hash['description'] = 'description'
38
+ @_hash['details'] = 'details'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ code
46
+ message
47
+ description
48
+ details
49
+ ]
50
+ end
51
+
52
+ # An array for nullable fields
53
+ def self.nullables
54
+ []
55
+ end
56
+
57
+ def initialize(code = SKIP, message = SKIP, description = SKIP,
58
+ details = SKIP)
59
+ @code = code unless code == SKIP
60
+ @message = message unless message == SKIP
61
+ @description = description unless description == SKIP
62
+ @details = details unless details == SKIP
63
+ end
64
+
65
+ # Creates an instance of the object from a hash.
66
+ def self.from_hash(hash)
67
+ return nil unless hash
68
+
69
+ # Extract variables from the hash.
70
+ code = hash.key?('code') ? hash['code'] : SKIP
71
+ message = hash.key?('message') ? hash['message'] : SKIP
72
+ description = hash.key?('description') ? hash['description'] : SKIP
73
+ details = hash.key?('details') ? hash['details'] : SKIP
74
+
75
+ # Create object from extracted values.
76
+ NotFoundErrMsg.new(code,
77
+ message,
78
+ description,
79
+ details)
80
+ end
81
+ end
82
+ end
@@ -62,12 +62,8 @@ module ShellEv
62
62
  []
63
63
  end
64
64
 
65
- def initialize(access_token = nil,
66
- token_type = nil,
67
- expires_in = SKIP,
68
- scope = SKIP,
69
- expiry = SKIP,
70
- refresh_token = SKIP)
65
+ def initialize(access_token = nil, token_type = nil, expires_in = SKIP,
66
+ scope = SKIP, expiry = SKIP, refresh_token = SKIP)
71
67
  @access_token = access_token
72
68
  @token_type = token_type
73
69
  @expires_in = expires_in unless expires_in == SKIP
@@ -44,9 +44,7 @@ module ShellEv
44
44
  []
45
45
  end
46
46
 
47
- def initialize(week_day = SKIP,
48
- start_time = SKIP,
49
- end_time = SKIP)
47
+ def initialize(week_day = SKIP, start_time = SKIP, end_time = SKIP)
50
48
  @week_day = week_day unless week_day == SKIP
51
49
  @start_time = start_time unless start_time == SKIP
52
50
  @end_time = end_time unless end_time == SKIP
@@ -0,0 +1,82 @@
1
+ # shell_ev
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellEv
7
+ # RatelimitErrMsg Model.
8
+ class RatelimitErrMsg < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Error code
13
+ # @return [String]
14
+ attr_accessor :code
15
+
16
+ # Error desctiption in English
17
+ # @return [String]
18
+ attr_accessor :message
19
+
20
+ # Technical details of the error message, the example which is given in the
21
+ # sample payload is one of the scenarios. actual response will vary based on
22
+ # the technical nature
23
+ # @return [String]
24
+ attr_accessor :description
25
+
26
+ # Technical details of the error message, the example which is given in the
27
+ # sample payload is one of the scenarios. actual response will vary based on
28
+ # the technical nature
29
+ # @return [Array[String]]
30
+ attr_accessor :details
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['code'] = 'code'
36
+ @_hash['message'] = 'message'
37
+ @_hash['description'] = 'description'
38
+ @_hash['details'] = 'details'
39
+ @_hash
40
+ end
41
+
42
+ # An array for optional fields
43
+ def self.optionals
44
+ %w[
45
+ code
46
+ message
47
+ description
48
+ details
49
+ ]
50
+ end
51
+
52
+ # An array for nullable fields
53
+ def self.nullables
54
+ []
55
+ end
56
+
57
+ def initialize(code = SKIP, message = SKIP, description = SKIP,
58
+ details = SKIP)
59
+ @code = code unless code == SKIP
60
+ @message = message unless message == SKIP
61
+ @description = description unless description == SKIP
62
+ @details = details unless details == SKIP
63
+ end
64
+
65
+ # Creates an instance of the object from a hash.
66
+ def self.from_hash(hash)
67
+ return nil unless hash
68
+
69
+ # Extract variables from the hash.
70
+ code = hash.key?('code') ? hash['code'] : SKIP
71
+ message = hash.key?('message') ? hash['message'] : SKIP
72
+ description = hash.key?('description') ? hash['description'] : SKIP
73
+ details = hash.key?('details') ? hash['details'] : SKIP
74
+
75
+ # Create object from extracted values.
76
+ RatelimitErrMsg.new(code,
77
+ message,
78
+ description,
79
+ details)
80
+ end
81
+ end
82
+ end