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,36 @@
|
|
|
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
|
+
# The type of eMAID.
|
|
8
|
+
class TypeOfEmaidEnum
|
|
9
|
+
TYPE_OF_EMAID_ENUM = [
|
|
10
|
+
# TODO: Write general description for APP
|
|
11
|
+
APP = 'APP'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for PLUG_AND_CHARGE
|
|
14
|
+
PLUG_AND_CHARGE = 'PLUG_AND_CHARGE'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE_OF_EMAID_ENUM.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = APP)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'app' then APP
|
|
30
|
+
when 'plug_and_charge' then PLUG_AND_CHARGE
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# url.
|
|
8
|
+
class UrlEnum
|
|
9
|
+
URL_ENUM = [
|
|
10
|
+
# TODO: Write general description for ENUM_APITESTSHELLCOMNAEV
|
|
11
|
+
ENUM_APITESTSHELLCOMNAEV = 'api-test.shell.com/na/ev'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for ENUM_APISHELLCOMNAEV
|
|
14
|
+
ENUM_APISHELLCOMNAEV = 'api.shell.com/na/ev'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
URL_ENUM.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = ENUM_APITESTSHELLCOMNAEV)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'enum_apitestshellcomnaev' then ENUM_APITESTSHELLCOMNAEV
|
|
30
|
+
when 'enum_apishellcomnaev' then ENUM_APISHELLCOMNAEV
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
# V3CdrsResponse Model.
|
|
9
|
+
class V3CdrsResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [Array[CDR]]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
# Parameter is an array, so we need to iterate through it
|
|
72
|
+
data = nil
|
|
73
|
+
unless hash['data'].nil?
|
|
74
|
+
data = []
|
|
75
|
+
hash['data'].each do |structure|
|
|
76
|
+
data << (CDR.from_hash(structure) if structure)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
data = SKIP unless hash.key?('data')
|
|
81
|
+
|
|
82
|
+
# Create object from extracted values.
|
|
83
|
+
V3CdrsResponse.new(status_code,
|
|
84
|
+
timestamp,
|
|
85
|
+
status_message,
|
|
86
|
+
data)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def to_custom_timestamp
|
|
90
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a human-readable string representation of the object.
|
|
94
|
+
def to_s
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
97
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
104
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# V3CdrsResponse1 Model.
|
|
9
|
+
class V3CdrsResponse1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [CDR1]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
data = CDR1.from_hash(hash['data']) if hash['data']
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
V3CdrsResponse1.new(status_code,
|
|
75
|
+
timestamp,
|
|
76
|
+
status_message,
|
|
77
|
+
data)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def to_custom_timestamp
|
|
81
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Provides a human-readable string representation of the object.
|
|
85
|
+
def to_s
|
|
86
|
+
class_name = self.class.name.split('::').last
|
|
87
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
88
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
+
def inspect
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
95
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# V3CommandsSTARTSESSIONResponse Model.
|
|
9
|
+
class V3CommandsSTARTSESSIONResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [CommandResponse1]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
data = CommandResponse1.from_hash(hash['data']) if hash['data']
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
V3CommandsSTARTSESSIONResponse.new(status_code,
|
|
75
|
+
timestamp,
|
|
76
|
+
status_message,
|
|
77
|
+
data)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def to_custom_timestamp
|
|
81
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Provides a human-readable string representation of the object.
|
|
85
|
+
def to_s
|
|
86
|
+
class_name = self.class.name.split('::').last
|
|
87
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
88
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
+
def inspect
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
95
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# V3CommandsSTOPSESSIONResponse Model.
|
|
9
|
+
class V3CommandsSTOPSESSIONResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [CommandResponse1]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
data = CommandResponse1.from_hash(hash['data']) if hash['data']
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
V3CommandsSTOPSESSIONResponse.new(status_code,
|
|
75
|
+
timestamp,
|
|
76
|
+
status_message,
|
|
77
|
+
data)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def to_custom_timestamp
|
|
81
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Provides a human-readable string representation of the object.
|
|
85
|
+
def to_s
|
|
86
|
+
class_name = self.class.name.split('::').last
|
|
87
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
88
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
+
def inspect
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
95
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -0,0 +1,107 @@
|
|
|
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
|
+
# V3LocationsResponse Model.
|
|
9
|
+
class V3LocationsResponse < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [Array[Location]]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
# Parameter is an array, so we need to iterate through it
|
|
72
|
+
data = nil
|
|
73
|
+
unless hash['data'].nil?
|
|
74
|
+
data = []
|
|
75
|
+
hash['data'].each do |structure|
|
|
76
|
+
data << (Location.from_hash(structure) if structure)
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
data = SKIP unless hash.key?('data')
|
|
81
|
+
|
|
82
|
+
# Create object from extracted values.
|
|
83
|
+
V3LocationsResponse.new(status_code,
|
|
84
|
+
timestamp,
|
|
85
|
+
status_message,
|
|
86
|
+
data)
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def to_custom_timestamp
|
|
90
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Provides a human-readable string representation of the object.
|
|
94
|
+
def to_s
|
|
95
|
+
class_name = self.class.name.split('::').last
|
|
96
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
97
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
101
|
+
def inspect
|
|
102
|
+
class_name = self.class.name.split('::').last
|
|
103
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
104
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
# V3LocationsResponse1 Model.
|
|
9
|
+
class V3LocationsResponse1 < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# OCPI status code, 1000 for success.
|
|
14
|
+
# @return [Integer]
|
|
15
|
+
attr_accessor :status_code
|
|
16
|
+
|
|
17
|
+
# An optional status message which may help when debugging.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :status_message
|
|
20
|
+
|
|
21
|
+
# The time this message was generated.
|
|
22
|
+
# @return [DateTime]
|
|
23
|
+
attr_accessor :timestamp
|
|
24
|
+
|
|
25
|
+
# Response data object or list of objects.
|
|
26
|
+
# @return [Location1]
|
|
27
|
+
attr_accessor :data
|
|
28
|
+
|
|
29
|
+
# A mapping from model property names to API property names.
|
|
30
|
+
def self.names
|
|
31
|
+
@_hash = {} if @_hash.nil?
|
|
32
|
+
@_hash['status_code'] = 'status_code'
|
|
33
|
+
@_hash['status_message'] = 'status_message'
|
|
34
|
+
@_hash['timestamp'] = 'timestamp'
|
|
35
|
+
@_hash['data'] = 'data'
|
|
36
|
+
@_hash
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for optional fields
|
|
40
|
+
def self.optionals
|
|
41
|
+
%w[
|
|
42
|
+
status_message
|
|
43
|
+
data
|
|
44
|
+
]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# An array for nullable fields
|
|
48
|
+
def self.nullables
|
|
49
|
+
[]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def initialize(status_code = nil, timestamp = nil, status_message = SKIP,
|
|
53
|
+
data = SKIP)
|
|
54
|
+
@status_code = status_code
|
|
55
|
+
@status_message = status_message unless status_message == SKIP
|
|
56
|
+
@timestamp = timestamp
|
|
57
|
+
@data = data unless data == SKIP
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Creates an instance of the object from a hash.
|
|
61
|
+
def self.from_hash(hash)
|
|
62
|
+
return nil unless hash
|
|
63
|
+
|
|
64
|
+
# Extract variables from the hash.
|
|
65
|
+
status_code = hash.key?('status_code') ? hash['status_code'] : nil
|
|
66
|
+
timestamp = if hash.key?('timestamp')
|
|
67
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
68
|
+
end
|
|
69
|
+
status_message =
|
|
70
|
+
hash.key?('status_message') ? hash['status_message'] : SKIP
|
|
71
|
+
data = Location1.from_hash(hash['data']) if hash['data']
|
|
72
|
+
|
|
73
|
+
# Create object from extracted values.
|
|
74
|
+
V3LocationsResponse1.new(status_code,
|
|
75
|
+
timestamp,
|
|
76
|
+
status_message,
|
|
77
|
+
data)
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def to_custom_timestamp
|
|
81
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Provides a human-readable string representation of the object.
|
|
85
|
+
def to_s
|
|
86
|
+
class_name = self.class.name.split('::').last
|
|
87
|
+
"<#{class_name} status_code: #{@status_code}, status_message: #{@status_message},"\
|
|
88
|
+
" timestamp: #{@timestamp}, data: #{@data}>"
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
92
|
+
def inspect
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} status_code: #{@status_code.inspect}, status_message:"\
|
|
95
|
+
" #{@status_message.inspect}, timestamp: #{@timestamp.inspect}, data: #{@data.inspect}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|