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,48 @@
|
|
|
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 power at the connector.
|
|
8
|
+
class PowerTypeEnum
|
|
9
|
+
POWER_TYPE_ENUM = [
|
|
10
|
+
# TODO: Write general description for AC_1_PHASE
|
|
11
|
+
AC_1_PHASE = 'AC_1_PHASE'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for AC_2_PHASE
|
|
14
|
+
AC_2_PHASE = 'AC_2_PHASE'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for AC_2_PHASE_SPLIT
|
|
17
|
+
AC_2_PHASE_SPLIT = 'AC_2_PHASE_SPLIT'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for AC_3_PHASE
|
|
20
|
+
AC_3_PHASE = 'AC_3_PHASE'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for DC
|
|
23
|
+
DC = 'DC'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
POWER_TYPE_ENUM.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = AC_1_PHASE)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'ac_1_phase' then AC_1_PHASE
|
|
39
|
+
when 'ac_2_phase' then AC_2_PHASE
|
|
40
|
+
when 'ac_2_phase_split' then AC_2_PHASE_SPLIT
|
|
41
|
+
when 'ac_3_phase' then AC_3_PHASE
|
|
42
|
+
when 'dc' then DC
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Price information with tax details.
|
|
8
|
+
class Price < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Price/Cost excluding taxes.
|
|
13
|
+
# @return [Float]
|
|
14
|
+
attr_accessor :before_taxes
|
|
15
|
+
|
|
16
|
+
# All taxes that are applicable to this price and relevant to the receiver
|
|
17
|
+
# of the Session or CDR.
|
|
18
|
+
# @return [Array[TaxAmount]]
|
|
19
|
+
attr_accessor :taxes
|
|
20
|
+
|
|
21
|
+
# A mapping from model property names to API property names.
|
|
22
|
+
def self.names
|
|
23
|
+
@_hash = {} if @_hash.nil?
|
|
24
|
+
@_hash['before_taxes'] = 'before_taxes'
|
|
25
|
+
@_hash['taxes'] = 'taxes'
|
|
26
|
+
@_hash
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# An array for optional fields
|
|
30
|
+
def self.optionals
|
|
31
|
+
%w[
|
|
32
|
+
taxes
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(before_taxes = nil, taxes = SKIP)
|
|
42
|
+
@before_taxes = before_taxes
|
|
43
|
+
@taxes = taxes unless taxes == SKIP
|
|
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
|
+
before_taxes = hash.key?('before_taxes') ? hash['before_taxes'] : nil
|
|
52
|
+
# Parameter is an array, so we need to iterate through it
|
|
53
|
+
taxes = nil
|
|
54
|
+
unless hash['taxes'].nil?
|
|
55
|
+
taxes = []
|
|
56
|
+
hash['taxes'].each do |structure|
|
|
57
|
+
taxes << (TaxAmount.from_hash(structure) if structure)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
taxes = SKIP unless hash.key?('taxes')
|
|
62
|
+
|
|
63
|
+
# Create object from extracted values.
|
|
64
|
+
Price.new(before_taxes,
|
|
65
|
+
taxes)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Provides a human-readable string representation of the object.
|
|
69
|
+
def to_s
|
|
70
|
+
class_name = self.class.name.split('::').last
|
|
71
|
+
"<#{class_name} before_taxes: #{@before_taxes}, taxes: #{@taxes}>"
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
75
|
+
def inspect
|
|
76
|
+
class_name = self.class.name.split('::').last
|
|
77
|
+
"<#{class_name} before_taxes: #{@before_taxes.inspect}, taxes: #{@taxes.inspect}>"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
# A Price Component describes how a certain amount of a certain dimension
|
|
8
|
+
# being consumed translates into an amount of money owed.
|
|
9
|
+
class PriceComponent < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Defines the dimension of a tariff.
|
|
14
|
+
# @return [TariffDimensionTypeEnum]
|
|
15
|
+
attr_accessor :type
|
|
16
|
+
|
|
17
|
+
# Price per unit for this dimension. This is including or excluding taxes
|
|
18
|
+
# according to the tax_included field of the Tariff that this PriceComponent
|
|
19
|
+
# is contained in.
|
|
20
|
+
# @return [Float]
|
|
21
|
+
attr_accessor :price
|
|
22
|
+
|
|
23
|
+
# Applicable VAT percentage for this tariff dimension. If omitted, no VAT is
|
|
24
|
+
# applicable.
|
|
25
|
+
# @return [Float]
|
|
26
|
+
attr_accessor :vat
|
|
27
|
+
|
|
28
|
+
# Minimum amount to be billed. That is, the dimension will be billed in this
|
|
29
|
+
# step_size
|
|
30
|
+
# blocks. Consumed amounts are rounded up to the smallest multiple of
|
|
31
|
+
# step_size that is
|
|
32
|
+
# greater than the consumed amount. For example: if type is TIME and
|
|
33
|
+
# step_size has a
|
|
34
|
+
# value of 300, then time will be billed in blocks of 5 minutes. If 6
|
|
35
|
+
# minutes were
|
|
36
|
+
# consumed, 10 minutes (2 blocks of step_size) will be billed.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :step_size
|
|
39
|
+
|
|
40
|
+
# A mapping from model property names to API property names.
|
|
41
|
+
def self.names
|
|
42
|
+
@_hash = {} if @_hash.nil?
|
|
43
|
+
@_hash['type'] = 'type'
|
|
44
|
+
@_hash['price'] = 'price'
|
|
45
|
+
@_hash['vat'] = 'vat'
|
|
46
|
+
@_hash['step_size'] = 'step_size'
|
|
47
|
+
@_hash
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# An array for optional fields
|
|
51
|
+
def self.optionals
|
|
52
|
+
%w[
|
|
53
|
+
vat
|
|
54
|
+
]
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# An array for nullable fields
|
|
58
|
+
def self.nullables
|
|
59
|
+
[]
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def initialize(type = nil, price = nil, step_size = nil, vat = SKIP)
|
|
63
|
+
@type = type
|
|
64
|
+
@price = price
|
|
65
|
+
@vat = vat unless vat == SKIP
|
|
66
|
+
@step_size = step_size
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Creates an instance of the object from a hash.
|
|
70
|
+
def self.from_hash(hash)
|
|
71
|
+
return nil unless hash
|
|
72
|
+
|
|
73
|
+
# Extract variables from the hash.
|
|
74
|
+
type = hash.key?('type') ? hash['type'] : nil
|
|
75
|
+
price = hash.key?('price') ? hash['price'] : nil
|
|
76
|
+
step_size = hash.key?('step_size') ? hash['step_size'] : nil
|
|
77
|
+
vat = hash.key?('vat') ? hash['vat'] : SKIP
|
|
78
|
+
|
|
79
|
+
# Create object from extracted values.
|
|
80
|
+
PriceComponent.new(type,
|
|
81
|
+
price,
|
|
82
|
+
step_size,
|
|
83
|
+
vat)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Provides a human-readable string representation of the object.
|
|
87
|
+
def to_s
|
|
88
|
+
class_name = self.class.name.split('::').last
|
|
89
|
+
"<#{class_name} type: #{@type}, price: #{@price}, vat: #{@vat}, step_size: #{@step_size}>"
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
93
|
+
def inspect
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} type: #{@type.inspect}, price: #{@price.inspect}, vat: #{@vat.inspect},"\
|
|
96
|
+
" step_size: #{@step_size.inspect}>"
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
# Price limit with before and after taxes values.
|
|
8
|
+
class PriceLimit < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Price/Cost excluding taxes.
|
|
13
|
+
# @return [Float]
|
|
14
|
+
attr_accessor :before_taxes
|
|
15
|
+
|
|
16
|
+
# Price/Cost including taxes.
|
|
17
|
+
# @return [Float]
|
|
18
|
+
attr_accessor :after_taxes
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['before_taxes'] = 'before_taxes'
|
|
24
|
+
@_hash['after_taxes'] = 'after_taxes'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
after_taxes
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(before_taxes = nil, after_taxes = SKIP)
|
|
41
|
+
@before_taxes = before_taxes
|
|
42
|
+
@after_taxes = after_taxes unless after_taxes == SKIP
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Creates an instance of the object from a hash.
|
|
46
|
+
def self.from_hash(hash)
|
|
47
|
+
return nil unless hash
|
|
48
|
+
|
|
49
|
+
# Extract variables from the hash.
|
|
50
|
+
before_taxes = hash.key?('before_taxes') ? hash['before_taxes'] : nil
|
|
51
|
+
after_taxes = hash.key?('after_taxes') ? hash['after_taxes'] : SKIP
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
PriceLimit.new(before_taxes,
|
|
55
|
+
after_taxes)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Provides a human-readable string representation of the object.
|
|
59
|
+
def to_s
|
|
60
|
+
class_name = self.class.name.split('::').last
|
|
61
|
+
"<#{class_name} before_taxes: #{@before_taxes}, after_taxes: #{@after_taxes}>"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
65
|
+
def inspect
|
|
66
|
+
class_name = self.class.name.split('::').last
|
|
67
|
+
"<#{class_name} before_taxes: #{@before_taxes.inspect}, after_taxes:"\
|
|
68
|
+
" #{@after_taxes.inspect}>"
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
# List of subscription products associated with the user account.
|
|
9
|
+
class Product < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Unique identifier for the service product.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :service_product_id
|
|
16
|
+
|
|
17
|
+
# Name of the service.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :service_name
|
|
20
|
+
|
|
21
|
+
# Name of the service provider.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :service_provider_name
|
|
24
|
+
|
|
25
|
+
# Timestamp when the service was subscribed to.
|
|
26
|
+
# @return [DateTime]
|
|
27
|
+
attr_accessor :subscribed_on
|
|
28
|
+
|
|
29
|
+
# Date until which the subscription is valid.
|
|
30
|
+
# @return [DateTime]
|
|
31
|
+
attr_accessor :subscription_valid_upto
|
|
32
|
+
|
|
33
|
+
# Date of the next payment.
|
|
34
|
+
# @return [DateTime]
|
|
35
|
+
attr_accessor :subscription_next_payment
|
|
36
|
+
|
|
37
|
+
# Subscription fee amount.
|
|
38
|
+
# @return [Float]
|
|
39
|
+
attr_accessor :subscription_fee
|
|
40
|
+
|
|
41
|
+
# Currency code (ISO 4217).
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :currency
|
|
44
|
+
|
|
45
|
+
# Subscription renewal frequency.
|
|
46
|
+
# @return [SubscriptionRenewalCadenceEnum]
|
|
47
|
+
attr_accessor :subscription_renewal_cadence
|
|
48
|
+
|
|
49
|
+
# Discount value associated with the product.
|
|
50
|
+
# @return [Float]
|
|
51
|
+
attr_accessor :discount
|
|
52
|
+
|
|
53
|
+
# A mapping from model property names to API property names.
|
|
54
|
+
def self.names
|
|
55
|
+
@_hash = {} if @_hash.nil?
|
|
56
|
+
@_hash['service_product_id'] = 'service_product_id'
|
|
57
|
+
@_hash['service_name'] = 'service_name'
|
|
58
|
+
@_hash['service_provider_name'] = 'service_provider_name'
|
|
59
|
+
@_hash['subscribed_on'] = 'subscribed_on'
|
|
60
|
+
@_hash['subscription_valid_upto'] = 'subscription_valid_upto'
|
|
61
|
+
@_hash['subscription_next_payment'] = 'subscription_next_payment'
|
|
62
|
+
@_hash['subscription_fee'] = 'subscription_fee'
|
|
63
|
+
@_hash['currency'] = 'currency'
|
|
64
|
+
@_hash['subscription_renewal_cadence'] = 'subscription_renewal_cadence'
|
|
65
|
+
@_hash['discount'] = 'discount'
|
|
66
|
+
@_hash
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# An array for optional fields
|
|
70
|
+
def self.optionals
|
|
71
|
+
%w[
|
|
72
|
+
subscription_valid_upto
|
|
73
|
+
subscription_next_payment
|
|
74
|
+
subscription_fee
|
|
75
|
+
currency
|
|
76
|
+
subscription_renewal_cadence
|
|
77
|
+
]
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# An array for nullable fields
|
|
81
|
+
def self.nullables
|
|
82
|
+
[]
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def initialize(service_product_id = nil, service_name = nil,
|
|
86
|
+
service_provider_name = nil, subscribed_on = nil,
|
|
87
|
+
discount = nil, subscription_valid_upto = SKIP,
|
|
88
|
+
subscription_next_payment = SKIP, subscription_fee = SKIP,
|
|
89
|
+
currency = SKIP, subscription_renewal_cadence = SKIP)
|
|
90
|
+
@service_product_id = service_product_id
|
|
91
|
+
@service_name = service_name
|
|
92
|
+
@service_provider_name = service_provider_name
|
|
93
|
+
@subscribed_on = subscribed_on
|
|
94
|
+
@subscription_valid_upto = subscription_valid_upto unless subscription_valid_upto == SKIP
|
|
95
|
+
unless subscription_next_payment == SKIP
|
|
96
|
+
@subscription_next_payment =
|
|
97
|
+
subscription_next_payment
|
|
98
|
+
end
|
|
99
|
+
@subscription_fee = subscription_fee unless subscription_fee == SKIP
|
|
100
|
+
@currency = currency unless currency == SKIP
|
|
101
|
+
unless subscription_renewal_cadence == SKIP
|
|
102
|
+
@subscription_renewal_cadence =
|
|
103
|
+
subscription_renewal_cadence
|
|
104
|
+
end
|
|
105
|
+
@discount = discount
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Creates an instance of the object from a hash.
|
|
109
|
+
def self.from_hash(hash)
|
|
110
|
+
return nil unless hash
|
|
111
|
+
|
|
112
|
+
# Extract variables from the hash.
|
|
113
|
+
service_product_id =
|
|
114
|
+
hash.key?('service_product_id') ? hash['service_product_id'] : nil
|
|
115
|
+
service_name = hash.key?('service_name') ? hash['service_name'] : nil
|
|
116
|
+
service_provider_name =
|
|
117
|
+
hash.key?('service_provider_name') ? hash['service_provider_name'] : nil
|
|
118
|
+
subscribed_on = if hash.key?('subscribed_on')
|
|
119
|
+
(DateTimeHelper.from_rfc3339(hash['subscribed_on']) if hash['subscribed_on'])
|
|
120
|
+
end
|
|
121
|
+
discount = hash.key?('discount') ? hash['discount'] : nil
|
|
122
|
+
subscription_valid_upto = if hash.key?('subscription_valid_upto')
|
|
123
|
+
(DateTimeHelper.from_rfc3339(hash['subscription_valid_upto']) if hash['subscription_valid_upto'])
|
|
124
|
+
else
|
|
125
|
+
SKIP
|
|
126
|
+
end
|
|
127
|
+
subscription_next_payment = if hash.key?('subscription_next_payment')
|
|
128
|
+
(DateTimeHelper.from_rfc3339(hash['subscription_next_payment']) if hash['subscription_next_payment'])
|
|
129
|
+
else
|
|
130
|
+
SKIP
|
|
131
|
+
end
|
|
132
|
+
subscription_fee =
|
|
133
|
+
hash.key?('subscription_fee') ? hash['subscription_fee'] : SKIP
|
|
134
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
135
|
+
subscription_renewal_cadence =
|
|
136
|
+
hash.key?('subscription_renewal_cadence') ? hash['subscription_renewal_cadence'] : SKIP
|
|
137
|
+
|
|
138
|
+
# Create object from extracted values.
|
|
139
|
+
Product.new(service_product_id,
|
|
140
|
+
service_name,
|
|
141
|
+
service_provider_name,
|
|
142
|
+
subscribed_on,
|
|
143
|
+
discount,
|
|
144
|
+
subscription_valid_upto,
|
|
145
|
+
subscription_next_payment,
|
|
146
|
+
subscription_fee,
|
|
147
|
+
currency,
|
|
148
|
+
subscription_renewal_cadence)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def to_custom_subscribed_on
|
|
152
|
+
DateTimeHelper.to_rfc3339(subscribed_on)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
def to_custom_subscription_valid_upto
|
|
156
|
+
DateTimeHelper.to_rfc3339(subscription_valid_upto)
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
def to_custom_subscription_next_payment
|
|
160
|
+
DateTimeHelper.to_rfc3339(subscription_next_payment)
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Provides a human-readable string representation of the object.
|
|
164
|
+
def to_s
|
|
165
|
+
class_name = self.class.name.split('::').last
|
|
166
|
+
"<#{class_name} service_product_id: #{@service_product_id}, service_name: #{@service_name},"\
|
|
167
|
+
" service_provider_name: #{@service_provider_name}, subscribed_on: #{@subscribed_on},"\
|
|
168
|
+
" subscription_valid_upto: #{@subscription_valid_upto}, subscription_next_payment:"\
|
|
169
|
+
" #{@subscription_next_payment}, subscription_fee: #{@subscription_fee}, currency:"\
|
|
170
|
+
" #{@currency}, subscription_renewal_cadence: #{@subscription_renewal_cadence}, discount:"\
|
|
171
|
+
" #{@discount}>"
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
175
|
+
def inspect
|
|
176
|
+
class_name = self.class.name.split('::').last
|
|
177
|
+
"<#{class_name} service_product_id: #{@service_product_id.inspect}, service_name:"\
|
|
178
|
+
" #{@service_name.inspect}, service_provider_name: #{@service_provider_name.inspect},"\
|
|
179
|
+
" subscribed_on: #{@subscribed_on.inspect}, subscription_valid_upto:"\
|
|
180
|
+
" #{@subscription_valid_upto.inspect}, subscription_next_payment:"\
|
|
181
|
+
" #{@subscription_next_payment.inspect}, subscription_fee: #{@subscription_fee.inspect},"\
|
|
182
|
+
" currency: #{@currency.inspect}, subscription_renewal_cadence:"\
|
|
183
|
+
" #{@subscription_renewal_cadence.inspect}, discount: #{@discount.inspect}>"
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
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 the set of values that identify a token to which a Location might be
|
|
8
|
+
# published. At least one of the following fields SHALL be set: uid,
|
|
9
|
+
# visual_number, or group_id. When uid is set, type SHALL also be set. When
|
|
10
|
+
# visual_number is set, issuer SHALL also be set.
|
|
11
|
+
class PublishTokenType < BaseModel
|
|
12
|
+
SKIP = Object.new
|
|
13
|
+
private_constant :SKIP
|
|
14
|
+
|
|
15
|
+
# Unique ID by which this Token can be identified.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :uid
|
|
18
|
+
|
|
19
|
+
# The type of token.
|
|
20
|
+
# @return [TokenTypeEnum]
|
|
21
|
+
attr_accessor :type
|
|
22
|
+
|
|
23
|
+
# Visual readable number/identification as printed on the Token (RFID card).
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :visual_number
|
|
26
|
+
|
|
27
|
+
# Issuing company, most of the times the name of the company printed on the
|
|
28
|
+
# token (RFID card), not necessarily the eMSP.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :issuer
|
|
31
|
+
|
|
32
|
+
# This ID groups a couple of tokens. This can be used to make two or more
|
|
33
|
+
# tokens work as one.
|
|
34
|
+
# @return [String]
|
|
35
|
+
attr_accessor :group_id
|
|
36
|
+
|
|
37
|
+
# A mapping from model property names to API property names.
|
|
38
|
+
def self.names
|
|
39
|
+
@_hash = {} if @_hash.nil?
|
|
40
|
+
@_hash['uid'] = 'uid'
|
|
41
|
+
@_hash['type'] = 'type'
|
|
42
|
+
@_hash['visual_number'] = 'visual_number'
|
|
43
|
+
@_hash['issuer'] = 'issuer'
|
|
44
|
+
@_hash['group_id'] = 'group_id'
|
|
45
|
+
@_hash
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for optional fields
|
|
49
|
+
def self.optionals
|
|
50
|
+
%w[
|
|
51
|
+
uid
|
|
52
|
+
type
|
|
53
|
+
visual_number
|
|
54
|
+
issuer
|
|
55
|
+
group_id
|
|
56
|
+
]
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# An array for nullable fields
|
|
60
|
+
def self.nullables
|
|
61
|
+
[]
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def initialize(uid = SKIP, type = SKIP, visual_number = SKIP, issuer = SKIP,
|
|
65
|
+
group_id = SKIP)
|
|
66
|
+
@uid = uid unless uid == SKIP
|
|
67
|
+
@type = type unless type == SKIP
|
|
68
|
+
@visual_number = visual_number unless visual_number == SKIP
|
|
69
|
+
@issuer = issuer unless issuer == SKIP
|
|
70
|
+
@group_id = group_id unless group_id == SKIP
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Creates an instance of the object from a hash.
|
|
74
|
+
def self.from_hash(hash)
|
|
75
|
+
return nil unless hash
|
|
76
|
+
|
|
77
|
+
# Extract variables from the hash.
|
|
78
|
+
uid = hash.key?('uid') ? hash['uid'] : SKIP
|
|
79
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
80
|
+
visual_number = hash.key?('visual_number') ? hash['visual_number'] : SKIP
|
|
81
|
+
issuer = hash.key?('issuer') ? hash['issuer'] : SKIP
|
|
82
|
+
group_id = hash.key?('group_id') ? hash['group_id'] : SKIP
|
|
83
|
+
|
|
84
|
+
# Create object from extracted values.
|
|
85
|
+
PublishTokenType.new(uid,
|
|
86
|
+
type,
|
|
87
|
+
visual_number,
|
|
88
|
+
issuer,
|
|
89
|
+
group_id)
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a human-readable string representation of the object.
|
|
93
|
+
def to_s
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} uid: #{@uid}, type: #{@type}, visual_number: #{@visual_number}, issuer:"\
|
|
96
|
+
" #{@issuer}, group_id: #{@group_id}>"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
100
|
+
def inspect
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} uid: #{@uid.inspect}, type: #{@type.inspect}, visual_number:"\
|
|
103
|
+
" #{@visual_number.inspect}, issuer: #{@issuer.inspect}, group_id: #{@group_id.inspect}>"
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
@@ -0,0 +1,80 @@
|
|
|
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
|
+
# Regular recurring operation or access hours.
|
|
8
|
+
class RegularHours < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Number of day in the week, from Monday (1) till Sunday (7).
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
attr_accessor :weekday
|
|
15
|
+
|
|
16
|
+
# Begin of the regular period, in local time, given in hours and minutes.
|
|
17
|
+
# Must be in 24h format with leading zeros. Example "18:15".
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :period_begin
|
|
20
|
+
|
|
21
|
+
# End of the regular period, in local time, syntax as for period_begin. Must
|
|
22
|
+
# be later than period_begin.
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :period_end
|
|
25
|
+
|
|
26
|
+
# A mapping from model property names to API property names.
|
|
27
|
+
def self.names
|
|
28
|
+
@_hash = {} if @_hash.nil?
|
|
29
|
+
@_hash['weekday'] = 'weekday'
|
|
30
|
+
@_hash['period_begin'] = 'period_begin'
|
|
31
|
+
@_hash['period_end'] = 'period_end'
|
|
32
|
+
@_hash
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for optional fields
|
|
36
|
+
def self.optionals
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# An array for nullable fields
|
|
41
|
+
def self.nullables
|
|
42
|
+
[]
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def initialize(weekday = nil, period_begin = nil, period_end = nil)
|
|
46
|
+
@weekday = weekday
|
|
47
|
+
@period_begin = period_begin
|
|
48
|
+
@period_end = period_end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Creates an instance of the object from a hash.
|
|
52
|
+
def self.from_hash(hash)
|
|
53
|
+
return nil unless hash
|
|
54
|
+
|
|
55
|
+
# Extract variables from the hash.
|
|
56
|
+
weekday = hash.key?('weekday') ? hash['weekday'] : nil
|
|
57
|
+
period_begin = hash.key?('period_begin') ? hash['period_begin'] : nil
|
|
58
|
+
period_end = hash.key?('period_end') ? hash['period_end'] : nil
|
|
59
|
+
|
|
60
|
+
# Create object from extracted values.
|
|
61
|
+
RegularHours.new(weekday,
|
|
62
|
+
period_begin,
|
|
63
|
+
period_end)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Provides a human-readable string representation of the object.
|
|
67
|
+
def to_s
|
|
68
|
+
class_name = self.class.name.split('::').last
|
|
69
|
+
"<#{class_name} weekday: #{@weekday}, period_begin: #{@period_begin}, period_end:"\
|
|
70
|
+
" #{@period_end}>"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
74
|
+
def inspect
|
|
75
|
+
class_name = self.class.name.split('::').last
|
|
76
|
+
"<#{class_name} weekday: #{@weekday.inspect}, period_begin: #{@period_begin.inspect},"\
|
|
77
|
+
" period_end: #{@period_end.inspect}>"
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|