ev-recharge-sdk 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +38 -21
- data/lib/shell_ev/client.rb +8 -8
- data/lib/shell_ev/configuration.rb +13 -17
- data/lib/shell_ev/controllers/base_controller.rb +9 -9
- data/lib/shell_ev/controllers/charging_controller.rb +121 -154
- data/lib/shell_ev/controllers/locations_controller.rb +226 -142
- data/lib/shell_ev/controllers/o_auth_authorization_controller.rb +8 -8
- data/lib/shell_ev/exceptions/bad_request_exception.rb +33 -18
- data/lib/shell_ev/exceptions/{m405_error_response_error1_exception.rb → internal_server_error_exception.rb} +31 -26
- data/lib/shell_ev/exceptions/not_found_exception.rb +36 -19
- data/lib/shell_ev/exceptions/o_auth_provider_exception.rb +15 -15
- data/lib/shell_ev/exceptions/{m400_error_response_error1_exception.rb → serviceunavailable_exception.rb} +28 -28
- data/lib/shell_ev/exceptions/{m401_error_response_error1_exception.rb → too_many_requests_exception.rb} +28 -28
- data/lib/shell_ev/exceptions/unauthorized_exception.rb +32 -18
- data/lib/shell_ev/http/auth/o_auth2.rb +54 -10
- data/lib/shell_ev/models/accessibility.rb +1 -2
- data/lib/shell_ev/models/active_response200_json.rb +11 -13
- data/lib/shell_ev/models/address.rb +1 -3
- data/lib/shell_ev/models/bad_request_err_msg.rb +82 -0
- data/lib/shell_ev/models/{stop_charge_session_request_body_json.rb → charge_error.rb} +21 -10
- data/lib/shell_ev/models/charge_retrieve_state.rb +63 -0
- data/lib/shell_ev/models/chargesession_start_body.rb +7 -9
- data/lib/shell_ev/models/connector_vo.rb +4 -9
- data/lib/shell_ev/models/coordinates.rb +1 -2
- data/lib/shell_ev/models/data_active.rb +27 -45
- data/lib/shell_ev/models/data_retrieve.rb +31 -49
- data/lib/shell_ev/models/electrical_properties.rb +1 -3
- data/lib/shell_ev/models/evse_vo.rb +3 -8
- data/lib/shell_ev/models/get_charge_session_retrieve_response200_json.rb +11 -13
- data/lib/shell_ev/models/{get_markers_list_authorization_methods_enum.rb → get_ev_locations_authorization_methods_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_markers_list_connector_types_enum.rb → get_ev_locations_connector_types_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_markers_list_evse_status_enum.rb → get_ev_locations_evse_status_enum.rb} +4 -4
- data/lib/shell_ev/models/inline_response202.rb +9 -11
- data/lib/shell_ev/models/inline_response2021.rb +5 -6
- data/lib/shell_ev/models/inline_response202_data.rb +7 -5
- data/lib/shell_ev/models/internal_error_object.rb +70 -0
- data/lib/shell_ev/models/location_respone_object.rb +4 -11
- data/lib/shell_ev/models/{get_locations_list_authorization_methods_enum.rb → locations_markers_authorization_methods_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_locations_list_connector_types_enum.rb → locations_markers_connector_types_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_locations_list_evse_status_enum.rb → locations_markers_evse_status_enum.rb} +4 -4
- data/lib/shell_ev/models/multi_location_marker.rb +2 -6
- data/lib/shell_ev/models/{get_nearby_locations_authorization_methods_enum.rb → nearby_locations_authorization_methods_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_nearby_locations_connector_types_enum.rb → nearby_locations_connector_types_enum.rb} +4 -4
- data/lib/shell_ev/models/{get_nearby_locations_evse_status_enum.rb → nearby_locations_evse_status_enum.rb} +4 -4
- data/lib/shell_ev/models/not_found_err_msg.rb +82 -0
- data/lib/shell_ev/models/o_auth_token.rb +2 -6
- data/lib/shell_ev/models/opening_hours_object.rb +1 -3
- data/lib/shell_ev/models/ratelimit_err_msg.rb +82 -0
- data/lib/shell_ev/models/response.rb +78 -0
- data/lib/shell_ev/models/serviceunavailable_err_msg.rb +82 -0
- data/lib/shell_ev/models/single_location_marker.rb +5 -11
- data/lib/shell_ev/models/single_location_marker_authorization_methods_items_enum.rb +1 -1
- data/lib/shell_ev/models/single_location_marker_response.rb +81 -0
- data/lib/shell_ev/models/tariff_vo.rb +3 -7
- data/lib/shell_ev/models/unauthorized_err_msg.rb +82 -0
- data/lib/shell_ev/utilities/file_wrapper.rb +9 -9
- data/lib/shell_ev/utilities/union_type_lookup.rb +3 -2
- data/lib/shell_ev.rb +40 -60
- data/test/controllers/controller_test_base.rb +0 -5
- data/test/controllers/test_charging_controller.rb +74 -17
- data/test/controllers/test_locations_controller.rb +65 -0
- metadata +31 -49
- data/lib/shell_ev/exceptions/http401_error_response_exception.rb +0 -52
- data/lib/shell_ev/exceptions/m404_error_response_error1_exception.rb +0 -53
- data/lib/shell_ev/exceptions/m429_error_response_error1_exception.rb +0 -52
- data/lib/shell_ev/exceptions/m500_error_response_error1_exception.rb +0 -52
- data/lib/shell_ev/exceptions/m503_error_response_error1_exception.rb +0 -52
- data/lib/shell_ev/models/data_active_session_code_enum.rb +0 -44
- data/lib/shell_ev/models/data_active_session_state_enum.rb +0 -35
- data/lib/shell_ev/models/data_retrieve_session_code_enum.rb +0 -44
- data/lib/shell_ev/models/data_retrieve_session_state_enum.rb +0 -35
- data/lib/shell_ev/models/env_enum.rb +0 -23
- data/lib/shell_ev/models/m400_error_response.rb +0 -78
- data/lib/shell_ev/models/m400_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m401_error_response.rb +0 -78
- data/lib/shell_ev/models/m401_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m404_error_response.rb +0 -79
- data/lib/shell_ev/models/m404_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m405_error_response.rb +0 -78
- data/lib/shell_ev/models/m405_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m429_error_response.rb +0 -78
- data/lib/shell_ev/models/m429_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m500_error_response.rb +0 -78
- data/lib/shell_ev/models/m500_error_response_error.rb +0 -80
- data/lib/shell_ev/models/m503_error_response.rb +0 -78
- data/lib/shell_ev/models/m503_error_response_error.rb +0 -80
- data/lib/shell_ev/models/response_base_status_enum.rb +0 -26
- data/lib/shell_ev/models/response_error401_all_of1.rb +0 -57
- data/lib/shell_ev/models/response_error401_all_of1_errors_items.rb +0 -80
- data/lib/shell_ev/models/success_response.rb +0 -58
@@ -0,0 +1,78 @@
|
|
1
|
+
# shell_ev
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellEv
|
7
|
+
# Response Model.
|
8
|
+
class Response < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# requestId is unique identifier value that is attached to requests and
|
13
|
+
# messages that allow reference to a particular transaction or event chain.
|
14
|
+
# @return [UUID | String]
|
15
|
+
attr_accessor :request_id
|
16
|
+
|
17
|
+
# status of the API call
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :status
|
20
|
+
|
21
|
+
# API Response
|
22
|
+
# @return [Array[LocationResponeObject]]
|
23
|
+
attr_accessor :data
|
24
|
+
|
25
|
+
# A mapping from model property names to API property names.
|
26
|
+
def self.names
|
27
|
+
@_hash = {} if @_hash.nil?
|
28
|
+
@_hash['request_id'] = 'requestId'
|
29
|
+
@_hash['status'] = 'status'
|
30
|
+
@_hash['data'] = 'data'
|
31
|
+
@_hash
|
32
|
+
end
|
33
|
+
|
34
|
+
# An array for optional fields
|
35
|
+
def self.optionals
|
36
|
+
%w[
|
37
|
+
request_id
|
38
|
+
status
|
39
|
+
data
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for nullable fields
|
44
|
+
def self.nullables
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize(request_id = SKIP, status = SKIP, data = SKIP)
|
49
|
+
@request_id = request_id unless request_id == SKIP
|
50
|
+
@status = status unless status == SKIP
|
51
|
+
@data = data unless data == SKIP
|
52
|
+
end
|
53
|
+
|
54
|
+
# Creates an instance of the object from a hash.
|
55
|
+
def self.from_hash(hash)
|
56
|
+
return nil unless hash
|
57
|
+
|
58
|
+
# Extract variables from the hash.
|
59
|
+
request_id = hash.key?('requestId') ? hash['requestId'] : SKIP
|
60
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
61
|
+
# Parameter is an array, so we need to iterate through it
|
62
|
+
data = nil
|
63
|
+
unless hash['data'].nil?
|
64
|
+
data = []
|
65
|
+
hash['data'].each do |structure|
|
66
|
+
data << (LocationResponeObject.from_hash(structure) if structure)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
data = SKIP unless hash.key?('data')
|
71
|
+
|
72
|
+
# Create object from extracted values.
|
73
|
+
Response.new(request_id,
|
74
|
+
status,
|
75
|
+
data)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
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
|
+
# ServiceunavailableErrMsg Model.
|
8
|
+
class ServiceunavailableErrMsg < 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
|
+
ServiceunavailableErrMsg.new(code,
|
77
|
+
message,
|
78
|
+
description,
|
79
|
+
details)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -9,7 +9,7 @@ module ShellEv
|
|
9
9
|
SKIP = Object.new
|
10
10
|
private_constant :SKIP
|
11
11
|
|
12
|
-
# Identifies the marker type. If it
|
12
|
+
# Identifies the marker type. If it’s a `SingleLocationMarker`, then the
|
13
13
|
# value is `SingleLocation`
|
14
14
|
# @return [String]
|
15
15
|
attr_accessor :marker_type
|
@@ -88,16 +88,10 @@ module ShellEv
|
|
88
88
|
[]
|
89
89
|
end
|
90
90
|
|
91
|
-
def initialize(marker_type = nil,
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
evse_count = SKIP,
|
96
|
-
max_power = SKIP,
|
97
|
-
geo_hash = SKIP,
|
98
|
-
location_uid = SKIP,
|
99
|
-
authorization_methods = SKIP,
|
100
|
-
operator_id = SKIP)
|
91
|
+
def initialize(marker_type = nil, unique_key = SKIP, status = SKIP,
|
92
|
+
coordinates = SKIP, evse_count = SKIP, max_power = SKIP,
|
93
|
+
geo_hash = SKIP, location_uid = SKIP,
|
94
|
+
authorization_methods = SKIP, operator_id = SKIP)
|
101
95
|
@marker_type = marker_type
|
102
96
|
@unique_key = unique_key unless unique_key == SKIP
|
103
97
|
@status = status unless status == SKIP
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
6
|
module ShellEv
|
7
|
-
#
|
7
|
+
# singleLocationMarkerAuthorizationMethodsItems.
|
8
8
|
class SingleLocationMarkerAuthorizationMethodsItemsEnum
|
9
9
|
SINGLE_LOCATION_MARKER_AUTHORIZATION_METHODS_ITEMS_ENUM = [
|
10
10
|
# TODO: Write general description for NEWMOTIONAPP
|
@@ -0,0 +1,81 @@
|
|
1
|
+
# shell_ev
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellEv
|
7
|
+
# SingleLocationMarkerResponse Model.
|
8
|
+
class SingleLocationMarkerResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# requestId is unique identifier value that is attached to requests and
|
13
|
+
# messages that allow reference to a particular transaction or event chain.
|
14
|
+
# @return [UUID | String]
|
15
|
+
attr_accessor :request_id
|
16
|
+
|
17
|
+
# status of the API call
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :status
|
20
|
+
|
21
|
+
# status of the API call
|
22
|
+
# @return [Array[Object]]
|
23
|
+
attr_accessor :data
|
24
|
+
|
25
|
+
# A mapping from model property names to API property names.
|
26
|
+
def self.names
|
27
|
+
@_hash = {} if @_hash.nil?
|
28
|
+
@_hash['request_id'] = 'requestId'
|
29
|
+
@_hash['status'] = 'status'
|
30
|
+
@_hash['data'] = 'data'
|
31
|
+
@_hash
|
32
|
+
end
|
33
|
+
|
34
|
+
# An array for optional fields
|
35
|
+
def self.optionals
|
36
|
+
%w[
|
37
|
+
request_id
|
38
|
+
status
|
39
|
+
data
|
40
|
+
]
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for nullable fields
|
44
|
+
def self.nullables
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
def initialize(request_id = SKIP, status = SKIP, data = SKIP)
|
49
|
+
@request_id = request_id unless request_id == SKIP
|
50
|
+
@status = status unless status == SKIP
|
51
|
+
@data = data unless data == SKIP
|
52
|
+
end
|
53
|
+
|
54
|
+
# Creates an instance of the object from a hash.
|
55
|
+
def self.from_hash(hash)
|
56
|
+
return nil unless hash
|
57
|
+
|
58
|
+
# Extract variables from the hash.
|
59
|
+
request_id = hash.key?('requestId') ? hash['requestId'] : SKIP
|
60
|
+
status = hash.key?('status') ? hash['status'] : SKIP
|
61
|
+
data = hash.key?('data') ? APIHelper.deserialize_union_type(
|
62
|
+
UnionTypeLookUp.get(:LocationMarker), hash['data']
|
63
|
+
) : SKIP
|
64
|
+
|
65
|
+
# Create object from extracted values.
|
66
|
+
SingleLocationMarkerResponse.new(request_id,
|
67
|
+
status,
|
68
|
+
data)
|
69
|
+
end
|
70
|
+
|
71
|
+
# Validates an instance of the object from a given value.
|
72
|
+
# @param [SingleLocationMarkerResponse | Hash] The value against the validation is performed.
|
73
|
+
def self.validate(value)
|
74
|
+
return true if value.instance_of? self
|
75
|
+
|
76
|
+
return false unless value.instance_of? Hash
|
77
|
+
|
78
|
+
true
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
@@ -21,7 +21,7 @@ module ShellEv
|
|
21
21
|
# @return [Float]
|
22
22
|
attr_accessor :per_k_wh
|
23
23
|
|
24
|
-
# ISO 4217
|
24
|
+
# ISO 4217 Currency Code of the local currency.
|
25
25
|
# @return [String]
|
26
26
|
attr_accessor :currency
|
27
27
|
|
@@ -69,12 +69,8 @@ module ShellEv
|
|
69
69
|
[]
|
70
70
|
end
|
71
71
|
|
72
|
-
def initialize(start_fee = SKIP,
|
73
|
-
|
74
|
-
per_k_wh = SKIP,
|
75
|
-
currency = SKIP,
|
76
|
-
updated = SKIP,
|
77
|
-
updated_by = SKIP,
|
72
|
+
def initialize(start_fee = SKIP, per_minute = SKIP, per_k_wh = SKIP,
|
73
|
+
currency = SKIP, updated = SKIP, updated_by = SKIP,
|
78
74
|
structure = SKIP)
|
79
75
|
@start_fee = start_fee unless start_fee == SKIP
|
80
76
|
@per_minute = per_minute unless per_minute == 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
|
+
# UnauthorizedErrMsg Model.
|
8
|
+
class UnauthorizedErrMsg < 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
|
+
UnauthorizedErrMsg.new(code,
|
77
|
+
message,
|
78
|
+
description,
|
79
|
+
details)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
module ShellEv
|
7
7
|
# A utility to allow users to set the content-type for files
|
8
|
-
class FileWrapper < CoreLibrary::FileWrapper
|
9
|
-
# The constructor.
|
10
|
-
# @param [File] file The file to be sent in the request.
|
11
|
-
# @param [string] content_type The content type of the provided file.
|
12
|
-
def initialize(file, content_type: 'application/octet-stream')
|
13
|
-
super
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
8
|
+
class FileWrapper < CoreLibrary::FileWrapper
|
9
|
+
# The constructor.
|
10
|
+
# @param [File] file The file to be sent in the request.
|
11
|
+
# @param [string] content_type The content type of the provided file.
|
12
|
+
def initialize(file, content_type: 'application/octet-stream')
|
13
|
+
super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -12,7 +12,7 @@ module ShellEv
|
|
12
12
|
# rubocop:disable Lint/RedundantCopDisableDirective, Style/HashSyntax, Layout/FirstArgumentIndentation
|
13
13
|
def self.union_types
|
14
14
|
{
|
15
|
-
:
|
15
|
+
:LocationMarker => OneOf.new(
|
16
16
|
[
|
17
17
|
LeafType.new(SingleLocationMarker, UnionTypeContext.new(
|
18
18
|
discriminator_value: 'SingleLocation',
|
@@ -24,7 +24,8 @@ module ShellEv
|
|
24
24
|
))
|
25
25
|
],
|
26
26
|
UnionTypeContext.new(
|
27
|
-
is_array: true
|
27
|
+
is_array: true,
|
28
|
+
is_optional: true
|
28
29
|
)
|
29
30
|
)
|
30
31
|
}
|
data/lib/shell_ev.rb
CHANGED
@@ -29,97 +29,77 @@ require_relative 'shell_ev/http/auth/o_auth2'
|
|
29
29
|
|
30
30
|
# Models
|
31
31
|
require_relative 'shell_ev/models/base_model'
|
32
|
-
require_relative 'shell_ev/models/
|
33
|
-
require_relative 'shell_ev/models/data_active'
|
34
|
-
require_relative 'shell_ev/models/m400_error_response'
|
35
|
-
require_relative 'shell_ev/models/m401_error_response'
|
36
|
-
require_relative 'shell_ev/models/m404_error_response'
|
37
|
-
require_relative 'shell_ev/models/m405_error_response'
|
38
|
-
require_relative 'shell_ev/models/m429_error_response'
|
39
|
-
require_relative 'shell_ev/models/m500_error_response'
|
40
|
-
require_relative 'shell_ev/models/m503_error_response'
|
41
|
-
require_relative 'shell_ev/models/m400_error_response_error'
|
42
|
-
require_relative 'shell_ev/models/m401_error_response_error'
|
43
|
-
require_relative 'shell_ev/models/m404_error_response_error'
|
44
|
-
require_relative 'shell_ev/models/m405_error_response_error'
|
45
|
-
require_relative 'shell_ev/models/m429_error_response_error'
|
46
|
-
require_relative 'shell_ev/models/m500_error_response_error'
|
47
|
-
require_relative 'shell_ev/models/m503_error_response_error'
|
48
|
-
require_relative 'shell_ev/models/chargesession_start_body'
|
49
|
-
require_relative 'shell_ev/models/inline_response202'
|
50
|
-
require_relative 'shell_ev/models/inline_response2021'
|
51
|
-
require_relative 'shell_ev/models/inline_response202_data'
|
52
|
-
require_relative 'shell_ev/models/success_response'
|
53
|
-
require_relative 'shell_ev/models/stop_charge_session_request_body_json'
|
54
|
-
require_relative 'shell_ev/models/get_charge_session_retrieve_response200_json'
|
55
|
-
require_relative 'shell_ev/models/active_response200_json'
|
56
|
-
require_relative 'shell_ev/models/response_error401_all_of1'
|
57
|
-
require_relative 'shell_ev/models/response_error401_all_of1_errors_items'
|
32
|
+
require_relative 'shell_ev/models/response'
|
58
33
|
require_relative 'shell_ev/models/location_respone_object'
|
59
34
|
require_relative 'shell_ev/models/coordinates'
|
60
35
|
require_relative 'shell_ev/models/address'
|
61
36
|
require_relative 'shell_ev/models/accessibility'
|
62
|
-
require_relative 'shell_ev/models/opening_hours_object'
|
63
37
|
require_relative 'shell_ev/models/evse_vo'
|
64
38
|
require_relative 'shell_ev/models/connector_vo'
|
65
|
-
require_relative 'shell_ev/models/tariff_vo'
|
66
39
|
require_relative 'shell_ev/models/electrical_properties'
|
40
|
+
require_relative 'shell_ev/models/tariff_vo'
|
41
|
+
require_relative 'shell_ev/models/opening_hours_object'
|
42
|
+
require_relative 'shell_ev/models/bad_request_err_msg'
|
43
|
+
require_relative 'shell_ev/models/unauthorized_err_msg'
|
44
|
+
require_relative 'shell_ev/models/not_found_err_msg'
|
45
|
+
require_relative 'shell_ev/models/ratelimit_err_msg'
|
46
|
+
require_relative 'shell_ev/models/internal_error_object'
|
47
|
+
require_relative 'shell_ev/models/serviceunavailable_err_msg'
|
48
|
+
require_relative 'shell_ev/models/single_location_marker_response'
|
67
49
|
require_relative 'shell_ev/models/single_location_marker'
|
68
50
|
require_relative 'shell_ev/models/multi_location_marker'
|
51
|
+
require_relative 'shell_ev/models/chargesession_start_body'
|
52
|
+
require_relative 'shell_ev/models/inline_response202'
|
53
|
+
require_relative 'shell_ev/models/inline_response202_data'
|
54
|
+
require_relative 'shell_ev/models/inline_response2021'
|
55
|
+
require_relative 'shell_ev/models/data_retrieve'
|
56
|
+
require_relative 'shell_ev/models/charge_retrieve_state'
|
57
|
+
require_relative 'shell_ev/models/charge_error'
|
58
|
+
require_relative 'shell_ev/models/data_active'
|
59
|
+
require_relative 'shell_ev/models/get_charge_session_retrieve_response200_json'
|
60
|
+
require_relative 'shell_ev/models/active_response200_json'
|
69
61
|
require_relative 'shell_ev/models/o_auth_token'
|
70
|
-
require_relative 'shell_ev/models/' \
|
71
|
-
'get_charge_session_retrieve_response200_json_status_enum'
|
72
|
-
require_relative 'shell_ev/models/active_response200_json_status_enum'
|
73
|
-
require_relative 'shell_ev/models/data_retrieve_session_state_enum'
|
74
|
-
require_relative 'shell_ev/models/data_retrieve_session_code_enum'
|
75
|
-
require_relative 'shell_ev/models/data_active_session_state_enum'
|
76
|
-
require_relative 'shell_ev/models/data_active_session_code_enum'
|
77
|
-
require_relative 'shell_ev/models/inline_response202_status_enum'
|
78
|
-
require_relative 'shell_ev/models/inline_response2021_status_enum'
|
79
|
-
require_relative 'shell_ev/models/response_base_status_enum'
|
80
|
-
require_relative 'shell_ev/models/env_enum'
|
81
62
|
require_relative 'shell_ev/models/' \
|
82
63
|
'single_location_marker_authorization_methods_items_enum'
|
83
|
-
require_relative 'shell_ev/models/
|
84
|
-
require_relative 'shell_ev/models/
|
85
|
-
require_relative 'shell_ev/models/
|
86
|
-
require_relative 'shell_ev/models/
|
87
|
-
require_relative 'shell_ev/models/
|
64
|
+
require_relative 'shell_ev/models/get_ev_locations_evse_status_enum'
|
65
|
+
require_relative 'shell_ev/models/get_ev_locations_connector_types_enum'
|
66
|
+
require_relative 'shell_ev/models/get_ev_locations_authorization_methods_enum'
|
67
|
+
require_relative 'shell_ev/models/nearby_locations_evse_status_enum'
|
68
|
+
require_relative 'shell_ev/models/nearby_locations_connector_types_enum'
|
69
|
+
require_relative 'shell_ev/models/nearby_locations_authorization_methods_enum'
|
70
|
+
require_relative 'shell_ev/models/locations_markers_evse_status_enum'
|
71
|
+
require_relative 'shell_ev/models/locations_markers_connector_types_enum'
|
72
|
+
require_relative 'shell_ev/models/locations_markers_authorization_methods_enum'
|
88
73
|
require_relative 'shell_ev/models/' \
|
89
|
-
'
|
90
|
-
require_relative 'shell_ev/models/
|
91
|
-
require_relative 'shell_ev/models/get_markers_list_connector_types_enum'
|
92
|
-
require_relative 'shell_ev/models/get_markers_list_authorization_methods_enum'
|
74
|
+
'get_charge_session_retrieve_response200_json_status_enum'
|
75
|
+
require_relative 'shell_ev/models/active_response200_json_status_enum'
|
93
76
|
require_relative 'shell_ev/models/accessibility_status_enum'
|
94
77
|
require_relative 'shell_ev/models/evse_vo_status_enum'
|
95
78
|
require_relative 'shell_ev/models/evse_vo_authorization_methods_enum'
|
96
79
|
require_relative 'shell_ev/models/connector_vo_connector_type_enum'
|
97
80
|
require_relative 'shell_ev/models/connector_vo_updated_by_enum'
|
98
|
-
require_relative 'shell_ev/models/tariff_vo_updated_by_enum'
|
99
81
|
require_relative 'shell_ev/models/electrical_properties_power_type_enum'
|
100
|
-
require_relative 'shell_ev/models/
|
82
|
+
require_relative 'shell_ev/models/tariff_vo_updated_by_enum'
|
101
83
|
require_relative 'shell_ev/models/opening_hours_object_week_day_enum'
|
84
|
+
require_relative 'shell_ev/models/single_location_marker_status_enum'
|
85
|
+
require_relative 'shell_ev/models/inline_response202_status_enum'
|
86
|
+
require_relative 'shell_ev/models/inline_response2021_status_enum'
|
102
87
|
require_relative 'shell_ev/models/o_auth_provider_error_enum'
|
103
88
|
|
104
89
|
# Exceptions
|
105
90
|
require_relative 'shell_ev/exceptions/api_exception'
|
106
|
-
require_relative 'shell_ev/exceptions/http401_error_response_exception'
|
107
|
-
require_relative 'shell_ev/exceptions/m400_error_response_error1_exception'
|
108
|
-
require_relative 'shell_ev/exceptions/m404_error_response_error1_exception'
|
109
|
-
require_relative 'shell_ev/exceptions/m405_error_response_error1_exception'
|
110
|
-
require_relative 'shell_ev/exceptions/m429_error_response_error1_exception'
|
111
|
-
require_relative 'shell_ev/exceptions/m500_error_response_error1_exception'
|
112
|
-
require_relative 'shell_ev/exceptions/m503_error_response_error1_exception'
|
113
|
-
require_relative 'shell_ev/exceptions/m401_error_response_error1_exception'
|
114
|
-
require_relative 'shell_ev/exceptions/unauthorized_exception'
|
115
91
|
require_relative 'shell_ev/exceptions/bad_request_exception'
|
92
|
+
require_relative 'shell_ev/exceptions/unauthorized_exception'
|
116
93
|
require_relative 'shell_ev/exceptions/not_found_exception'
|
94
|
+
require_relative 'shell_ev/exceptions/too_many_requests_exception'
|
95
|
+
require_relative 'shell_ev/exceptions/internal_server_error_exception'
|
96
|
+
require_relative 'shell_ev/exceptions/serviceunavailable_exception'
|
117
97
|
require_relative 'shell_ev/exceptions/o_auth_provider_exception'
|
118
98
|
|
119
99
|
require_relative 'shell_ev/configuration'
|
120
100
|
|
121
101
|
# Controllers
|
122
102
|
require_relative 'shell_ev/controllers/base_controller'
|
123
|
-
require_relative 'shell_ev/controllers/charging_controller'
|
124
103
|
require_relative 'shell_ev/controllers/locations_controller'
|
104
|
+
require_relative 'shell_ev/controllers/charging_controller'
|
125
105
|
require_relative 'shell_ev/controllers/o_auth_authorization_controller'
|
@@ -25,10 +25,5 @@ class ControllerTestBase < Minitest::Test
|
|
25
25
|
def setup_class
|
26
26
|
_config = create_configuration
|
27
27
|
@client = Client.new(config: _config)
|
28
|
-
|
29
|
-
bearer_auth_token = @client.bearer_auth.fetch_token()
|
30
|
-
client_credentials_auth_credentials = _config.client_credentials_auth_credentials.clone_with(o_auth_token: bearer_auth_token)
|
31
|
-
_config = _config.clone_with(client_credentials_auth_credentials: client_credentials_auth_credentials)
|
32
|
-
@client = Client.new(config: _config)
|
33
28
|
end
|
34
29
|
end
|