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.
Files changed (130) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +167 -0
  4. data/bin/console +15 -0
  5. data/lib/e_mobility_vmspocpiap_is/api_helper.rb +10 -0
  6. data/lib/e_mobility_vmspocpiap_is/client.rb +138 -0
  7. data/lib/e_mobility_vmspocpiap_is/configuration.rb +176 -0
  8. data/lib/e_mobility_vmspocpiap_is/controllers/account_controller.rb +53 -0
  9. data/lib/e_mobility_vmspocpiap_is/controllers/base_controller.rb +60 -0
  10. data/lib/e_mobility_vmspocpiap_is/controllers/cd_rs_pull_controller.rb +103 -0
  11. data/lib/e_mobility_vmspocpiap_is/controllers/cd_rs_push_controller.rb +51 -0
  12. data/lib/e_mobility_vmspocpiap_is/controllers/commands_callback_controller.rb +56 -0
  13. data/lib/e_mobility_vmspocpiap_is/controllers/commands_controller.rb +102 -0
  14. data/lib/e_mobility_vmspocpiap_is/controllers/locations_pull_controller.rb +125 -0
  15. data/lib/e_mobility_vmspocpiap_is/controllers/locations_push_controller.rb +68 -0
  16. data/lib/e_mobility_vmspocpiap_is/controllers/sessions_pull_controller.rb +91 -0
  17. data/lib/e_mobility_vmspocpiap_is/controllers/sessions_push_controller.rb +74 -0
  18. data/lib/e_mobility_vmspocpiap_is/controllers/tariffs_pull_controller.rb +117 -0
  19. data/lib/e_mobility_vmspocpiap_is/controllers/tariffs_push_controller.rb +62 -0
  20. data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_error_response_exception.rb +69 -0
  21. data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_response_exception.rb +67 -0
  22. data/lib/e_mobility_vmspocpiap_is/exceptions/accounts_ocpi_unauthorized_response_exception.rb +64 -0
  23. data/lib/e_mobility_vmspocpiap_is/exceptions/api_exception.rb +21 -0
  24. data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_error_response_exception.rb +71 -0
  25. data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_response_error_exception.rb +67 -0
  26. data/lib/e_mobility_vmspocpiap_is/exceptions/ocpi_unauthorized_response_exception.rb +64 -0
  27. data/lib/e_mobility_vmspocpiap_is/exceptions/v3_commands_startsession400_error_exception.rb +67 -0
  28. data/lib/e_mobility_vmspocpiap_is/http/auth/bearer_authorization.rb +53 -0
  29. data/lib/e_mobility_vmspocpiap_is/http/auth/ocpi_authorization.rb +52 -0
  30. data/lib/e_mobility_vmspocpiap_is/http/http_call_back.rb +10 -0
  31. data/lib/e_mobility_vmspocpiap_is/http/http_method_enum.rb +10 -0
  32. data/lib/e_mobility_vmspocpiap_is/http/http_request.rb +10 -0
  33. data/lib/e_mobility_vmspocpiap_is/http/http_response.rb +10 -0
  34. data/lib/e_mobility_vmspocpiap_is/http/proxy_settings.rb +22 -0
  35. data/lib/e_mobility_vmspocpiap_is/models/account_details.rb +237 -0
  36. data/lib/e_mobility_vmspocpiap_is/models/account_details2.rb +237 -0
  37. data/lib/e_mobility_vmspocpiap_is/models/account_response.rb +98 -0
  38. data/lib/e_mobility_vmspocpiap_is/models/account_state_enum.rb +46 -0
  39. data/lib/e_mobility_vmspocpiap_is/models/account_state_reason_enum.rb +67 -0
  40. data/lib/e_mobility_vmspocpiap_is/models/add_on_fee.rb +101 -0
  41. data/lib/e_mobility_vmspocpiap_is/models/add_on_fee_type_enum.rb +52 -0
  42. data/lib/e_mobility_vmspocpiap_is/models/additional_geo_location.rb +82 -0
  43. data/lib/e_mobility_vmspocpiap_is/models/auth_method_enum.rb +40 -0
  44. data/lib/e_mobility_vmspocpiap_is/models/base_model.rb +110 -0
  45. data/lib/e_mobility_vmspocpiap_is/models/benefit.rb +181 -0
  46. data/lib/e_mobility_vmspocpiap_is/models/booking_restriction_type_enum.rb +44 -0
  47. data/lib/e_mobility_vmspocpiap_is/models/business_details.rb +84 -0
  48. data/lib/e_mobility_vmspocpiap_is/models/capability_enum.rb +88 -0
  49. data/lib/e_mobility_vmspocpiap_is/models/cdr.rb +462 -0
  50. data/lib/e_mobility_vmspocpiap_is/models/cdr1.rb +457 -0
  51. data/lib/e_mobility_vmspocpiap_is/models/cdr_dimension.rb +71 -0
  52. data/lib/e_mobility_vmspocpiap_is/models/cdr_dimension_type_enum.rb +97 -0
  53. data/lib/e_mobility_vmspocpiap_is/models/cdr_location.rb +206 -0
  54. data/lib/e_mobility_vmspocpiap_is/models/cdr_token.rb +91 -0
  55. data/lib/e_mobility_vmspocpiap_is/models/charge_type_enum.rb +52 -0
  56. data/lib/e_mobility_vmspocpiap_is/models/charging_period.rb +100 -0
  57. data/lib/e_mobility_vmspocpiap_is/models/command_response.rb +92 -0
  58. data/lib/e_mobility_vmspocpiap_is/models/command_response1.rb +91 -0
  59. data/lib/e_mobility_vmspocpiap_is/models/command_response_type_enum.rb +44 -0
  60. data/lib/e_mobility_vmspocpiap_is/models/command_result.rb +81 -0
  61. data/lib/e_mobility_vmspocpiap_is/models/command_result_type_enum.rb +64 -0
  62. data/lib/e_mobility_vmspocpiap_is/models/connector.rb +184 -0
  63. data/lib/e_mobility_vmspocpiap_is/models/connector_format_enum.rb +36 -0
  64. data/lib/e_mobility_vmspocpiap_is/models/connector_type_enum.rb +196 -0
  65. data/lib/e_mobility_vmspocpiap_is/models/day_of_week_enum.rb +56 -0
  66. data/lib/e_mobility_vmspocpiap_is/models/display_text.rb +68 -0
  67. data/lib/e_mobility_vmspocpiap_is/models/emaid.rb +137 -0
  68. data/lib/e_mobility_vmspocpiap_is/models/energy_mix.rb +127 -0
  69. data/lib/e_mobility_vmspocpiap_is/models/energy_source.rb +69 -0
  70. data/lib/e_mobility_vmspocpiap_is/models/energy_source_category_enum.rb +60 -0
  71. data/lib/e_mobility_vmspocpiap_is/models/environmental_impact.rb +68 -0
  72. data/lib/e_mobility_vmspocpiap_is/models/environmental_impact_category_enum.rb +36 -0
  73. data/lib/e_mobility_vmspocpiap_is/models/evse.rb +250 -0
  74. data/lib/e_mobility_vmspocpiap_is/models/exceptional_period.rb +84 -0
  75. data/lib/e_mobility_vmspocpiap_is/models/facility_enum.rb +108 -0
  76. data/lib/e_mobility_vmspocpiap_is/models/geo_location.rb +73 -0
  77. data/lib/e_mobility_vmspocpiap_is/models/hours.rb +127 -0
  78. data/lib/e_mobility_vmspocpiap_is/models/image.rb +114 -0
  79. data/lib/e_mobility_vmspocpiap_is/models/image_category_enum.rb +58 -0
  80. data/lib/e_mobility_vmspocpiap_is/models/location.rb +379 -0
  81. data/lib/e_mobility_vmspocpiap_is/models/location1.rb +375 -0
  82. data/lib/e_mobility_vmspocpiap_is/models/ocpi_command_response.rb +62 -0
  83. data/lib/e_mobility_vmspocpiap_is/models/ocpi_response.rb +98 -0
  84. data/lib/e_mobility_vmspocpiap_is/models/parking_direction_enum.rb +40 -0
  85. data/lib/e_mobility_vmspocpiap_is/models/parking_restriction_enum.rb +61 -0
  86. data/lib/e_mobility_vmspocpiap_is/models/parking_type_enum.rb +53 -0
  87. data/lib/e_mobility_vmspocpiap_is/models/power_type_enum.rb +48 -0
  88. data/lib/e_mobility_vmspocpiap_is/models/price.rb +80 -0
  89. data/lib/e_mobility_vmspocpiap_is/models/price_component.rb +99 -0
  90. data/lib/e_mobility_vmspocpiap_is/models/price_limit.rb +71 -0
  91. data/lib/e_mobility_vmspocpiap_is/models/product.rb +186 -0
  92. data/lib/e_mobility_vmspocpiap_is/models/publish_token_type.rb +106 -0
  93. data/lib/e_mobility_vmspocpiap_is/models/regular_hours.rb +80 -0
  94. data/lib/e_mobility_vmspocpiap_is/models/reservation_restriction_type_enum.rb +36 -0
  95. data/lib/e_mobility_vmspocpiap_is/models/session.rb +298 -0
  96. data/lib/e_mobility_vmspocpiap_is/models/session_status_enum.rb +60 -0
  97. data/lib/e_mobility_vmspocpiap_is/models/signed_data.rb +116 -0
  98. data/lib/e_mobility_vmspocpiap_is/models/signed_value.rb +85 -0
  99. data/lib/e_mobility_vmspocpiap_is/models/start_session.rb +107 -0
  100. data/lib/e_mobility_vmspocpiap_is/models/start_session_token.rb +68 -0
  101. data/lib/e_mobility_vmspocpiap_is/models/status2_enum.rb +44 -0
  102. data/lib/e_mobility_vmspocpiap_is/models/status_enum.rb +64 -0
  103. data/lib/e_mobility_vmspocpiap_is/models/status_schedule.rb +97 -0
  104. data/lib/e_mobility_vmspocpiap_is/models/stop_session.rb +70 -0
  105. data/lib/e_mobility_vmspocpiap_is/models/subscription_renewal_cadence_enum.rb +44 -0
  106. data/lib/e_mobility_vmspocpiap_is/models/tariff.rb +347 -0
  107. data/lib/e_mobility_vmspocpiap_is/models/tariff1.rb +336 -0
  108. data/lib/e_mobility_vmspocpiap_is/models/tariff_dimension_type_enum.rb +60 -0
  109. data/lib/e_mobility_vmspocpiap_is/models/tariff_element.rb +91 -0
  110. data/lib/e_mobility_vmspocpiap_is/models/tariff_restrictions.rb +310 -0
  111. data/lib/e_mobility_vmspocpiap_is/models/tariff_type_enum.rb +48 -0
  112. data/lib/e_mobility_vmspocpiap_is/models/tax_amount.rb +95 -0
  113. data/lib/e_mobility_vmspocpiap_is/models/tax_included_enum.rb +40 -0
  114. data/lib/e_mobility_vmspocpiap_is/models/token_type_enum.rb +48 -0
  115. data/lib/e_mobility_vmspocpiap_is/models/type_of_emaid_enum.rb +36 -0
  116. data/lib/e_mobility_vmspocpiap_is/models/url_enum.rb +36 -0
  117. data/lib/e_mobility_vmspocpiap_is/models/v3_cdrs_response.rb +107 -0
  118. data/lib/e_mobility_vmspocpiap_is/models/v3_cdrs_response1.rb +98 -0
  119. data/lib/e_mobility_vmspocpiap_is/models/v3_commands_startsession_response.rb +98 -0
  120. data/lib/e_mobility_vmspocpiap_is/models/v3_commands_stopsession_response.rb +98 -0
  121. data/lib/e_mobility_vmspocpiap_is/models/v3_locations_response.rb +107 -0
  122. data/lib/e_mobility_vmspocpiap_is/models/v3_locations_response1.rb +98 -0
  123. data/lib/e_mobility_vmspocpiap_is/models/v3_sessions_response.rb +107 -0
  124. data/lib/e_mobility_vmspocpiap_is/models/v3_tariffs_response.rb +107 -0
  125. data/lib/e_mobility_vmspocpiap_is/models/v3_tariffs_response1.rb +98 -0
  126. data/lib/e_mobility_vmspocpiap_is/models/vehicle_type_enum.rb +64 -0
  127. data/lib/e_mobility_vmspocpiap_is/utilities/date_time_helper.rb +11 -0
  128. data/lib/e_mobility_vmspocpiap_is/utilities/file_wrapper.rb +28 -0
  129. data/lib/e_mobility_vmspocpiap_is.rb +164 -0
  130. metadata +213 -0
@@ -0,0 +1,40 @@
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
+ # Method used for authentication.
8
+ class AuthMethodEnum
9
+ AUTH_METHOD_ENUM = [
10
+ # TODO: Write general description for AUTH_REQUEST
11
+ AUTH_REQUEST = 'AUTH_REQUEST'.freeze,
12
+
13
+ # TODO: Write general description for COMMAND
14
+ COMMAND = 'COMMAND'.freeze,
15
+
16
+ # TODO: Write general description for WHITELIST
17
+ WHITELIST = 'WHITELIST'.freeze
18
+ ].freeze
19
+
20
+ def self.validate(value)
21
+ return false if value.nil?
22
+
23
+ AUTH_METHOD_ENUM.include?(value)
24
+ end
25
+
26
+ def self.from_value(value, default_value = AUTH_REQUEST)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'auth_request' then AUTH_REQUEST
33
+ when 'command' then COMMAND
34
+ when 'whitelist' then WHITELIST
35
+ else
36
+ default_value
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,110 @@
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
+ # Base model.
8
+ # rubocop:disable all
9
+ class BaseModel < CoreLibrary::BaseModel
10
+ # Returns a Hash representation of the current object.
11
+ def to_hash
12
+ # validating the model being serialized
13
+ self.class.validate(self) if self.class.respond_to?(:validate)
14
+
15
+ hash = {}
16
+ instance_variables.each do |name|
17
+ value = instance_variable_get(name)
18
+ name = name[1..]
19
+ if name == 'additional_properties'
20
+ additional_properties = process_additional_properties(value, self.class.names)
21
+ hash.merge!(additional_properties)
22
+ else
23
+ key = self.class.names.key?(name) ? self.class.names[name] : name
24
+ optional_fields = self.class.optionals
25
+ nullable_fields = self.class.nullables
26
+ if value.nil?
27
+ next unless nullable_fields.include?(name)
28
+
29
+ if !optional_fields.include?(name) && !nullable_fields.include?(name)
30
+ raise ArgumentError,
31
+ "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
32
+ end
33
+ end
34
+
35
+ hash[key] = nil
36
+ unless value.nil?
37
+ if respond_to?("to_custom_#{name}")
38
+ if (value.instance_of? Array) || (value.instance_of? Hash)
39
+ params = [hash, key]
40
+ hash[key] = send("to_custom_#{name}", *params)
41
+ else
42
+ hash[key] = send("to_custom_#{name}")
43
+ end
44
+ elsif respond_to?("to_union_type_#{name}")
45
+ hash[key] = send("to_union_type_#{name}")
46
+ elsif value.instance_of? Array
47
+ hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
48
+ elsif value.instance_of? Hash
49
+ hash[key] = {}
50
+ value.each do |k, v|
51
+ hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
52
+ end
53
+ else
54
+ hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
55
+ end
56
+ end
57
+ end
58
+ end
59
+ hash
60
+ end
61
+
62
+ # Processes additional properties, ensuring no conflicts with existing properties.
63
+ def process_additional_properties(additional_properties, existing_prop_names)
64
+ hash = {}
65
+ additional_properties.each do |name, value|
66
+ check_for_conflict(name, existing_prop_names)
67
+
68
+ hash[name] = if value.is_a?(Array)
69
+ process_array(value)
70
+ elsif value.is_a?(Hash)
71
+ process_hash(value)
72
+ else
73
+ process_basic_value(value)
74
+ end
75
+ end
76
+ hash
77
+ end
78
+
79
+ # Checks if an additional property conflicts with a model's existing property.
80
+ def check_for_conflict(name, existing_prop_names)
81
+ return unless existing_prop_names.key?(name)
82
+
83
+ raise ArgumentError, "An additional property key, '#{name}' conflicts with one of the model's properties"
84
+ end
85
+
86
+ # Processes an array of values, recursively calling `to_hash` on BaseModel objects.
87
+ def process_array(value)
88
+ value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
89
+ end
90
+
91
+ # Processes a hash of values, recursively calling `to_hash` on BaseModel objects.
92
+ def process_hash(value)
93
+ value.transform_values do |v|
94
+ v.is_a?(BaseModel) ? v.to_hash : v
95
+ end
96
+ end
97
+
98
+ # Processes a basic value (non-array, non-hash).
99
+ def process_basic_value(value)
100
+ value.is_a?(BaseModel) ? value.to_hash : value
101
+ end
102
+
103
+ # Returns a JSON representation of the curent object.
104
+ def to_json(options = {})
105
+ hash = to_hash
106
+ hash.to_json(options)
107
+ end
108
+ end
109
+ # rubocop:enable all
110
+ end
@@ -0,0 +1,181 @@
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
+ # Benefit Model.
9
+ class Benefit < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Unique identifier for the benefit.
14
+ # @return [String]
15
+ attr_accessor :benefit_id
16
+
17
+ # Type of benefit.
18
+ # @return [String]
19
+ attr_reader :benefit_type
20
+
21
+ # Unit of the benefit.
22
+ # @return [String]
23
+ attr_reader :benefit_unit
24
+
25
+ # Name of the benefit.
26
+ # @return [String]
27
+ attr_accessor :name
28
+
29
+ # Currency code, ISO4217.
30
+ # @return [String]
31
+ attr_accessor :currency
32
+
33
+ # Priority level of the benefit.
34
+ # @return [Integer]
35
+ attr_accessor :priority
36
+
37
+ # List of CPO IDs that are included for this benefit. If specified, only
38
+ # these CPOs are eligible. If not specified along with cpos_excluded, all
39
+ # CPOs are included.
40
+ # @return [Array[String]]
41
+ attr_accessor :cpos_included
42
+
43
+ # List of CPO IDs that are excluded from this benefit. If specified, all
44
+ # CPOs except these are eligible.
45
+ # @return [Array[String]]
46
+ attr_accessor :cpos_excluded
47
+
48
+ # Initial credit value assigned to the benefit, if applicable.
49
+ # @return [Float]
50
+ attr_accessor :initial_value
51
+
52
+ # Remaining credit value associated with the benefit, reflecting what is
53
+ # left for the customer to use.
54
+ # @return [Float]
55
+ attr_accessor :remaining_value
56
+
57
+ # Date when the benefit was activated for the customer in ISO 8601 format.
58
+ # @return [DateTime]
59
+ attr_accessor :activated_on
60
+
61
+ # Expiration date of the benefit, indicating until when it remains valid in
62
+ # ISO 8601 format.
63
+ # @return [DateTime]
64
+ attr_accessor :expires_on
65
+
66
+ # A mapping from model property names to API property names.
67
+ def self.names
68
+ @_hash = {} if @_hash.nil?
69
+ @_hash['benefit_id'] = 'benefit_id'
70
+ @_hash['benefit_type'] = 'benefit_type'
71
+ @_hash['benefit_unit'] = 'benefit_unit'
72
+ @_hash['name'] = 'name'
73
+ @_hash['currency'] = 'currency'
74
+ @_hash['priority'] = 'priority'
75
+ @_hash['cpos_included'] = 'cpos_included'
76
+ @_hash['cpos_excluded'] = 'cpos_excluded'
77
+ @_hash['initial_value'] = 'initial_value'
78
+ @_hash['remaining_value'] = 'remaining_value'
79
+ @_hash['activated_on'] = 'activated_on'
80
+ @_hash['expires_on'] = 'expires_on'
81
+ @_hash
82
+ end
83
+
84
+ # An array for optional fields
85
+ def self.optionals
86
+ %w[
87
+ currency
88
+ cpos_included
89
+ cpos_excluded
90
+ initial_value
91
+ remaining_value
92
+ ]
93
+ end
94
+
95
+ # An array for nullable fields
96
+ def self.nullables
97
+ []
98
+ end
99
+
100
+ def initialize(benefit_id = nil, name = nil, priority = nil,
101
+ activated_on = nil, expires_on = nil, currency = SKIP,
102
+ cpos_included = SKIP, cpos_excluded = SKIP,
103
+ initial_value = SKIP, remaining_value = SKIP)
104
+ @benefit_id = benefit_id
105
+ @benefit_type = 'WALLET'
106
+ @benefit_unit = 'CREDIT'
107
+ @name = name
108
+ @currency = currency unless currency == SKIP
109
+ @priority = priority
110
+ @cpos_included = cpos_included unless cpos_included == SKIP
111
+ @cpos_excluded = cpos_excluded unless cpos_excluded == SKIP
112
+ @initial_value = initial_value unless initial_value == SKIP
113
+ @remaining_value = remaining_value unless remaining_value == SKIP
114
+ @activated_on = activated_on
115
+ @expires_on = expires_on
116
+ end
117
+
118
+ # Creates an instance of the object from a hash.
119
+ def self.from_hash(hash)
120
+ return nil unless hash
121
+
122
+ # Extract variables from the hash.
123
+ benefit_id = hash.key?('benefit_id') ? hash['benefit_id'] : nil
124
+ name = hash.key?('name') ? hash['name'] : nil
125
+ priority = hash.key?('priority') ? hash['priority'] : nil
126
+ activated_on = if hash.key?('activated_on')
127
+ (DateTimeHelper.from_rfc3339(hash['activated_on']) if hash['activated_on'])
128
+ end
129
+ expires_on = if hash.key?('expires_on')
130
+ (DateTimeHelper.from_rfc3339(hash['expires_on']) if hash['expires_on'])
131
+ end
132
+ currency = hash.key?('currency') ? hash['currency'] : SKIP
133
+ cpos_included = hash.key?('cpos_included') ? hash['cpos_included'] : SKIP
134
+ cpos_excluded = hash.key?('cpos_excluded') ? hash['cpos_excluded'] : SKIP
135
+ initial_value = hash.key?('initial_value') ? hash['initial_value'] : SKIP
136
+ remaining_value =
137
+ hash.key?('remaining_value') ? hash['remaining_value'] : SKIP
138
+
139
+ # Create object from extracted values.
140
+ Benefit.new(benefit_id,
141
+ name,
142
+ priority,
143
+ activated_on,
144
+ expires_on,
145
+ currency,
146
+ cpos_included,
147
+ cpos_excluded,
148
+ initial_value,
149
+ remaining_value)
150
+ end
151
+
152
+ def to_custom_activated_on
153
+ DateTimeHelper.to_rfc3339(activated_on)
154
+ end
155
+
156
+ def to_custom_expires_on
157
+ DateTimeHelper.to_rfc3339(expires_on)
158
+ end
159
+
160
+ # Provides a human-readable string representation of the object.
161
+ def to_s
162
+ class_name = self.class.name.split('::').last
163
+ "<#{class_name} benefit_id: #{@benefit_id}, benefit_type: #{@benefit_type}, benefit_unit:"\
164
+ " #{@benefit_unit}, name: #{@name}, currency: #{@currency}, priority: #{@priority},"\
165
+ " cpos_included: #{@cpos_included}, cpos_excluded: #{@cpos_excluded}, initial_value:"\
166
+ " #{@initial_value}, remaining_value: #{@remaining_value}, activated_on: #{@activated_on},"\
167
+ " expires_on: #{@expires_on}>"
168
+ end
169
+
170
+ # Provides a debugging-friendly string with detailed object information.
171
+ def inspect
172
+ class_name = self.class.name.split('::').last
173
+ "<#{class_name} benefit_id: #{@benefit_id.inspect}, benefit_type: #{@benefit_type.inspect},"\
174
+ " benefit_unit: #{@benefit_unit.inspect}, name: #{@name.inspect}, currency:"\
175
+ " #{@currency.inspect}, priority: #{@priority.inspect}, cpos_included:"\
176
+ " #{@cpos_included.inspect}, cpos_excluded: #{@cpos_excluded.inspect}, initial_value:"\
177
+ " #{@initial_value.inspect}, remaining_value: #{@remaining_value.inspect}, activated_on:"\
178
+ " #{@activated_on.inspect}, expires_on: #{@expires_on.inspect}>"
179
+ end
180
+ end
181
+ end
@@ -0,0 +1,44 @@
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
+ # Defines if a TariffElement is applicable for booking costs.
8
+ class BookingRestrictionTypeEnum
9
+ BOOKING_RESTRICTION_TYPE_ENUM = [
10
+ # TODO: Write general description for BOOKING
11
+ BOOKING = 'BOOKING'.freeze,
12
+
13
+ # TODO: Write general description for BOOKING_EXPIRES
14
+ BOOKING_EXPIRES = 'BOOKING_EXPIRES'.freeze,
15
+
16
+ # TODO: Write general description for BOOKING_CANCELLATION_FEES
17
+ BOOKING_CANCELLATION_FEES = 'BOOKING_CANCELLATION_FEES'.freeze,
18
+
19
+ # TODO: Write general description for BOOKING_OVERTIME
20
+ BOOKING_OVERTIME = 'BOOKING_OVERTIME'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ BOOKING_RESTRICTION_TYPE_ENUM.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = BOOKING)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'booking' then BOOKING
36
+ when 'booking_expires' then BOOKING_EXPIRES
37
+ when 'booking_cancellation_fees' then BOOKING_CANCELLATION_FEES
38
+ when 'booking_overtime' then BOOKING_OVERTIME
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ 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
+ module EMobilityVmspocpiapIs
7
+ # Business details of an operator, suboperator, or owner.
8
+ class BusinessDetails < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Name of the operator.
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # Link to the operator's website.
17
+ # @return [String]
18
+ attr_accessor :website
19
+
20
+ # This class references an image related to an EVSE in terms of a file name
21
+ # or url.
22
+ # Per charge point an unlimited number of images of each type is allowed.
23
+ # Recommended are at least two images where one is a network or provider
24
+ # logo and the second is a station photo.
25
+ # @return [Image]
26
+ attr_accessor :logo
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['name'] = 'name'
32
+ @_hash['website'] = 'website'
33
+ @_hash['logo'] = 'logo'
34
+ @_hash
35
+ end
36
+
37
+ # An array for optional fields
38
+ def self.optionals
39
+ %w[
40
+ website
41
+ logo
42
+ ]
43
+ end
44
+
45
+ # An array for nullable fields
46
+ def self.nullables
47
+ []
48
+ end
49
+
50
+ def initialize(name = nil, website = SKIP, logo = SKIP)
51
+ @name = name
52
+ @website = website unless website == SKIP
53
+ @logo = logo unless logo == SKIP
54
+ end
55
+
56
+ # Creates an instance of the object from a hash.
57
+ def self.from_hash(hash)
58
+ return nil unless hash
59
+
60
+ # Extract variables from the hash.
61
+ name = hash.key?('name') ? hash['name'] : nil
62
+ website = hash.key?('website') ? hash['website'] : SKIP
63
+ logo = Image.from_hash(hash['logo']) if hash['logo']
64
+
65
+ # Create object from extracted values.
66
+ BusinessDetails.new(name,
67
+ website,
68
+ logo)
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} name: #{@name}, website: #{@website}, logo: #{@logo}>"
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} name: #{@name.inspect}, website: #{@website.inspect}, logo:"\
81
+ " #{@logo.inspect}>"
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,88 @@
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 capabilities of an EVSE.
8
+ class CapabilityEnum
9
+ CAPABILITY_ENUM = [
10
+ # TODO: Write general description for CHARGING_PROFILE_CAPABLE
11
+ CHARGING_PROFILE_CAPABLE = 'CHARGING_PROFILE_CAPABLE'.freeze,
12
+
13
+ # TODO: Write general description for CHARGING_PREFERENCES_CAPABLE
14
+ CHARGING_PREFERENCES_CAPABLE = 'CHARGING_PREFERENCES_CAPABLE'.freeze,
15
+
16
+ # TODO: Write general description for CHIP_CARD_SUPPORT
17
+ CHIP_CARD_SUPPORT = 'CHIP_CARD_SUPPORT'.freeze,
18
+
19
+ # TODO: Write general description for CONTACTLESS_CARD_SUPPORT
20
+ CONTACTLESS_CARD_SUPPORT = 'CONTACTLESS_CARD_SUPPORT'.freeze,
21
+
22
+ # TODO: Write general description for CREDIT_CARD_PAYABLE
23
+ CREDIT_CARD_PAYABLE = 'CREDIT_CARD_PAYABLE'.freeze,
24
+
25
+ # TODO: Write general description for DEBIT_CARD_PAYABLE
26
+ DEBIT_CARD_PAYABLE = 'DEBIT_CARD_PAYABLE'.freeze,
27
+
28
+ # TODO: Write general description for PED_TERMINAL
29
+ PED_TERMINAL = 'PED_TERMINAL'.freeze,
30
+
31
+ # TODO: Write general description for REMOTE_START_STOP_CAPABLE
32
+ REMOTE_START_STOP_CAPABLE = 'REMOTE_START_STOP_CAPABLE'.freeze,
33
+
34
+ # TODO: Write general description for RESERVABLE
35
+ RESERVABLE = 'RESERVABLE'.freeze,
36
+
37
+ # TODO: Write general description for RFID_READER
38
+ RFID_READER = 'RFID_READER'.freeze,
39
+
40
+ # TODO: Write general description for START_SESSION_CONNECTOR_REQUIRED
41
+ START_SESSION_CONNECTOR_REQUIRED = 'START_SESSION_CONNECTOR_REQUIRED'.freeze,
42
+
43
+ # TODO: Write general description for TOKEN_GROUP_CAPABLE
44
+ TOKEN_GROUP_CAPABLE = 'TOKEN_GROUP_CAPABLE'.freeze,
45
+
46
+ # TODO: Write general description for UNLOCK_CAPABLE
47
+ UNLOCK_CAPABLE = 'UNLOCK_CAPABLE'.freeze,
48
+
49
+ # TODO: Write general description for ISO_15118_2_PLUG_AND_CHARGE
50
+ ISO_15118_2_PLUG_AND_CHARGE = 'ISO_15118_2_PLUG_AND_CHARGE'.freeze,
51
+
52
+ # TODO: Write general description for ISO_15118_20_PLUG_AND_CHARGE
53
+ ISO_15118_20_PLUG_AND_CHARGE = 'ISO_15118_20_PLUG_AND_CHARGE'.freeze
54
+ ].freeze
55
+
56
+ def self.validate(value)
57
+ return false if value.nil?
58
+
59
+ CAPABILITY_ENUM.include?(value)
60
+ end
61
+
62
+ def self.from_value(value, default_value = CHARGING_PROFILE_CAPABLE)
63
+ return default_value if value.nil?
64
+
65
+ str = value.to_s.strip
66
+
67
+ case str.downcase
68
+ when 'charging_profile_capable' then CHARGING_PROFILE_CAPABLE
69
+ when 'charging_preferences_capable' then CHARGING_PREFERENCES_CAPABLE
70
+ when 'chip_card_support' then CHIP_CARD_SUPPORT
71
+ when 'contactless_card_support' then CONTACTLESS_CARD_SUPPORT
72
+ when 'credit_card_payable' then CREDIT_CARD_PAYABLE
73
+ when 'debit_card_payable' then DEBIT_CARD_PAYABLE
74
+ when 'ped_terminal' then PED_TERMINAL
75
+ when 'remote_start_stop_capable' then REMOTE_START_STOP_CAPABLE
76
+ when 'reservable' then RESERVABLE
77
+ when 'rfid_reader' then RFID_READER
78
+ when 'start_session_connector_required' then START_SESSION_CONNECTOR_REQUIRED
79
+ when 'token_group_capable' then TOKEN_GROUP_CAPABLE
80
+ when 'unlock_capable' then UNLOCK_CAPABLE
81
+ when 'iso_15118_2_plug_and_charge' then ISO_15118_2_PLUG_AND_CHARGE
82
+ when 'iso_15118_20_plug_and_charge' then ISO_15118_20_PLUG_AND_CHARGE
83
+ else
84
+ default_value
85
+ end
86
+ end
87
+ end
88
+ end