ev-recharge-sdk 1.3.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +91 -25
  4. data/bin/console +15 -0
  5. data/lib/shell_ev/api_helper.rb +2 -2
  6. data/lib/shell_ev/client.rb +15 -4
  7. data/lib/shell_ev/configuration.rb +88 -15
  8. data/lib/shell_ev/controllers/base_controller.rb +3 -9
  9. data/lib/shell_ev/controllers/charging_controller.rb +19 -18
  10. data/lib/shell_ev/controllers/locations_controller.rb +48 -50
  11. data/lib/shell_ev/controllers/o_auth_authorization_controller.rb +5 -5
  12. data/lib/shell_ev/exceptions/api_exception.rb +13 -2
  13. data/lib/shell_ev/exceptions/bad_request_exception.rb +20 -5
  14. data/lib/shell_ev/exceptions/internal_server_error_exception.rb +21 -5
  15. data/lib/shell_ev/exceptions/not_found_exception.rb +20 -5
  16. data/lib/shell_ev/exceptions/o_auth_provider_exception.rb +21 -5
  17. data/lib/shell_ev/exceptions/serviceunavailable_exception.rb +20 -5
  18. data/lib/shell_ev/exceptions/too_many_requests_exception.rb +20 -5
  19. data/lib/shell_ev/exceptions/unauthorized_exception.rb +20 -5
  20. data/lib/shell_ev/exceptions/v2_charge_session_retrieve404_error_exception.rb +67 -0
  21. data/lib/shell_ev/exceptions/v2_charge_session_start404_error_exception.rb +67 -0
  22. data/lib/shell_ev/exceptions/v2_charge_session_stop404_error_exception.rb +67 -0
  23. data/lib/shell_ev/http/auth/o_auth2.rb +18 -3
  24. data/lib/shell_ev/http/http_call_back.rb +2 -2
  25. data/lib/shell_ev/http/http_method_enum.rb +2 -2
  26. data/lib/shell_ev/http/http_request.rb +2 -2
  27. data/lib/shell_ev/http/http_response.rb +2 -2
  28. data/lib/shell_ev/http/proxy_settings.rb +22 -0
  29. data/lib/shell_ev/models/accessibility_status_enum.rb +17 -2
  30. data/lib/shell_ev/models/{accessibility.rb → accessibility_v2.rb} +17 -14
  31. data/lib/shell_ev/models/active_response200_json.rb +15 -2
  32. data/lib/shell_ev/models/active_response200_json_status_enum.rb +15 -2
  33. data/lib/shell_ev/models/address.rb +16 -2
  34. data/lib/shell_ev/models/bad_request_err_msg.rb +16 -2
  35. data/lib/shell_ev/models/base_model.rb +2 -2
  36. data/lib/shell_ev/models/charge_error.rb +14 -2
  37. data/lib/shell_ev/models/charge_retrieve_state.rb +14 -2
  38. data/lib/shell_ev/models/chargesession_start_body.rb +15 -2
  39. data/lib/shell_ev/models/connector_types_enum.rb +100 -0
  40. data/lib/shell_ev/models/connector_v2.rb +95 -0
  41. data/lib/shell_ev/models/connector_vo_connector_type_enum.rb +31 -2
  42. data/lib/shell_ev/models/connector_vo_updated_by_enum.rb +17 -2
  43. data/lib/shell_ev/models/coordinates.rb +14 -2
  44. data/lib/shell_ev/models/coordinates1.rb +81 -0
  45. data/lib/shell_ev/models/data_active.rb +19 -2
  46. data/lib/shell_ev/models/data_retrieve.rb +19 -2
  47. data/lib/shell_ev/models/day_of_week_enum.rb +56 -0
  48. data/lib/shell_ev/models/electrical_properties_power_type_enum.rb +16 -2
  49. data/lib/shell_ev/models/{electrical_properties.rb → electrical_properties_v2.rb} +22 -8
  50. data/lib/shell_ev/models/evse_status_enum.rb +44 -0
  51. data/lib/shell_ev/models/{evse_vo.rb → evse_v2.rb} +45 -38
  52. data/lib/shell_ev/models/evse_vo_authorization_methods_enum.rb +16 -2
  53. data/lib/shell_ev/models/evse_vo_status_enum.rb +17 -2
  54. data/lib/shell_ev/models/get_charge_session_retrieve_response200_json.rb +15 -2
  55. data/lib/shell_ev/models/get_charge_session_retrieve_response200_json_status_enum.rb +15 -2
  56. data/lib/shell_ev/models/get_ev_locations_authorization_methods_enum.rb +16 -2
  57. data/lib/shell_ev/models/get_ev_locations_connector_types_enum.rb +31 -2
  58. data/lib/shell_ev/models/get_ev_locations_evse_status_enum.rb +17 -2
  59. data/lib/shell_ev/models/inline_response202.rb +17 -6
  60. data/lib/shell_ev/models/inline_response2021.rb +14 -2
  61. data/lib/shell_ev/models/inline_response2021_status_enum.rb +15 -2
  62. data/lib/shell_ev/models/inline_response202_data.rb +14 -2
  63. data/lib/shell_ev/models/inline_response202_status_enum.rb +15 -2
  64. data/lib/shell_ev/models/internal_error_object.rb +15 -2
  65. data/lib/shell_ev/models/{location_respone_object.rb → location_respone_object_v2.rb} +61 -30
  66. data/lib/shell_ev/models/locations_markers_authorization_methods_enum.rb +16 -2
  67. data/lib/shell_ev/models/locations_markers_connector_types_enum.rb +31 -2
  68. data/lib/shell_ev/models/locations_markers_evse_status_enum.rb +17 -2
  69. data/lib/shell_ev/models/multi_location_marker.rb +22 -5
  70. data/lib/shell_ev/models/multi_location_marker_v2.rb +126 -0
  71. data/lib/shell_ev/models/nearby_locations_authorization_methods_enum.rb +16 -2
  72. data/lib/shell_ev/models/nearby_locations_connector_types_enum.rb +31 -2
  73. data/lib/shell_ev/models/nearby_locations_evse_status_enum.rb +17 -2
  74. data/lib/shell_ev/models/not_found_err_msg.rb +16 -2
  75. data/lib/shell_ev/models/o_auth_provider_error_enum.rb +19 -2
  76. data/lib/shell_ev/models/o_auth_token.rb +2 -2
  77. data/lib/shell_ev/models/opening_hours_object.rb +17 -3
  78. data/lib/shell_ev/models/opening_hours_object_week_day_enum.rb +20 -2
  79. data/lib/shell_ev/models/power_range.rb +68 -0
  80. data/lib/shell_ev/models/price_component.rb +86 -0
  81. data/lib/shell_ev/models/ratelimit_err_msg.rb +16 -2
  82. data/lib/shell_ev/models/{response.rb → response_v2.rb} +22 -9
  83. data/lib/shell_ev/models/restrictions.rb +183 -0
  84. data/lib/shell_ev/models/search_by_id_connector.rb +115 -0
  85. data/lib/shell_ev/models/search_by_id_evse.rb +145 -0
  86. data/lib/shell_ev/models/search_by_id_location_respone.rb +196 -0
  87. data/lib/shell_ev/models/search_by_id_response.rb +91 -0
  88. data/lib/shell_ev/models/serviceunavailable_err_msg.rb +16 -2
  89. data/lib/shell_ev/models/single_location_marker.rb +27 -6
  90. data/lib/shell_ev/models/single_location_marker_authorization_methods_items_enum.rb +16 -2
  91. data/lib/shell_ev/models/single_location_marker_response.rb +15 -2
  92. data/lib/shell_ev/models/single_location_marker_response_v2.rb +94 -0
  93. data/lib/shell_ev/models/single_location_marker_status_enum.rb +17 -2
  94. data/lib/shell_ev/models/single_location_marker_v2.rb +157 -0
  95. data/lib/shell_ev/models/tariff.rb +20 -3
  96. data/lib/shell_ev/models/tariff_alt_text.rb +68 -0
  97. data/lib/shell_ev/models/tariff_element.rb +80 -0
  98. data/lib/shell_ev/models/tariff_type_enum.rb +44 -0
  99. data/lib/shell_ev/models/tariff_v2.rb +226 -0
  100. data/lib/shell_ev/models/tariff_vo_updated_by_enum.rb +17 -2
  101. data/lib/shell_ev/models/type_enum.rb +44 -0
  102. data/lib/shell_ev/models/unauthorized_err_msg.rb +16 -2
  103. data/lib/shell_ev/utilities/date_time_helper.rb +2 -2
  104. data/lib/shell_ev/utilities/file_wrapper.rb +16 -4
  105. data/lib/shell_ev/utilities/union_type_lookup.rb +19 -2
  106. data/lib/shell_ev.rb +34 -10
  107. data/test/controllers/controller_test_base.rb +5 -10
  108. data/test/controllers/test_charging_controller.rb +7 -11
  109. data/test/controllers/test_locations_controller.rb +8 -11
  110. data/test/http_response_catcher.rb +3 -3
  111. metadata +38 -15
  112. data/lib/shell_ev/models/connector_vo.rb +0 -131
  113. data/lib/shell_ev/models/tariff_vo.rb +0 -107
@@ -1,17 +1,17 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Each Location will contain one or more EVSEs (Electric Vehicle Supply
8
8
  # Equipment). Each EVSE is capable of charging one car at a time.
9
- class EvseVO < BaseModel
9
+ class EvseV2 < BaseModel
10
10
  SKIP = Object.new
11
11
  private_constant :SKIP
12
12
 
13
13
  # Internal identifier used to refer to single individual EVSE unit.
14
- # @return [Integer]
14
+ # @return [String]
15
15
  attr_accessor :uid
16
16
 
17
17
  # Identifier of the Evse as given by the Operator, unique for that Operator
@@ -26,27 +26,23 @@ module ShellEv
26
26
  # @return [EvseVOStatusEnum]
27
27
  attr_accessor :status
28
28
 
29
- # List of all connectors available on this EVSE unit.
30
- # @return [Array[ConnectorVO]]
31
- attr_accessor :connectors
32
-
33
- # Methods that can be used to Authorize sessions on this EVSE
34
- # @return [EvseVOAuthorizationMethodsEnum]
35
- attr_accessor :authorization_methods
36
-
37
29
  # ISO8601-compliant UTC datetime of the last update of the EVSE
38
30
  # @return [String]
39
31
  attr_accessor :updated
40
32
 
41
- # optional ISO8601-compliant UTC deletion timestamp of the Evse
42
- # @return [String]
43
- attr_accessor :deleted
44
-
45
33
  # An optional number/string printed on the outside of the EVSE for visual
46
34
  # identification
47
35
  # @return [String]
48
36
  attr_accessor :physical_reference
49
37
 
38
+ # List of all connectors available on this EVSE unit.
39
+ # @return [Array[ConnectorV2]]
40
+ attr_accessor :connectors
41
+
42
+ # Methods that can be used to Authorize sessions on this EVSE
43
+ # @return [Array[SingleLocationMarkerAuthorizationMethodsItemsEnum]]
44
+ attr_accessor :authorization_methods
45
+
50
46
  # A mapping from model property names to API property names.
51
47
  def self.names
52
48
  @_hash = {} if @_hash.nil?
@@ -54,11 +50,10 @@ module ShellEv
54
50
  @_hash['external_id'] = 'externalId'
55
51
  @_hash['evse_id'] = 'evseId'
56
52
  @_hash['status'] = 'status'
57
- @_hash['connectors'] = 'connectors'
58
- @_hash['authorization_methods'] = 'authorizationMethods'
59
53
  @_hash['updated'] = 'updated'
60
- @_hash['deleted'] = 'deleted'
61
54
  @_hash['physical_reference'] = 'physicalReference'
55
+ @_hash['connectors'] = 'connectors'
56
+ @_hash['authorization_methods'] = 'authorizationMethods'
62
57
  @_hash
63
58
  end
64
59
 
@@ -69,11 +64,10 @@ module ShellEv
69
64
  external_id
70
65
  evse_id
71
66
  status
72
- connectors
73
- authorization_methods
74
67
  updated
75
- deleted
76
68
  physical_reference
69
+ connectors
70
+ authorization_methods
77
71
  ]
78
72
  end
79
73
 
@@ -83,18 +77,16 @@ module ShellEv
83
77
  end
84
78
 
85
79
  def initialize(uid = SKIP, external_id = SKIP, evse_id = SKIP,
86
- status = SKIP, connectors = SKIP,
87
- authorization_methods = SKIP, updated = SKIP, deleted = SKIP,
88
- physical_reference = SKIP)
80
+ status = SKIP, updated = SKIP, physical_reference = SKIP,
81
+ connectors = SKIP, authorization_methods = SKIP)
89
82
  @uid = uid unless uid == SKIP
90
83
  @external_id = external_id unless external_id == SKIP
91
84
  @evse_id = evse_id unless evse_id == SKIP
92
85
  @status = status unless status == SKIP
93
- @connectors = connectors unless connectors == SKIP
94
- @authorization_methods = authorization_methods unless authorization_methods == SKIP
95
86
  @updated = updated unless updated == SKIP
96
- @deleted = deleted unless deleted == SKIP
97
87
  @physical_reference = physical_reference unless physical_reference == SKIP
88
+ @connectors = connectors unless connectors == SKIP
89
+ @authorization_methods = authorization_methods unless authorization_methods == SKIP
98
90
  end
99
91
 
100
92
  # Creates an instance of the object from a hash.
@@ -106,33 +98,48 @@ module ShellEv
106
98
  external_id = hash.key?('externalId') ? hash['externalId'] : SKIP
107
99
  evse_id = hash.key?('evseId') ? hash['evseId'] : SKIP
108
100
  status = hash.key?('status') ? hash['status'] : SKIP
101
+ updated = hash.key?('updated') ? hash['updated'] : SKIP
102
+ physical_reference =
103
+ hash.key?('physicalReference') ? hash['physicalReference'] : SKIP
109
104
  # Parameter is an array, so we need to iterate through it
110
105
  connectors = nil
111
106
  unless hash['connectors'].nil?
112
107
  connectors = []
113
108
  hash['connectors'].each do |structure|
114
- connectors << (ConnectorVO.from_hash(structure) if structure)
109
+ connectors << (ConnectorV2.from_hash(structure) if structure)
115
110
  end
116
111
  end
117
112
 
118
113
  connectors = SKIP unless hash.key?('connectors')
119
114
  authorization_methods =
120
115
  hash.key?('authorizationMethods') ? hash['authorizationMethods'] : SKIP
121
- updated = hash.key?('updated') ? hash['updated'] : SKIP
122
- deleted = hash.key?('deleted') ? hash['deleted'] : SKIP
123
- physical_reference =
124
- hash.key?('physicalReference') ? hash['physicalReference'] : SKIP
125
116
 
126
117
  # Create object from extracted values.
127
- EvseVO.new(uid,
118
+ EvseV2.new(uid,
128
119
  external_id,
129
120
  evse_id,
130
121
  status,
131
- connectors,
132
- authorization_methods,
133
122
  updated,
134
- deleted,
135
- physical_reference)
123
+ physical_reference,
124
+ connectors,
125
+ authorization_methods)
126
+ end
127
+
128
+ # Provides a human-readable string representation of the object.
129
+ def to_s
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} uid: #{@uid}, external_id: #{@external_id}, evse_id: #{@evse_id}, status:"\
132
+ " #{@status}, updated: #{@updated}, physical_reference: #{@physical_reference}, connectors:"\
133
+ " #{@connectors}, authorization_methods: #{@authorization_methods}>"
134
+ end
135
+
136
+ # Provides a debugging-friendly string with detailed object information.
137
+ def inspect
138
+ class_name = self.class.name.split('::').last
139
+ "<#{class_name} uid: #{@uid.inspect}, external_id: #{@external_id.inspect}, evse_id:"\
140
+ " #{@evse_id.inspect}, status: #{@status.inspect}, updated: #{@updated.inspect},"\
141
+ " physical_reference: #{@physical_reference.inspect}, connectors: #{@connectors.inspect},"\
142
+ " authorization_methods: #{@authorization_methods.inspect}>"
136
143
  end
137
144
  end
138
145
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Methods that can be used to Authorize sessions on this EVSE
@@ -22,5 +22,19 @@ module ShellEv
22
22
 
23
23
  EVSE_VO_AUTHORIZATION_METHODS_ENUM.include?(value)
24
24
  end
25
+
26
+ def self.from_value(value, default_value = NEWMOTIONAPP)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'newmotionapp' then NEWMOTIONAPP
33
+ when 'rfidtoken' then RFIDTOKEN
34
+ when 'pnc' then PNC
35
+ else
36
+ default_value
37
+ end
38
+ end
25
39
  end
26
40
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # The current status of the EVSE units availability
@@ -25,5 +25,20 @@ module ShellEv
25
25
 
26
26
  EVSE_VO_STATUS_ENUM.include?(value)
27
27
  end
28
+
29
+ def self.from_value(value, default_value = AVAILABLE)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'available' then AVAILABLE
36
+ when 'occupied' then OCCUPIED
37
+ when 'unavailable' then UNAVAILABLE
38
+ when 'unknown' then UNKNOWN
39
+ else
40
+ default_value
41
+ end
42
+ end
28
43
  end
29
44
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # GetChargeSessionRetrieveResponse200Json Model.
@@ -74,5 +74,18 @@ module ShellEv
74
74
  status,
75
75
  data)
76
76
  end
77
+
78
+ # Provides a human-readable string representation of the object.
79
+ def to_s
80
+ class_name = self.class.name.split('::').last
81
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}>"
82
+ end
83
+
84
+ # Provides a debugging-friendly string with detailed object information.
85
+ def inspect
86
+ class_name = self.class.name.split('::').last
87
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
88
+ " #{@data.inspect}>"
89
+ end
77
90
  end
78
91
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Indicates overall status of the request
@@ -19,5 +19,18 @@ module ShellEv
19
19
 
20
20
  GET_CHARGE_SESSION_RETRIEVE_RESPONSE200_JSON_STATUS_ENUM.include?(value)
21
21
  end
22
+
23
+ def self.from_value(value, default_value = SUCCESS)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'success' then SUCCESS
30
+ when 'failed' then FAILED
31
+ else
32
+ default_value
33
+ end
34
+ end
22
35
  end
23
36
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Filter by Locations that support the given Authorization Methods
@@ -22,5 +22,19 @@ module ShellEv
22
22
 
23
23
  GET_EV_LOCATIONS_AUTHORIZATION_METHODS_ENUM.include?(value)
24
24
  end
25
+
26
+ def self.from_value(value, default_value = NEWMOTIONAPP)
27
+ return default_value if value.nil?
28
+
29
+ str = value.to_s.strip
30
+
31
+ case str.downcase
32
+ when 'newmotionapp' then NEWMOTIONAPP
33
+ when 'rfidtoken' then RFIDTOKEN
34
+ when 'pnc' then PNC
35
+ else
36
+ default_value
37
+ end
38
+ end
25
39
  end
26
40
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Filter by Locations that have Connectors with the set of Connector Types
@@ -67,5 +67,34 @@ module ShellEv
67
67
 
68
68
  GET_EV_LOCATIONS_CONNECTOR_TYPES_ENUM.include?(value)
69
69
  end
70
+
71
+ def self.from_value(value, default_value = AVCON)
72
+ return default_value if value.nil?
73
+
74
+ str = value.to_s.strip
75
+
76
+ case str.downcase
77
+ when 'avcon' then AVCON
78
+ when 'domestic' then DOMESTIC
79
+ when 'industrial2pdc' then INDUSTRIAL2PDC
80
+ when 'industrialpneac' then INDUSTRIALPNEAC
81
+ when 'industrial3peac' then INDUSTRIAL3PEAC
82
+ when 'industrial3penac' then INDUSTRIAL3PENAC
83
+ when 'type1' then TYPE1
84
+ when 'type1combo' then TYPE1COMBO
85
+ when 'type2' then TYPE2
86
+ when 'type2combo' then TYPE2COMBO
87
+ when 'type3' then TYPE3
88
+ when 'lpi' then LPI
89
+ when 'nema520' then NEMA520
90
+ when 'saej1772' then SAEJ1772
91
+ when 'spi' then SPI
92
+ when 'tepcochademo' then TEPCOCHADEMO
93
+ when 'tesla' then TESLA
94
+ when 'unspecified' then UNSPECIFIED
95
+ else
96
+ default_value
97
+ end
98
+ end
70
99
  end
71
100
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Filter by Locations that have the given status
@@ -25,5 +25,20 @@ module ShellEv
25
25
 
26
26
  GET_EV_LOCATIONS_EVSE_STATUS_ENUM.include?(value)
27
27
  end
28
+
29
+ def self.from_value(value, default_value = AVAILABLE)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'available' then AVAILABLE
36
+ when 'occupied' then OCCUPIED
37
+ when 'unavailable' then UNAVAILABLE
38
+ when 'unknown' then UNKNOWN
39
+ else
40
+ default_value
41
+ end
42
+ end
28
43
  end
29
44
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # InlineResponse202 Model.
@@ -14,13 +14,11 @@ module ShellEv
14
14
  # @return [UUID | String]
15
15
  attr_accessor :request_id
16
16
 
17
- # Mandatory UUID (according to RFC 4122 standards) for requests and
18
- # responses. This will be played back in the response from the request.
17
+ # Indicates overall status of the request
19
18
  # @return [GetChargeSessionRetrieveResponse200JsonStatusEnum]
20
19
  attr_accessor :status
21
20
 
22
- # Mandatory UUID (according to RFC 4122 standards) for requests and
23
- # responses. This will be played back in the response from the request.
21
+ # Indicates overall status of the request
24
22
  # @return [Array[InlineResponse202Data]]
25
23
  attr_accessor :data
26
24
 
@@ -72,5 +70,18 @@ module ShellEv
72
70
  status,
73
71
  data)
74
72
  end
73
+
74
+ # Provides a human-readable string representation of the object.
75
+ def to_s
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} request_id: #{@request_id}, status: #{@status}, data: #{@data}>"
78
+ end
79
+
80
+ # Provides a debugging-friendly string with detailed object information.
81
+ def inspect
82
+ class_name = self.class.name.split('::').last
83
+ "<#{class_name} request_id: #{@request_id.inspect}, status: #{@status.inspect}, data:"\
84
+ " #{@data.inspect}>"
85
+ end
75
86
  end
76
87
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # InlineResponse2021 Model.
@@ -54,5 +54,17 @@ module ShellEv
54
54
  InlineResponse2021.new(request_id,
55
55
  status)
56
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} request_id: #{@request_id}, status: #{@status}>"
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} request_id: #{@request_id.inspect}, status: #{@status.inspect}>"
68
+ end
57
69
  end
58
70
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Indicates overall status of the request
@@ -19,5 +19,18 @@ module ShellEv
19
19
 
20
20
  INLINE_RESPONSE2021_STATUS_ENUM.include?(value)
21
21
  end
22
+
23
+ def self.from_value(value, default_value = SUCCESS)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'success' then SUCCESS
30
+ when 'failed' then FAILED
31
+ else
32
+ default_value
33
+ end
34
+ end
22
35
  end
23
36
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # InlineResponse202Data Model.
@@ -46,5 +46,17 @@ module ShellEv
46
46
  # Create object from extracted values.
47
47
  InlineResponse202Data.new(session_id)
48
48
  end
49
+
50
+ # Provides a human-readable string representation of the object.
51
+ def to_s
52
+ class_name = self.class.name.split('::').last
53
+ "<#{class_name} session_id: #{@session_id}>"
54
+ end
55
+
56
+ # Provides a debugging-friendly string with detailed object information.
57
+ def inspect
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} session_id: #{@session_id.inspect}>"
60
+ end
49
61
  end
50
62
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # Indicates overall status of the request
@@ -19,5 +19,18 @@ module ShellEv
19
19
 
20
20
  INLINE_RESPONSE202_STATUS_ENUM.include?(value)
21
21
  end
22
+
23
+ def self.from_value(value, default_value = SUCCESS)
24
+ return default_value if value.nil?
25
+
26
+ str = value.to_s.strip
27
+
28
+ case str.downcase
29
+ when 'success' then SUCCESS
30
+ when 'failed' then FAILED
31
+ else
32
+ default_value
33
+ end
34
+ end
22
35
  end
23
36
  end
@@ -1,7 +1,7 @@
1
1
  # shell_ev
2
2
  #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
3
+ # This file was automatically generated by APIMATIC v3.0 (
4
+ # https://www.apimatic.io ).
5
5
 
6
6
  module ShellEv
7
7
  # InternalErrorObject Model.
@@ -66,5 +66,18 @@ module ShellEv
66
66
  message,
67
67
  description)
68
68
  end
69
+
70
+ # Provides a human-readable string representation of the object.
71
+ def to_s
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} code: #{@code}, message: #{@message}, description: #{@description}>"
74
+ end
75
+
76
+ # Provides a debugging-friendly string with detailed object information.
77
+ def inspect
78
+ class_name = self.class.name.split('::').last
79
+ "<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}, description:"\
80
+ " #{@description.inspect}>"
81
+ end
69
82
  end
70
83
  end