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
@@ -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
@@ -9,7 +9,7 @@ module ShellEv
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # 3 letter day of the week
12
+ # TODO: Write general description for this method
13
13
  # @return [OpeningHoursObjectWeekDayEnum]
14
14
  attr_accessor :week_day
15
15
 
@@ -64,5 +64,19 @@ module ShellEv
64
64
  start_time,
65
65
  end_time)
66
66
  end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} week_day: #{@week_day}, start_time: #{@start_time}, end_time:"\
72
+ " #{@end_time}>"
73
+ end
74
+
75
+ # Provides a debugging-friendly string with detailed object information.
76
+ def inspect
77
+ class_name = self.class.name.split('::').last
78
+ "<#{class_name} week_day: #{@week_day.inspect}, start_time: #{@start_time.inspect},"\
79
+ " end_time: #{@end_time.inspect}>"
80
+ end
67
81
  end
68
82
  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
@@ -74,5 +74,18 @@ module ShellEv
74
74
  status,
75
75
  data)
76
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
77
90
  end
78
91
  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
@@ -18,8 +18,7 @@ module ShellEv
18
18
  # @return [String]
19
19
  attr_accessor :unique_key
20
20
 
21
- # Minimum of all status values in the Marker, e.g. if at least one Evse in
22
- # the Marker is available, the value will be available
21
+ # Uniquely identifies the marker object
23
22
  # @return [SingleLocationMarkerStatusEnum]
24
23
  attr_accessor :status
25
24
 
@@ -147,5 +146,24 @@ module ShellEv
147
146
  APIHelper.valid_type?(value['markerType'],
148
147
  ->(val) { val.instance_of? String })
149
148
  end
149
+
150
+ # Provides a human-readable string representation of the object.
151
+ def to_s
152
+ class_name = self.class.name.split('::').last
153
+ "<#{class_name} marker_type: #{@marker_type}, unique_key: #{@unique_key}, status:"\
154
+ " #{@status}, coordinates: #{@coordinates}, evse_count: #{@evse_count}, max_power:"\
155
+ " #{@max_power}, geo_hash: #{@geo_hash}, location_uid: #{@location_uid},"\
156
+ " authorization_methods: #{@authorization_methods}, operator_id: #{@operator_id}>"
157
+ end
158
+
159
+ # Provides a debugging-friendly string with detailed object information.
160
+ def inspect
161
+ class_name = self.class.name.split('::').last
162
+ "<#{class_name} marker_type: #{@marker_type.inspect}, unique_key: #{@unique_key.inspect},"\
163
+ " status: #{@status.inspect}, coordinates: #{@coordinates.inspect}, evse_count:"\
164
+ " #{@evse_count.inspect}, max_power: #{@max_power.inspect}, geo_hash: #{@geo_hash.inspect},"\
165
+ " location_uid: #{@location_uid.inspect}, authorization_methods:"\
166
+ " #{@authorization_methods.inspect}, operator_id: #{@operator_id.inspect}>"
167
+ end
150
168
  end
151
169
  end
@@ -77,5 +77,18 @@ module ShellEv
77
77
 
78
78
  true
79
79
  end
80
+
81
+ # Provides a human-readable string representation of the object.
82
+ def to_s
83
+ class_name = self.class.name.split('::').last
84
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}>"
85
+ end
86
+
87
+ # Provides a debugging-friendly string with detailed object information.
88
+ def inspect
89
+ class_name = self.class.name.split('::').last
90
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
91
+ " #{@data.inspect}>"
92
+ end
80
93
  end
81
94
  end
@@ -0,0 +1,124 @@
1
+ # shell_ev
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellEv
7
+ # Tariff Model.
8
+ class Tariff < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Tariff to start a charging session
13
+ # @return [Float]
14
+ attr_accessor :start_fee
15
+
16
+ # Tariff per minute of charging time
17
+ # @return [Float]
18
+ attr_accessor :per_minute
19
+
20
+ # Tariff per kWh of energy consumed
21
+ # @return [Float]
22
+ attr_accessor :per_k_wh
23
+
24
+ # ISO 4217 Currency Code of the local currency.
25
+ # @return [String]
26
+ attr_accessor :currency
27
+
28
+ # ISO8601-compliant UTC datetime of the last update of the Tariff
29
+ # @return [String]
30
+ attr_accessor :updated
31
+
32
+ # ISO8601-compliant UTC datetime of the last update of the Tariff
33
+ # @return [TariffVOUpdatedByEnum]
34
+ attr_accessor :updated_by
35
+
36
+ # Tariff structure that this tariff belongs to, typically Default unless
37
+ # specific tariff is defined for provider
38
+ # @return [String]
39
+ attr_accessor :structure
40
+
41
+ # A mapping from model property names to API property names.
42
+ def self.names
43
+ @_hash = {} if @_hash.nil?
44
+ @_hash['start_fee'] = 'startFee'
45
+ @_hash['per_minute'] = 'perMinute'
46
+ @_hash['per_k_wh'] = 'perKWh'
47
+ @_hash['currency'] = 'currency'
48
+ @_hash['updated'] = 'updated'
49
+ @_hash['updated_by'] = 'updatedBy'
50
+ @_hash['structure'] = 'structure'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ %w[
57
+ start_fee
58
+ per_minute
59
+ per_k_wh
60
+ currency
61
+ updated
62
+ updated_by
63
+ structure
64
+ ]
65
+ end
66
+
67
+ # An array for nullable fields
68
+ def self.nullables
69
+ []
70
+ end
71
+
72
+ def initialize(start_fee = SKIP, per_minute = SKIP, per_k_wh = SKIP,
73
+ currency = SKIP, updated = SKIP, updated_by = SKIP,
74
+ structure = SKIP)
75
+ @start_fee = start_fee unless start_fee == SKIP
76
+ @per_minute = per_minute unless per_minute == SKIP
77
+ @per_k_wh = per_k_wh unless per_k_wh == SKIP
78
+ @currency = currency unless currency == SKIP
79
+ @updated = updated unless updated == SKIP
80
+ @updated_by = updated_by unless updated_by == SKIP
81
+ @structure = structure unless structure == SKIP
82
+ end
83
+
84
+ # Creates an instance of the object from a hash.
85
+ def self.from_hash(hash)
86
+ return nil unless hash
87
+
88
+ # Extract variables from the hash.
89
+ start_fee = hash.key?('startFee') ? hash['startFee'] : SKIP
90
+ per_minute = hash.key?('perMinute') ? hash['perMinute'] : SKIP
91
+ per_k_wh = hash.key?('perKWh') ? hash['perKWh'] : SKIP
92
+ currency = hash.key?('currency') ? hash['currency'] : SKIP
93
+ updated = hash.key?('updated') ? hash['updated'] : SKIP
94
+ updated_by = hash.key?('updatedBy') ? hash['updatedBy'] : SKIP
95
+ structure = hash.key?('structure') ? hash['structure'] : SKIP
96
+
97
+ # Create object from extracted values.
98
+ Tariff.new(start_fee,
99
+ per_minute,
100
+ per_k_wh,
101
+ currency,
102
+ updated,
103
+ updated_by,
104
+ structure)
105
+ end
106
+
107
+ # Provides a human-readable string representation of the object.
108
+ def to_s
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} start_fee: #{@start_fee}, per_minute: #{@per_minute}, per_k_wh:"\
111
+ " #{@per_k_wh}, currency: #{@currency}, updated: #{@updated}, updated_by: #{@updated_by},"\
112
+ " structure: #{@structure}>"
113
+ end
114
+
115
+ # Provides a debugging-friendly string with detailed object information.
116
+ def inspect
117
+ class_name = self.class.name.split('::').last
118
+ "<#{class_name} start_fee: #{@start_fee.inspect}, per_minute: #{@per_minute.inspect},"\
119
+ " per_k_wh: #{@per_k_wh.inspect}, currency: #{@currency.inspect}, updated:"\
120
+ " #{@updated.inspect}, updated_by: #{@updated_by.inspect}, structure:"\
121
+ " #{@structure.inspect}>"
122
+ end
123
+ end
124
+ end
@@ -29,7 +29,7 @@ module ShellEv
29
29
  # @return [String]
30
30
  attr_accessor :updated
31
31
 
32
- # Source of the last update of the tariff details
32
+ # ISO8601-compliant UTC datetime of the last update of the Tariff
33
33
  # @return [TariffVOUpdatedByEnum]
34
34
  attr_accessor :updated_by
35
35
 
@@ -103,5 +103,22 @@ module ShellEv
103
103
  updated_by,
104
104
  structure)
105
105
  end
106
+
107
+ # Provides a human-readable string representation of the object.
108
+ def to_s
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} start_fee: #{@start_fee}, per_minute: #{@per_minute}, per_k_wh:"\
111
+ " #{@per_k_wh}, currency: #{@currency}, updated: #{@updated}, updated_by: #{@updated_by},"\
112
+ " structure: #{@structure}>"
113
+ end
114
+
115
+ # Provides a debugging-friendly string with detailed object information.
116
+ def inspect
117
+ class_name = self.class.name.split('::').last
118
+ "<#{class_name} start_fee: #{@start_fee.inspect}, per_minute: #{@per_minute.inspect},"\
119
+ " per_k_wh: #{@per_k_wh.inspect}, currency: #{@currency.inspect}, updated:"\
120
+ " #{@updated.inspect}, updated_by: #{@updated_by.inspect}, structure:"\
121
+ " #{@structure.inspect}>"
122
+ end
106
123
  end
107
124
  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
@@ -12,5 +12,17 @@ module ShellEv
12
12
  def initialize(file, content_type: 'application/octet-stream')
13
13
  super
14
14
  end
15
- end
16
- end
15
+
16
+ # Provides a human-readable string representation of the object.
17
+ def to_s
18
+ class_name = self.class.name.split('::').last
19
+ "<#{class_name} file: #{@file}, content_type: #{@content_type}>"
20
+ end
21
+
22
+ # Provides a debugging-friendly string with detailed object information.
23
+ def to_inspect
24
+ class_name = self.class.name.split('::').last
25
+ "<#{class_name} file: #{@file.inspect}, content_type: #{@content_type.inspect}>"
26
+ end
27
+ end
28
+ end
data/lib/shell_ev.rb CHANGED
@@ -58,6 +58,7 @@ require_relative 'shell_ev/models/charge_error'
58
58
  require_relative 'shell_ev/models/data_active'
59
59
  require_relative 'shell_ev/models/get_charge_session_retrieve_response200_json'
60
60
  require_relative 'shell_ev/models/active_response200_json'
61
+ require_relative 'shell_ev/models/tariff'
61
62
  require_relative 'shell_ev/models/o_auth_token'
62
63
  require_relative 'shell_ev/models/' \
63
64
  'single_location_marker_authorization_methods_items_enum'
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.2.0
4
+ version: 1.4.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-07-24 00:00:00.000000000 Z
11
+ date: 2025-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.9
33
+ version: 0.3.11
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.9
40
+ version: 0.3.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: apimatic_faraday_client_adapter
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,20 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.14'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 5.14.1
61
+ version: 5.24.0
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '5.14'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 5.14.1
68
+ version: 5.24.0
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: minitest-proveit
77
71
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +164,7 @@ files:
170
164
  - lib/shell_ev/models/single_location_marker_authorization_methods_items_enum.rb
171
165
  - lib/shell_ev/models/single_location_marker_response.rb
172
166
  - lib/shell_ev/models/single_location_marker_status_enum.rb
167
+ - lib/shell_ev/models/tariff.rb
173
168
  - lib/shell_ev/models/tariff_vo.rb
174
169
  - lib/shell_ev/models/tariff_vo_updated_by_enum.rb
175
170
  - lib/shell_ev/models/unauthorized_err_msg.rb