vmsp-sdk 0.0.1
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.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +167 -0
- data/bin/console +15 -0
- data/lib/e_mobility_vmspocpiap_is/api_helper.rb +10 -0
- data/lib/e_mobility_vmspocpiap_is/client.rb +138 -0
- data/lib/e_mobility_vmspocpiap_is/configuration.rb +176 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/account_controller.rb +53 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/base_controller.rb +60 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/cd_rs_pull_controller.rb +103 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/cd_rs_push_controller.rb +51 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/commands_callback_controller.rb +56 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/commands_controller.rb +102 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/locations_pull_controller.rb +125 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/locations_push_controller.rb +68 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/sessions_pull_controller.rb +91 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/sessions_push_controller.rb +74 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/tariffs_pull_controller.rb +117 -0
- data/lib/e_mobility_vmspocpiap_is/controllers/tariffs_push_controller.rb +62 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_error_response_exception.rb +69 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_response_exception.rb +67 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_unauthorized_response_exception.rb +64 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/api_exception.rb +21 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_error_response_exception.rb +71 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_response_error_exception.rb +67 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_unauthorized_response_exception.rb +64 -0
- data/lib/e_mobility_vmspocpiap_is/exceptions/v3_commands_startsession400_error_exception.rb +67 -0
- data/lib/e_mobility_vmspocpiap_is/http/auth/bearer_authorization.rb +53 -0
- data/lib/e_mobility_vmspocpiap_is/http/auth/ocpi_authorization.rb +52 -0
- data/lib/e_mobility_vmspocpiap_is/http/http_call_back.rb +10 -0
- data/lib/e_mobility_vmspocpiap_is/http/http_method_enum.rb +10 -0
- data/lib/e_mobility_vmspocpiap_is/http/http_request.rb +10 -0
- data/lib/e_mobility_vmspocpiap_is/http/http_response.rb +10 -0
- data/lib/e_mobility_vmspocpiap_is/http/proxy_settings.rb +22 -0
- data/lib/e_mobility_vmspocpiap_is/models/account_details.rb +237 -0
- data/lib/e_mobility_vmspocpiap_is/models/account_details2.rb +237 -0
- data/lib/e_mobility_vmspocpiap_is/models/account_response.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/account_state_enum.rb +46 -0
- data/lib/e_mobility_vmspocpiap_is/models/account_state_reason_enum.rb +67 -0
- data/lib/e_mobility_vmspocpiap_is/models/add_on_fee.rb +101 -0
- data/lib/e_mobility_vmspocpiap_is/models/add_on_fee_type_enum.rb +52 -0
- data/lib/e_mobility_vmspocpiap_is/models/additional_geo_location.rb +82 -0
- data/lib/e_mobility_vmspocpiap_is/models/auth_method_enum.rb +40 -0
- data/lib/e_mobility_vmspocpiap_is/models/base_model.rb +110 -0
- data/lib/e_mobility_vmspocpiap_is/models/benefit.rb +181 -0
- data/lib/e_mobility_vmspocpiap_is/models/booking_restriction_type_enum.rb +44 -0
- data/lib/e_mobility_vmspocpiap_is/models/business_details.rb +84 -0
- data/lib/e_mobility_vmspocpiap_is/models/capability_enum.rb +88 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr.rb +462 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr1.rb +457 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr_dimension.rb +71 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr_dimension_type_enum.rb +97 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr_location.rb +206 -0
- data/lib/e_mobility_vmspocpiap_is/models/cdr_token.rb +91 -0
- data/lib/e_mobility_vmspocpiap_is/models/charge_type_enum.rb +52 -0
- data/lib/e_mobility_vmspocpiap_is/models/charging_period.rb +100 -0
- data/lib/e_mobility_vmspocpiap_is/models/command_response.rb +92 -0
- data/lib/e_mobility_vmspocpiap_is/models/command_response1.rb +91 -0
- data/lib/e_mobility_vmspocpiap_is/models/command_response_type_enum.rb +44 -0
- data/lib/e_mobility_vmspocpiap_is/models/command_result.rb +81 -0
- data/lib/e_mobility_vmspocpiap_is/models/command_result_type_enum.rb +64 -0
- data/lib/e_mobility_vmspocpiap_is/models/connector.rb +184 -0
- data/lib/e_mobility_vmspocpiap_is/models/connector_format_enum.rb +36 -0
- data/lib/e_mobility_vmspocpiap_is/models/connector_type_enum.rb +196 -0
- data/lib/e_mobility_vmspocpiap_is/models/day_of_week_enum.rb +56 -0
- data/lib/e_mobility_vmspocpiap_is/models/display_text.rb +68 -0
- data/lib/e_mobility_vmspocpiap_is/models/emaid.rb +137 -0
- data/lib/e_mobility_vmspocpiap_is/models/energy_mix.rb +127 -0
- data/lib/e_mobility_vmspocpiap_is/models/energy_source.rb +69 -0
- data/lib/e_mobility_vmspocpiap_is/models/energy_source_category_enum.rb +60 -0
- data/lib/e_mobility_vmspocpiap_is/models/environmental_impact.rb +68 -0
- data/lib/e_mobility_vmspocpiap_is/models/environmental_impact_category_enum.rb +36 -0
- data/lib/e_mobility_vmspocpiap_is/models/evse.rb +250 -0
- data/lib/e_mobility_vmspocpiap_is/models/exceptional_period.rb +84 -0
- data/lib/e_mobility_vmspocpiap_is/models/facility_enum.rb +108 -0
- data/lib/e_mobility_vmspocpiap_is/models/geo_location.rb +73 -0
- data/lib/e_mobility_vmspocpiap_is/models/hours.rb +127 -0
- data/lib/e_mobility_vmspocpiap_is/models/image.rb +114 -0
- data/lib/e_mobility_vmspocpiap_is/models/image_category_enum.rb +58 -0
- data/lib/e_mobility_vmspocpiap_is/models/location.rb +379 -0
- data/lib/e_mobility_vmspocpiap_is/models/location1.rb +375 -0
- data/lib/e_mobility_vmspocpiap_is/models/ocpi_command_response.rb +62 -0
- data/lib/e_mobility_vmspocpiap_is/models/ocpi_response.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/parking_direction_enum.rb +40 -0
- data/lib/e_mobility_vmspocpiap_is/models/parking_restriction_enum.rb +61 -0
- data/lib/e_mobility_vmspocpiap_is/models/parking_type_enum.rb +53 -0
- data/lib/e_mobility_vmspocpiap_is/models/power_type_enum.rb +48 -0
- data/lib/e_mobility_vmspocpiap_is/models/price.rb +80 -0
- data/lib/e_mobility_vmspocpiap_is/models/price_component.rb +99 -0
- data/lib/e_mobility_vmspocpiap_is/models/price_limit.rb +71 -0
- data/lib/e_mobility_vmspocpiap_is/models/product.rb +186 -0
- data/lib/e_mobility_vmspocpiap_is/models/publish_token_type.rb +106 -0
- data/lib/e_mobility_vmspocpiap_is/models/regular_hours.rb +80 -0
- data/lib/e_mobility_vmspocpiap_is/models/reservation_restriction_type_enum.rb +36 -0
- data/lib/e_mobility_vmspocpiap_is/models/session.rb +298 -0
- data/lib/e_mobility_vmspocpiap_is/models/session_status_enum.rb +60 -0
- data/lib/e_mobility_vmspocpiap_is/models/signed_data.rb +116 -0
- data/lib/e_mobility_vmspocpiap_is/models/signed_value.rb +85 -0
- data/lib/e_mobility_vmspocpiap_is/models/start_session.rb +107 -0
- data/lib/e_mobility_vmspocpiap_is/models/start_session_token.rb +68 -0
- data/lib/e_mobility_vmspocpiap_is/models/status2_enum.rb +44 -0
- data/lib/e_mobility_vmspocpiap_is/models/status_enum.rb +64 -0
- data/lib/e_mobility_vmspocpiap_is/models/status_schedule.rb +97 -0
- data/lib/e_mobility_vmspocpiap_is/models/stop_session.rb +70 -0
- data/lib/e_mobility_vmspocpiap_is/models/subscription_renewal_cadence_enum.rb +44 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff.rb +347 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff1.rb +336 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff_dimension_type_enum.rb +60 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff_element.rb +91 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff_restrictions.rb +310 -0
- data/lib/e_mobility_vmspocpiap_is/models/tariff_type_enum.rb +48 -0
- data/lib/e_mobility_vmspocpiap_is/models/tax_amount.rb +95 -0
- data/lib/e_mobility_vmspocpiap_is/models/tax_included_enum.rb +40 -0
- data/lib/e_mobility_vmspocpiap_is/models/token_type_enum.rb +48 -0
- data/lib/e_mobility_vmspocpiap_is/models/type_of_emaid_enum.rb +36 -0
- data/lib/e_mobility_vmspocpiap_is/models/url_enum.rb +36 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_cdrs_response.rb +107 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_cdrs_response1.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_commands_startsession_response.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_commands_stopsession_response.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_locations_response.rb +107 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_locations_response1.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_sessions_response.rb +107 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_tariffs_response.rb +107 -0
- data/lib/e_mobility_vmspocpiap_is/models/v3_tariffs_response1.rb +98 -0
- data/lib/e_mobility_vmspocpiap_is/models/vehicle_type_enum.rb +64 -0
- data/lib/e_mobility_vmspocpiap_is/utilities/date_time_helper.rb +11 -0
- data/lib/e_mobility_vmspocpiap_is/utilities/file_wrapper.rb +28 -0
- data/lib/e_mobility_vmspocpiap_is.rb +164 -0
- metadata +213 -0
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# e_mobility_vmspocpiap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module EMobilityVmspocpiapIs
|
|
8
|
+
# The EVSE object describes the part that controls the power supply to a
|
|
9
|
+
# single EV in a single session. It always belongs to a Location object. The
|
|
10
|
+
# object only contains directions to get from the location itself to the EVSE
|
|
11
|
+
# (i.e. floor, physical_reference or directions). An EVSE object has a list of
|
|
12
|
+
# Connectors which can not be used simultaneously: only one connector per EVSE
|
|
13
|
+
# can be used at the time.
|
|
14
|
+
class EVSE < BaseModel
|
|
15
|
+
SKIP = Object.new
|
|
16
|
+
private_constant :SKIP
|
|
17
|
+
|
|
18
|
+
# Uniquely identifies the EVSE within the CPOs platform (and suboperator
|
|
19
|
+
# platforms).
|
|
20
|
+
# This field can never be changed, modified or renamed. This is the
|
|
21
|
+
# 'technical' identification
|
|
22
|
+
# of the EVSE, not to be used as 'human readable' identification, use the
|
|
23
|
+
# field evse_id for that.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :uid
|
|
26
|
+
|
|
27
|
+
# Compliant with the following specification for EVSE ID: "E-mobility
|
|
28
|
+
# ID-codes: the purpose of IDs, ID usage and ID format"
|
|
29
|
+
# (https://evroaming.org/contract-evse-ids/).
|
|
30
|
+
# Optional because: if an evse_id is to be re-used in the real world, the
|
|
31
|
+
# evse_id can be removed
|
|
32
|
+
# from an EVSE object if the status is set to REMOVED.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :evse_id
|
|
35
|
+
|
|
36
|
+
# The status of an EVSE.
|
|
37
|
+
# @return [StatusEnum]
|
|
38
|
+
attr_accessor :status
|
|
39
|
+
|
|
40
|
+
# Indicates a planned status update of the EVSE.
|
|
41
|
+
# @return [Array[StatusSchedule]]
|
|
42
|
+
attr_accessor :status_schedule
|
|
43
|
+
|
|
44
|
+
# List of functionalities that the EVSE is capable of.
|
|
45
|
+
# @return [Array[CapabilityEnum]]
|
|
46
|
+
attr_accessor :capabilities
|
|
47
|
+
|
|
48
|
+
# List of available connectors on the EVSE.
|
|
49
|
+
# @return [Array[Connector]]
|
|
50
|
+
attr_accessor :connectors
|
|
51
|
+
|
|
52
|
+
# Level on which the Charge Point is located (in garage buildings) in the
|
|
53
|
+
# locally displayed numbering scheme.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :floor_level
|
|
56
|
+
|
|
57
|
+
# This class defines the geo location of the Charge Point. The geodetic
|
|
58
|
+
# system to be used is WGS 84.
|
|
59
|
+
# Five decimal places is seen as a minimum for GPS coordinates as this gives
|
|
60
|
+
# approximately 1 meter precision.
|
|
61
|
+
# More is always better. Seven decimal places gives approximately 1cm
|
|
62
|
+
# precision.
|
|
63
|
+
# @return [GeoLocation]
|
|
64
|
+
attr_accessor :coordinates
|
|
65
|
+
|
|
66
|
+
# A number/string printed on the outside of the EVSE for visual
|
|
67
|
+
# identification.
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :physical_reference
|
|
70
|
+
|
|
71
|
+
# Multi-language human-readable directions when more detailed information on
|
|
72
|
+
# how to reach the EVSE from the Location is required.
|
|
73
|
+
# @return [Array[DisplayText]]
|
|
74
|
+
attr_accessor :directions
|
|
75
|
+
|
|
76
|
+
# All applicable restrictions on who can charge at the EVSE, apart from
|
|
77
|
+
# those related to the vehicle type.
|
|
78
|
+
# @return [Array[ParkingRestrictionEnum]]
|
|
79
|
+
attr_accessor :parking_restrictions
|
|
80
|
+
|
|
81
|
+
# Links to images related to the EVSE such as photos or logos.
|
|
82
|
+
# @return [Array[Image]]
|
|
83
|
+
attr_accessor :images
|
|
84
|
+
|
|
85
|
+
# Timestamp when this EVSE or one of its Connectors was last updated (or
|
|
86
|
+
# created).
|
|
87
|
+
# @return [DateTime]
|
|
88
|
+
attr_accessor :last_updated
|
|
89
|
+
|
|
90
|
+
# A mapping from model property names to API property names.
|
|
91
|
+
def self.names
|
|
92
|
+
@_hash = {} if @_hash.nil?
|
|
93
|
+
@_hash['uid'] = 'uid'
|
|
94
|
+
@_hash['evse_id'] = 'evse_id'
|
|
95
|
+
@_hash['status'] = 'status'
|
|
96
|
+
@_hash['status_schedule'] = 'status_schedule'
|
|
97
|
+
@_hash['capabilities'] = 'capabilities'
|
|
98
|
+
@_hash['connectors'] = 'connectors'
|
|
99
|
+
@_hash['floor_level'] = 'floor_level'
|
|
100
|
+
@_hash['coordinates'] = 'coordinates'
|
|
101
|
+
@_hash['physical_reference'] = 'physical_reference'
|
|
102
|
+
@_hash['directions'] = 'directions'
|
|
103
|
+
@_hash['parking_restrictions'] = 'parking_restrictions'
|
|
104
|
+
@_hash['images'] = 'images'
|
|
105
|
+
@_hash['last_updated'] = 'last_updated'
|
|
106
|
+
@_hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# An array for optional fields
|
|
110
|
+
def self.optionals
|
|
111
|
+
%w[
|
|
112
|
+
evse_id
|
|
113
|
+
status_schedule
|
|
114
|
+
capabilities
|
|
115
|
+
floor_level
|
|
116
|
+
coordinates
|
|
117
|
+
physical_reference
|
|
118
|
+
directions
|
|
119
|
+
parking_restrictions
|
|
120
|
+
images
|
|
121
|
+
]
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# An array for nullable fields
|
|
125
|
+
def self.nullables
|
|
126
|
+
[]
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def initialize(uid = nil, status = nil, connectors = nil,
|
|
130
|
+
last_updated = nil, evse_id = SKIP, status_schedule = SKIP,
|
|
131
|
+
capabilities = SKIP, floor_level = SKIP, coordinates = SKIP,
|
|
132
|
+
physical_reference = SKIP, directions = SKIP,
|
|
133
|
+
parking_restrictions = SKIP, images = SKIP)
|
|
134
|
+
@uid = uid
|
|
135
|
+
@evse_id = evse_id unless evse_id == SKIP
|
|
136
|
+
@status = status
|
|
137
|
+
@status_schedule = status_schedule unless status_schedule == SKIP
|
|
138
|
+
@capabilities = capabilities unless capabilities == SKIP
|
|
139
|
+
@connectors = connectors
|
|
140
|
+
@floor_level = floor_level unless floor_level == SKIP
|
|
141
|
+
@coordinates = coordinates unless coordinates == SKIP
|
|
142
|
+
@physical_reference = physical_reference unless physical_reference == SKIP
|
|
143
|
+
@directions = directions unless directions == SKIP
|
|
144
|
+
@parking_restrictions = parking_restrictions unless parking_restrictions == SKIP
|
|
145
|
+
@images = images unless images == SKIP
|
|
146
|
+
@last_updated = last_updated
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Creates an instance of the object from a hash.
|
|
150
|
+
def self.from_hash(hash)
|
|
151
|
+
return nil unless hash
|
|
152
|
+
|
|
153
|
+
# Extract variables from the hash.
|
|
154
|
+
uid = hash.key?('uid') ? hash['uid'] : nil
|
|
155
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
156
|
+
# Parameter is an array, so we need to iterate through it
|
|
157
|
+
connectors = nil
|
|
158
|
+
unless hash['connectors'].nil?
|
|
159
|
+
connectors = []
|
|
160
|
+
hash['connectors'].each do |structure|
|
|
161
|
+
connectors << (Connector.from_hash(structure) if structure)
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
connectors = nil unless hash.key?('connectors')
|
|
166
|
+
last_updated = if hash.key?('last_updated')
|
|
167
|
+
(DateTimeHelper.from_rfc3339(hash['last_updated']) if hash['last_updated'])
|
|
168
|
+
end
|
|
169
|
+
evse_id = hash.key?('evse_id') ? hash['evse_id'] : SKIP
|
|
170
|
+
# Parameter is an array, so we need to iterate through it
|
|
171
|
+
status_schedule = nil
|
|
172
|
+
unless hash['status_schedule'].nil?
|
|
173
|
+
status_schedule = []
|
|
174
|
+
hash['status_schedule'].each do |structure|
|
|
175
|
+
status_schedule << (StatusSchedule.from_hash(structure) if structure)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
status_schedule = SKIP unless hash.key?('status_schedule')
|
|
180
|
+
capabilities = hash.key?('capabilities') ? hash['capabilities'] : SKIP
|
|
181
|
+
floor_level = hash.key?('floor_level') ? hash['floor_level'] : SKIP
|
|
182
|
+
coordinates = GeoLocation.from_hash(hash['coordinates']) if hash['coordinates']
|
|
183
|
+
physical_reference =
|
|
184
|
+
hash.key?('physical_reference') ? hash['physical_reference'] : SKIP
|
|
185
|
+
# Parameter is an array, so we need to iterate through it
|
|
186
|
+
directions = nil
|
|
187
|
+
unless hash['directions'].nil?
|
|
188
|
+
directions = []
|
|
189
|
+
hash['directions'].each do |structure|
|
|
190
|
+
directions << (DisplayText.from_hash(structure) if structure)
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
directions = SKIP unless hash.key?('directions')
|
|
195
|
+
parking_restrictions =
|
|
196
|
+
hash.key?('parking_restrictions') ? hash['parking_restrictions'] : SKIP
|
|
197
|
+
# Parameter is an array, so we need to iterate through it
|
|
198
|
+
images = nil
|
|
199
|
+
unless hash['images'].nil?
|
|
200
|
+
images = []
|
|
201
|
+
hash['images'].each do |structure|
|
|
202
|
+
images << (Image.from_hash(structure) if structure)
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
images = SKIP unless hash.key?('images')
|
|
207
|
+
|
|
208
|
+
# Create object from extracted values.
|
|
209
|
+
EVSE.new(uid,
|
|
210
|
+
status,
|
|
211
|
+
connectors,
|
|
212
|
+
last_updated,
|
|
213
|
+
evse_id,
|
|
214
|
+
status_schedule,
|
|
215
|
+
capabilities,
|
|
216
|
+
floor_level,
|
|
217
|
+
coordinates,
|
|
218
|
+
physical_reference,
|
|
219
|
+
directions,
|
|
220
|
+
parking_restrictions,
|
|
221
|
+
images)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
def to_custom_last_updated
|
|
225
|
+
DateTimeHelper.to_rfc3339(last_updated)
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# Provides a human-readable string representation of the object.
|
|
229
|
+
def to_s
|
|
230
|
+
class_name = self.class.name.split('::').last
|
|
231
|
+
"<#{class_name} uid: #{@uid}, evse_id: #{@evse_id}, status: #{@status}, status_schedule:"\
|
|
232
|
+
" #{@status_schedule}, capabilities: #{@capabilities}, connectors: #{@connectors},"\
|
|
233
|
+
" floor_level: #{@floor_level}, coordinates: #{@coordinates}, physical_reference:"\
|
|
234
|
+
" #{@physical_reference}, directions: #{@directions}, parking_restrictions:"\
|
|
235
|
+
" #{@parking_restrictions}, images: #{@images}, last_updated: #{@last_updated}>"
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
239
|
+
def inspect
|
|
240
|
+
class_name = self.class.name.split('::').last
|
|
241
|
+
"<#{class_name} uid: #{@uid.inspect}, evse_id: #{@evse_id.inspect}, status:"\
|
|
242
|
+
" #{@status.inspect}, status_schedule: #{@status_schedule.inspect}, capabilities:"\
|
|
243
|
+
" #{@capabilities.inspect}, connectors: #{@connectors.inspect}, floor_level:"\
|
|
244
|
+
" #{@floor_level.inspect}, coordinates: #{@coordinates.inspect}, physical_reference:"\
|
|
245
|
+
" #{@physical_reference.inspect}, directions: #{@directions.inspect}, parking_restrictions:"\
|
|
246
|
+
" #{@parking_restrictions.inspect}, images: #{@images.inspect}, last_updated:"\
|
|
247
|
+
" #{@last_updated.inspect}>"
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# e_mobility_vmspocpiap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module EMobilityVmspocpiapIs
|
|
8
|
+
# Specifies one exceptional period for opening or access hours.
|
|
9
|
+
class ExceptionalPeriod < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Begin of the exception. In UTC, time_zone field of the Location can be
|
|
14
|
+
# used to convert to local time.
|
|
15
|
+
# @return [DateTime]
|
|
16
|
+
attr_accessor :period_begin
|
|
17
|
+
|
|
18
|
+
# End of the exception. In UTC, time_zone field of the Location can be used
|
|
19
|
+
# to convert to local time.
|
|
20
|
+
# @return [DateTime]
|
|
21
|
+
attr_accessor :period_end
|
|
22
|
+
|
|
23
|
+
# A mapping from model property names to API property names.
|
|
24
|
+
def self.names
|
|
25
|
+
@_hash = {} if @_hash.nil?
|
|
26
|
+
@_hash['period_begin'] = 'period_begin'
|
|
27
|
+
@_hash['period_end'] = 'period_end'
|
|
28
|
+
@_hash
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for optional fields
|
|
32
|
+
def self.optionals
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(period_begin = nil, period_end = nil)
|
|
42
|
+
@period_begin = period_begin
|
|
43
|
+
@period_end = period_end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Creates an instance of the object from a hash.
|
|
47
|
+
def self.from_hash(hash)
|
|
48
|
+
return nil unless hash
|
|
49
|
+
|
|
50
|
+
# Extract variables from the hash.
|
|
51
|
+
period_begin = if hash.key?('period_begin')
|
|
52
|
+
(DateTimeHelper.from_rfc3339(hash['period_begin']) if hash['period_begin'])
|
|
53
|
+
end
|
|
54
|
+
period_end = if hash.key?('period_end')
|
|
55
|
+
(DateTimeHelper.from_rfc3339(hash['period_end']) if hash['period_end'])
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Create object from extracted values.
|
|
59
|
+
ExceptionalPeriod.new(period_begin,
|
|
60
|
+
period_end)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def to_custom_period_begin
|
|
64
|
+
DateTimeHelper.to_rfc3339(period_begin)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def to_custom_period_end
|
|
68
|
+
DateTimeHelper.to_rfc3339(period_end)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} period_begin: #{@period_begin}, period_end: #{@period_end}>"
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
78
|
+
def inspect
|
|
79
|
+
class_name = self.class.name.split('::').last
|
|
80
|
+
"<#{class_name} period_begin: #{@period_begin.inspect}, period_end:"\
|
|
81
|
+
" #{@period_end.inspect}>"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# e_mobility_vmspocpiap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EMobilityVmspocpiapIs
|
|
7
|
+
# Facilities available at or near the charging location.
|
|
8
|
+
class FacilityEnum
|
|
9
|
+
FACILITY_ENUM = [
|
|
10
|
+
# TODO: Write general description for HOTEL
|
|
11
|
+
HOTEL = 'HOTEL'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for RESTAURANT
|
|
14
|
+
RESTAURANT = 'RESTAURANT'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for CAFE
|
|
17
|
+
CAFE = 'CAFE'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for MALL
|
|
20
|
+
MALL = 'MALL'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for SUPERMARKET
|
|
23
|
+
SUPERMARKET = 'SUPERMARKET'.freeze,
|
|
24
|
+
|
|
25
|
+
# TODO: Write general description for SPORT
|
|
26
|
+
SPORT = 'SPORT'.freeze,
|
|
27
|
+
|
|
28
|
+
# TODO: Write general description for RECREATION_AREA
|
|
29
|
+
RECREATION_AREA = 'RECREATION_AREA'.freeze,
|
|
30
|
+
|
|
31
|
+
# TODO: Write general description for NATURE
|
|
32
|
+
NATURE = 'NATURE'.freeze,
|
|
33
|
+
|
|
34
|
+
# TODO: Write general description for MUSEUM
|
|
35
|
+
MUSEUM = 'MUSEUM'.freeze,
|
|
36
|
+
|
|
37
|
+
# TODO: Write general description for BIKE_SHARING
|
|
38
|
+
BIKE_SHARING = 'BIKE_SHARING'.freeze,
|
|
39
|
+
|
|
40
|
+
# TODO: Write general description for BUS_STOP
|
|
41
|
+
BUS_STOP = 'BUS_STOP'.freeze,
|
|
42
|
+
|
|
43
|
+
# TODO: Write general description for TAXI_STAND
|
|
44
|
+
TAXI_STAND = 'TAXI_STAND'.freeze,
|
|
45
|
+
|
|
46
|
+
# TODO: Write general description for TRAM_STOP
|
|
47
|
+
TRAM_STOP = 'TRAM_STOP'.freeze,
|
|
48
|
+
|
|
49
|
+
# TODO: Write general description for METRO_STATION
|
|
50
|
+
METRO_STATION = 'METRO_STATION'.freeze,
|
|
51
|
+
|
|
52
|
+
# TODO: Write general description for TRAIN_STATION
|
|
53
|
+
TRAIN_STATION = 'TRAIN_STATION'.freeze,
|
|
54
|
+
|
|
55
|
+
# TODO: Write general description for AIRPORT
|
|
56
|
+
AIRPORT = 'AIRPORT'.freeze,
|
|
57
|
+
|
|
58
|
+
# TODO: Write general description for PARKING_LOT
|
|
59
|
+
PARKING_LOT = 'PARKING_LOT'.freeze,
|
|
60
|
+
|
|
61
|
+
# TODO: Write general description for CARPOOL_PARKING
|
|
62
|
+
CARPOOL_PARKING = 'CARPOOL_PARKING'.freeze,
|
|
63
|
+
|
|
64
|
+
# TODO: Write general description for FUEL_STATION
|
|
65
|
+
FUEL_STATION = 'FUEL_STATION'.freeze,
|
|
66
|
+
|
|
67
|
+
# TODO: Write general description for WIFI
|
|
68
|
+
WIFI = 'WIFI'.freeze
|
|
69
|
+
].freeze
|
|
70
|
+
|
|
71
|
+
def self.validate(value)
|
|
72
|
+
return false if value.nil?
|
|
73
|
+
|
|
74
|
+
FACILITY_ENUM.include?(value)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def self.from_value(value, default_value = HOTEL)
|
|
78
|
+
return default_value if value.nil?
|
|
79
|
+
|
|
80
|
+
str = value.to_s.strip
|
|
81
|
+
|
|
82
|
+
case str.downcase
|
|
83
|
+
when 'hotel' then HOTEL
|
|
84
|
+
when 'restaurant' then RESTAURANT
|
|
85
|
+
when 'cafe' then CAFE
|
|
86
|
+
when 'mall' then MALL
|
|
87
|
+
when 'supermarket' then SUPERMARKET
|
|
88
|
+
when 'sport' then SPORT
|
|
89
|
+
when 'recreation_area' then RECREATION_AREA
|
|
90
|
+
when 'nature' then NATURE
|
|
91
|
+
when 'museum' then MUSEUM
|
|
92
|
+
when 'bike_sharing' then BIKE_SHARING
|
|
93
|
+
when 'bus_stop' then BUS_STOP
|
|
94
|
+
when 'taxi_stand' then TAXI_STAND
|
|
95
|
+
when 'tram_stop' then TRAM_STOP
|
|
96
|
+
when 'metro_station' then METRO_STATION
|
|
97
|
+
when 'train_station' then TRAIN_STATION
|
|
98
|
+
when 'airport' then AIRPORT
|
|
99
|
+
when 'parking_lot' then PARKING_LOT
|
|
100
|
+
when 'carpool_parking' then CARPOOL_PARKING
|
|
101
|
+
when 'fuel_station' then FUEL_STATION
|
|
102
|
+
when 'wifi' then WIFI
|
|
103
|
+
else
|
|
104
|
+
default_value
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
108
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# e_mobility_vmspocpiap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EMobilityVmspocpiapIs
|
|
7
|
+
# This class defines the geo location of the Charge Point. The geodetic system
|
|
8
|
+
# to be used is WGS 84. Five decimal places is seen as a minimum for GPS
|
|
9
|
+
# coordinates as this gives approximately 1 meter precision. More is always
|
|
10
|
+
# better. Seven decimal places gives approximately 1cm precision.
|
|
11
|
+
class GeoLocation < BaseModel
|
|
12
|
+
SKIP = Object.new
|
|
13
|
+
private_constant :SKIP
|
|
14
|
+
|
|
15
|
+
# Latitude of the point in decimal degree. Example 50.770774. Decimal
|
|
16
|
+
# separator "." required.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :latitude
|
|
19
|
+
|
|
20
|
+
# Longitude of the point in decimal degree. Example -126.104965. Decimal
|
|
21
|
+
# separator "." required.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :longitude
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['latitude'] = 'latitude'
|
|
29
|
+
@_hash['longitude'] = 'longitude'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
[]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# An array for nullable fields
|
|
39
|
+
def self.nullables
|
|
40
|
+
[]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def initialize(latitude = nil, longitude = nil)
|
|
44
|
+
@latitude = latitude
|
|
45
|
+
@longitude = longitude
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Creates an instance of the object from a hash.
|
|
49
|
+
def self.from_hash(hash)
|
|
50
|
+
return nil unless hash
|
|
51
|
+
|
|
52
|
+
# Extract variables from the hash.
|
|
53
|
+
latitude = hash.key?('latitude') ? hash['latitude'] : nil
|
|
54
|
+
longitude = hash.key?('longitude') ? hash['longitude'] : nil
|
|
55
|
+
|
|
56
|
+
# Create object from extracted values.
|
|
57
|
+
GeoLocation.new(latitude,
|
|
58
|
+
longitude)
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Provides a human-readable string representation of the object.
|
|
62
|
+
def to_s
|
|
63
|
+
class_name = self.class.name.split('::').last
|
|
64
|
+
"<#{class_name} latitude: #{@latitude}, longitude: #{@longitude}>"
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
68
|
+
def inspect
|
|
69
|
+
class_name = self.class.name.split('::').last
|
|
70
|
+
"<#{class_name} latitude: #{@latitude.inspect}, longitude: #{@longitude.inspect}>"
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# e_mobility_vmspocpiap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by
|
|
4
|
+
# APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module EMobilityVmspocpiapIs
|
|
7
|
+
# Opening and access hours of the location.
|
|
8
|
+
class Hours < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# True to represent 24 hours a day and 7 days a week, except the given
|
|
13
|
+
# exceptions.
|
|
14
|
+
# @return [TrueClass | FalseClass]
|
|
15
|
+
attr_accessor :twentyfourseven
|
|
16
|
+
|
|
17
|
+
# Regular hours, weekday-based. Only to be used if twentyfourseven=false,
|
|
18
|
+
# then this field needs to contain at least one RegularHours object.
|
|
19
|
+
# @return [Array[RegularHours]]
|
|
20
|
+
attr_accessor :regular_hours
|
|
21
|
+
|
|
22
|
+
# Exceptions for specified calendar dates, time-range based. Periods the
|
|
23
|
+
# station is operating/accessible. Additional to regular_hours. May overlap
|
|
24
|
+
# regular rules.
|
|
25
|
+
# @return [Array[ExceptionalPeriod]]
|
|
26
|
+
attr_accessor :exceptional_openings
|
|
27
|
+
|
|
28
|
+
# Exceptions for specified calendar dates, time-range based. Periods the
|
|
29
|
+
# station is not operating/accessible. Overwriting regular_hours and
|
|
30
|
+
# exceptional_openings.
|
|
31
|
+
# @return [Array[ExceptionalPeriod]]
|
|
32
|
+
attr_accessor :exceptional_closings
|
|
33
|
+
|
|
34
|
+
# A mapping from model property names to API property names.
|
|
35
|
+
def self.names
|
|
36
|
+
@_hash = {} if @_hash.nil?
|
|
37
|
+
@_hash['twentyfourseven'] = 'twentyfourseven'
|
|
38
|
+
@_hash['regular_hours'] = 'regular_hours'
|
|
39
|
+
@_hash['exceptional_openings'] = 'exceptional_openings'
|
|
40
|
+
@_hash['exceptional_closings'] = 'exceptional_closings'
|
|
41
|
+
@_hash
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# An array for optional fields
|
|
45
|
+
def self.optionals
|
|
46
|
+
%w[
|
|
47
|
+
regular_hours
|
|
48
|
+
exceptional_openings
|
|
49
|
+
exceptional_closings
|
|
50
|
+
]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# An array for nullable fields
|
|
54
|
+
def self.nullables
|
|
55
|
+
[]
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def initialize(twentyfourseven = nil, regular_hours = SKIP,
|
|
59
|
+
exceptional_openings = SKIP, exceptional_closings = SKIP)
|
|
60
|
+
@twentyfourseven = twentyfourseven
|
|
61
|
+
@regular_hours = regular_hours unless regular_hours == SKIP
|
|
62
|
+
@exceptional_openings = exceptional_openings unless exceptional_openings == SKIP
|
|
63
|
+
@exceptional_closings = exceptional_closings unless exceptional_closings == SKIP
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Creates an instance of the object from a hash.
|
|
67
|
+
def self.from_hash(hash)
|
|
68
|
+
return nil unless hash
|
|
69
|
+
|
|
70
|
+
# Extract variables from the hash.
|
|
71
|
+
twentyfourseven =
|
|
72
|
+
hash.key?('twentyfourseven') ? hash['twentyfourseven'] : nil
|
|
73
|
+
# Parameter is an array, so we need to iterate through it
|
|
74
|
+
regular_hours = nil
|
|
75
|
+
unless hash['regular_hours'].nil?
|
|
76
|
+
regular_hours = []
|
|
77
|
+
hash['regular_hours'].each do |structure|
|
|
78
|
+
regular_hours << (RegularHours.from_hash(structure) if structure)
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
regular_hours = SKIP unless hash.key?('regular_hours')
|
|
83
|
+
# Parameter is an array, so we need to iterate through it
|
|
84
|
+
exceptional_openings = nil
|
|
85
|
+
unless hash['exceptional_openings'].nil?
|
|
86
|
+
exceptional_openings = []
|
|
87
|
+
hash['exceptional_openings'].each do |structure|
|
|
88
|
+
exceptional_openings << (ExceptionalPeriod.from_hash(structure) if structure)
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
exceptional_openings = SKIP unless hash.key?('exceptional_openings')
|
|
93
|
+
# Parameter is an array, so we need to iterate through it
|
|
94
|
+
exceptional_closings = nil
|
|
95
|
+
unless hash['exceptional_closings'].nil?
|
|
96
|
+
exceptional_closings = []
|
|
97
|
+
hash['exceptional_closings'].each do |structure|
|
|
98
|
+
exceptional_closings << (ExceptionalPeriod.from_hash(structure) if structure)
|
|
99
|
+
end
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
exceptional_closings = SKIP unless hash.key?('exceptional_closings')
|
|
103
|
+
|
|
104
|
+
# Create object from extracted values.
|
|
105
|
+
Hours.new(twentyfourseven,
|
|
106
|
+
regular_hours,
|
|
107
|
+
exceptional_openings,
|
|
108
|
+
exceptional_closings)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Provides a human-readable string representation of the object.
|
|
112
|
+
def to_s
|
|
113
|
+
class_name = self.class.name.split('::').last
|
|
114
|
+
"<#{class_name} twentyfourseven: #{@twentyfourseven}, regular_hours: #{@regular_hours},"\
|
|
115
|
+
" exceptional_openings: #{@exceptional_openings}, exceptional_closings:"\
|
|
116
|
+
" #{@exceptional_closings}>"
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
120
|
+
def inspect
|
|
121
|
+
class_name = self.class.name.split('::').last
|
|
122
|
+
"<#{class_name} twentyfourseven: #{@twentyfourseven.inspect}, regular_hours:"\
|
|
123
|
+
" #{@regular_hours.inspect}, exceptional_openings: #{@exceptional_openings.inspect},"\
|
|
124
|
+
" exceptional_closings: #{@exceptional_closings.inspect}>"
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
end
|