digital-payments-sdk 1.0.0 → 1.1.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.
- checksums.yaml +4 -4
- data/README.md +33 -20
- data/lib/{shell_ev → shell_smart_pay_api}/api_helper.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/client.rb +4 -4
- data/lib/{shell_ev → shell_smart_pay_api}/configuration.rb +11 -8
- data/lib/{shell_ev → shell_smart_pay_api}/controllers/base_controller.rb +11 -11
- data/lib/shell_smart_pay_api/controllers/digital_payment_enablement_controller.rb +57 -0
- data/lib/{shell_ev → shell_smart_pay_api}/controllers/fueling_controller.rb +50 -49
- data/lib/{shell_ev → shell_smart_pay_api}/controllers/partner_notification_controller.rb +27 -27
- data/lib/{shell_ev → shell_smart_pay_api}/controllers/shell_api_platform_security_authentication_controller.rb +9 -9
- data/lib/{shell_ev → shell_smart_pay_api}/controllers/station_locator_controller.rb +22 -22
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/access_token_error_exception.rb +28 -16
- data/lib/shell_smart_pay_api/exceptions/api_exception.rb +21 -0
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/cancel_fueling_error_response_error_exception.rb +31 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/mpp_acces_token_error_response_exception.rb +31 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/payment_enablement_error_response_exception.rb +28 -16
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_bad_request_exception.rb +30 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_forbidden_exception.rb +30 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_internal_server_error_exception.rb +30 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_not_found_exception.rb +30 -17
- data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_unauthorized_exception.rb +30 -17
- data/lib/{shell_ev → shell_smart_pay_api}/http/auth/mpp_token.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/http/auth/o_auth_token_post.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/http/http_call_back.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/http/http_method_enum.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/http/http_request.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/http/http_response.rb +2 -2
- data/lib/{shell_ev → shell_smart_pay_api}/models/access_token_response.rb +17 -4
- data/lib/{shell_ev → shell_smart_pay_api}/models/around_location_array.rb +16 -4
- data/lib/shell_smart_pay_api/models/base_model.rb +110 -0
- data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_error_response.rb +17 -5
- data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_request.rb +16 -4
- data/lib/{shell_ev → shell_smart_pay_api}/models/collecting_company.rb +14 -2
- data/lib/{shell_ev/models/around_location_array_data_items.rb → shell_smart_pay_api/models/datum.rb} +78 -57
- data/lib/{shell_ev/models/fault_response_fault_detail.rb → shell_smart_pay_api/models/detail.rb} +17 -5
- data/lib/{shell_ev/models/prepare_fueling_request_device_details_items.rb → shell_smart_pay_api/models/device_detail.rb} +23 -11
- data/lib/{shell_ev/models/fault_response_fault.rb → shell_smart_pay_api/models/fault.rb} +21 -10
- data/lib/{shell_ev → shell_smart_pay_api}/models/fault_response.rb +16 -4
- data/lib/{shell_ev → shell_smart_pay_api}/models/finalise_fueling_request.rb +31 -18
- data/lib/{shell_ev/models/around_location_array_data_items_loc.rb → shell_smart_pay_api/models/loc.rb} +25 -15
- data/lib/{shell_ev → shell_smart_pay_api}/models/loyalty_details.rb +16 -4
- data/lib/{shell_ev → shell_smart_pay_api}/models/mobile_payment_registration_request.rb +22 -10
- data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_acces_token_response.rb +18 -6
- data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_error.rb +18 -7
- data/lib/{shell_ev/models/around_location_array_data_items_opening_hours_items.rb → shell_smart_pay_api/models/opening_hour.rb} +40 -24
- data/lib/{shell_ev/models/finalise_fueling_request_payment.rb → shell_smart_pay_api/models/payment.rb} +22 -10
- data/lib/{shell_ev/models/payment_details_items.rb → shell_smart_pay_api/models/payment_details.rb} +22 -9
- data/lib/{shell_ev → shell_smart_pay_api}/models/payment_enablement_response.rb +14 -2
- data/lib/{shell_ev → shell_smart_pay_api}/models/payment_properties.rb +24 -10
- data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_request.rb +31 -24
- data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_response.rb +16 -4
- data/lib/{shell_ev/models/finalise_fueling_request_products_items.rb → shell_smart_pay_api/models/product.rb} +22 -10
- data/lib/{shell_ev → shell_smart_pay_api}/utilities/date_time_helper.rb +2 -2
- data/lib/shell_smart_pay_api/utilities/file_wrapper.rb +28 -0
- data/lib/shell_smart_pay_api.rb +89 -0
- data/test/controllers/controller_test_base.rb +3 -3
- data/test/controllers/test_fueling_controller.rb +1 -1
- data/test/controllers/test_partner_notification_controller.rb +1 -1
- data/test/controllers/test_shell_api_platform_security_authentication_controller.rb +1 -1
- data/test/controllers/test_station_locator_controller.rb +1 -1
- data/test/http_response_catcher.rb +2 -2
- metadata +63 -72
- data/lib/shell_ev/controllers/digital_payment_enablement_controller.rb +0 -56
- data/lib/shell_ev/exceptions/api_exception.rb +0 -10
- data/lib/shell_ev/models/base_model.rb +0 -62
- data/lib/shell_ev/models/mpp_token_request_body.rb +0 -73
- data/lib/shell_ev/models/oauth_token_post_request_body.rb +0 -73
- data/lib/shell_ev/models/partner_token_request_body.rb +0 -73
- data/lib/shell_ev/utilities/file_wrapper.rb +0 -16
- data/lib/shell_ev.rb +0 -85
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# StationLocatorController
|
8
8
|
class StationLocatorController < BaseController
|
9
9
|
# Returns all sites within specified radius of specified GPS location. Sites
|
@@ -29,7 +29,7 @@ module ShellEv
|
|
29
29
|
# @param [Array[String]] countries Optional parameter: This enables
|
30
30
|
# requestor to filter locations based on one or more Countries (i.e. by
|
31
31
|
# country codes).
|
32
|
-
# @return [AroundLocationArray] response from the API call
|
32
|
+
# @return [AroundLocationArray] response from the API call.
|
33
33
|
def stationlocator_v1_stations_get_around_location(m,
|
34
34
|
lon,
|
35
35
|
lat,
|
@@ -40,8 +40,8 @@ module ShellEv
|
|
40
40
|
countries: nil)
|
41
41
|
new_api_call_builder
|
42
42
|
.request(new_request_builder(HttpMethodEnum::GET,
|
43
|
-
'/SiteData/v1/stations
|
44
|
-
Server::
|
43
|
+
'/SiteData/v1/stations',
|
44
|
+
Server::SHELL)
|
45
45
|
.query_param(new_parameter(m, key: 'm'))
|
46
46
|
.query_param(new_parameter(lon, key: 'lon'))
|
47
47
|
.query_param(new_parameter(lat, key: 'lat'))
|
@@ -53,23 +53,23 @@ module ShellEv
|
|
53
53
|
.header_param(new_parameter('application/json', key: 'accept'))
|
54
54
|
.auth(Single.new('oAuthTokenPost')))
|
55
55
|
.response(new_response_handler
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
56
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
57
|
+
.deserialize_into(AroundLocationArray.method(:from_hash))
|
58
|
+
.local_error('400',
|
59
|
+
'Bad request',
|
60
|
+
StationLocatorBadRequestException)
|
61
|
+
.local_error('401',
|
62
|
+
'Unauthorized',
|
63
|
+
StationLocatorUnauthorizedException)
|
64
|
+
.local_error('403',
|
65
|
+
'Forbbiden',
|
66
|
+
StationLocatorForbiddenException)
|
67
|
+
.local_error('404',
|
68
|
+
'Not Found',
|
69
|
+
StationLocatorNotFoundException)
|
70
|
+
.local_error('500',
|
71
|
+
'Internal Server Error',
|
72
|
+
StationLocatorInternalServerErrorException))
|
73
73
|
.execute
|
74
74
|
end
|
75
75
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# AccessTokenError class.
|
8
8
|
class AccessTokenErrorException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,23 +15,35 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :error
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
|
+
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
|
+
@error = hash.key?('error') ? hash['error'] : SKIP
|
35
|
+
end
|
19
36
|
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
37
|
+
# Provides a human-readable string representation of the object.
|
38
|
+
def to_s
|
39
|
+
class_name = self.class.name.split('::').last
|
40
|
+
"<#{class_name} error_code: #{@error_code}, error: #{@error}>"
|
27
41
|
end
|
28
42
|
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
|
-
@error = hash.key?('error') ? hash['error'] : SKIP
|
43
|
+
# Provides a debugging-friendly string with detailed object information.
|
44
|
+
def inspect
|
45
|
+
class_name = self.class.name.split('::').last
|
46
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error: #{@error.inspect}>"
|
35
47
|
end
|
36
48
|
end
|
37
49
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# shell_smart_pay_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module ShellSmartPayApi
|
7
|
+
# Class for exceptions when there is a network error, status code error, etc.
|
8
|
+
class APIException < CoreLibrary::ApiException
|
9
|
+
# Provides a human-readable string representation of the object.
|
10
|
+
def to_s
|
11
|
+
class_name = self.class.name.split('::').last
|
12
|
+
"<#{class_name} status_code: #{@response_code}, reason: #{@reason}>"
|
13
|
+
end
|
14
|
+
|
15
|
+
# Provides a debugging-friendly string with detailed object information.
|
16
|
+
def inspect
|
17
|
+
class_name = self.class.name.split('::').last
|
18
|
+
"<#{class_name} status_code: #{@response_code.inspect}, reason: #{@reason.inspect}>"
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# # Digital Payments – Errors This section details the structure of the
|
8
8
|
# response Body vs. the different types of errors that could be returned when
|
9
9
|
# Digital Payments system responds with a 400 Response Code. | Error Code
|
@@ -31,21 +31,21 @@ module ShellEv
|
|
31
31
|
# Array of error objects. Majority of the time the errorCode and
|
32
32
|
# errorDescription will suffice
|
33
33
|
# @return [Array[MppError]]
|
34
|
-
attr_accessor :errors
|
35
|
-
|
36
|
-
# The constructor.
|
37
|
-
# @param [String] The reason for raising an exception.
|
38
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
39
|
-
def initialize(reason, response)
|
40
|
-
super(reason, response)
|
41
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
42
|
-
unbox(hash)
|
43
|
-
end
|
44
|
-
|
45
|
-
# Populates this object by extracting properties from a hash.
|
46
|
-
# @param [Hash] The deserialized response sent by the server in the
|
47
|
-
# response body.
|
48
|
-
def unbox(hash)
|
34
|
+
attr_accessor :errors
|
35
|
+
|
36
|
+
# The constructor.
|
37
|
+
# @param [String] The reason for raising an exception.
|
38
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
39
|
+
def initialize(reason, response)
|
40
|
+
super(reason, response)
|
41
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
42
|
+
unbox(hash)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Populates this object by extracting properties from a hash.
|
46
|
+
# @param [Hash] The deserialized response sent by the server in the
|
47
|
+
# response body.
|
48
|
+
def unbox(hash)
|
49
49
|
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
50
50
|
@error_description =
|
51
51
|
hash.key?('errorDescription') ? hash['errorDescription'] : SKIP
|
@@ -60,5 +60,19 @@ module ShellEv
|
|
60
60
|
|
61
61
|
@errors = SKIP unless hash.key?('errors')
|
62
62
|
end
|
63
|
+
|
64
|
+
# Provides a human-readable string representation of the object.
|
65
|
+
def to_s
|
66
|
+
class_name = self.class.name.split('::').last
|
67
|
+
"<#{class_name} error_code: #{@error_code}, error_description: #{@error_description},"\
|
68
|
+
" errors: #{@errors}>"
|
69
|
+
end
|
70
|
+
|
71
|
+
# Provides a debugging-friendly string with detailed object information.
|
72
|
+
def inspect
|
73
|
+
class_name = self.class.name.split('::').last
|
74
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_description:"\
|
75
|
+
" #{@error_description.inspect}, errors: #{@errors.inspect}>"
|
76
|
+
end
|
63
77
|
end
|
64
78
|
end
|
data/lib/{shell_ev → shell_smart_pay_api}/exceptions/mpp_acces_token_error_response_exception.rb
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# MppAccesTokenErrorResponse class.
|
8
8
|
class MppAccesTokenErrorResponseException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -20,25 +20,39 @@ module ShellEv
|
|
20
20
|
|
21
21
|
# Description of the error
|
22
22
|
# @return [String]
|
23
|
-
attr_accessor :error_description
|
24
|
-
|
25
|
-
# The constructor.
|
26
|
-
# @param [String] The reason for raising an exception.
|
27
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
28
|
-
def initialize(reason, response)
|
29
|
-
super(reason, response)
|
30
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
31
|
-
unbox(hash)
|
32
|
-
end
|
33
|
-
|
34
|
-
# Populates this object by extracting properties from a hash.
|
35
|
-
# @param [Hash] The deserialized response sent by the server in the
|
36
|
-
# response body.
|
37
|
-
def unbox(hash)
|
23
|
+
attr_accessor :error_description
|
24
|
+
|
25
|
+
# The constructor.
|
26
|
+
# @param [String] The reason for raising an exception.
|
27
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
28
|
+
def initialize(reason, response)
|
29
|
+
super(reason, response)
|
30
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
31
|
+
unbox(hash)
|
32
|
+
end
|
33
|
+
|
34
|
+
# Populates this object by extracting properties from a hash.
|
35
|
+
# @param [Hash] The deserialized response sent by the server in the
|
36
|
+
# response body.
|
37
|
+
def unbox(hash)
|
38
38
|
@error = hash.key?('error') ? hash['error'] : nil
|
39
39
|
@error_code = hash.key?('error_code') ? hash['error_code'] : nil
|
40
40
|
@error_description =
|
41
41
|
hash.key?('error_description') ? hash['error_description'] : SKIP
|
42
42
|
end
|
43
|
+
|
44
|
+
# Provides a human-readable string representation of the object.
|
45
|
+
def to_s
|
46
|
+
class_name = self.class.name.split('::').last
|
47
|
+
"<#{class_name} error: #{@error}, error_code: #{@error_code}, error_description:"\
|
48
|
+
" #{@error_description}>"
|
49
|
+
end
|
50
|
+
|
51
|
+
# Provides a debugging-friendly string with detailed object information.
|
52
|
+
def inspect
|
53
|
+
class_name = self.class.name.split('::').last
|
54
|
+
"<#{class_name} error: #{@error.inspect}, error_code: #{@error_code.inspect},"\
|
55
|
+
" error_description: #{@error_description.inspect}>"
|
56
|
+
end
|
43
57
|
end
|
44
58
|
end
|
data/lib/{shell_ev → shell_smart_pay_api}/exceptions/payment_enablement_error_response_exception.rb
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# PaymentEnablementErrorResponse class.
|
8
8
|
class PaymentEnablementErrorResponseException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,23 +15,35 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :message
|
18
|
+
attr_accessor :message
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
|
+
@code = hash.key?('code') ? hash['code'] : SKIP
|
34
|
+
@message = hash.key?('message') ? hash['message'] : SKIP
|
35
|
+
end
|
19
36
|
|
20
|
-
#
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
37
|
+
# Provides a human-readable string representation of the object.
|
38
|
+
def to_s
|
39
|
+
class_name = self.class.name.split('::').last
|
40
|
+
"<#{class_name} code: #{@code}, message: #{@message}>"
|
27
41
|
end
|
28
42
|
|
29
|
-
#
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
@code = hash.key?('code') ? hash['code'] : SKIP
|
34
|
-
@message = hash.key?('message') ? hash['message'] : SKIP
|
43
|
+
# Provides a debugging-friendly string with detailed object information.
|
44
|
+
def inspect
|
45
|
+
class_name = self.class.name.split('::').last
|
46
|
+
"<#{class_name} code: #{@code.inspect}, message: #{@message.inspect}>"
|
35
47
|
end
|
36
48
|
end
|
37
49
|
end
|
data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_bad_request_exception.rb
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# StationLocatorBadRequest class.
|
8
8
|
class StationLocatorBadRequestException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,24 +15,37 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :error_description
|
19
|
-
|
20
|
-
# The constructor.
|
21
|
-
# @param [String] The reason for raising an exception.
|
22
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
-
def initialize(reason, response)
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Populates this object by extracting properties from a hash.
|
30
|
-
# @param [Hash] The deserialized response sent by the server in the
|
31
|
-
# response body.
|
32
|
-
def unbox(hash)
|
18
|
+
attr_accessor :error_description
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
33
|
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
34
|
@error_description =
|
35
35
|
hash.key?('errorDescription') ? hash['errorDescription'] : SKIP
|
36
36
|
end
|
37
|
+
|
38
|
+
# Provides a human-readable string representation of the object.
|
39
|
+
def to_s
|
40
|
+
class_name = self.class.name.split('::').last
|
41
|
+
"<#{class_name} error_code: #{@error_code}, error_description: #{@error_description}>"
|
42
|
+
end
|
43
|
+
|
44
|
+
# Provides a debugging-friendly string with detailed object information.
|
45
|
+
def inspect
|
46
|
+
class_name = self.class.name.split('::').last
|
47
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_description:"\
|
48
|
+
" #{@error_description.inspect}>"
|
49
|
+
end
|
37
50
|
end
|
38
51
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# StationLocatorForbidden class.
|
8
8
|
class StationLocatorForbiddenException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,24 +15,37 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :error_description
|
19
|
-
|
20
|
-
# The constructor.
|
21
|
-
# @param [String] The reason for raising an exception.
|
22
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
-
def initialize(reason, response)
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Populates this object by extracting properties from a hash.
|
30
|
-
# @param [Hash] The deserialized response sent by the server in the
|
31
|
-
# response body.
|
32
|
-
def unbox(hash)
|
18
|
+
attr_accessor :error_description
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
33
|
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
34
|
@error_description =
|
35
35
|
hash.key?('errorDescription') ? hash['errorDescription'] : SKIP
|
36
36
|
end
|
37
|
+
|
38
|
+
# Provides a human-readable string representation of the object.
|
39
|
+
def to_s
|
40
|
+
class_name = self.class.name.split('::').last
|
41
|
+
"<#{class_name} error_code: #{@error_code}, error_description: #{@error_description}>"
|
42
|
+
end
|
43
|
+
|
44
|
+
# Provides a debugging-friendly string with detailed object information.
|
45
|
+
def inspect
|
46
|
+
class_name = self.class.name.split('::').last
|
47
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_description:"\
|
48
|
+
" #{@error_description.inspect}>"
|
49
|
+
end
|
37
50
|
end
|
38
51
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# StationLocatorInternalServerError class.
|
8
8
|
class StationLocatorInternalServerErrorException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,24 +15,37 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :error_description
|
19
|
-
|
20
|
-
# The constructor.
|
21
|
-
# @param [String] The reason for raising an exception.
|
22
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
-
def initialize(reason, response)
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Populates this object by extracting properties from a hash.
|
30
|
-
# @param [Hash] The deserialized response sent by the server in the
|
31
|
-
# response body.
|
32
|
-
def unbox(hash)
|
18
|
+
attr_accessor :error_description
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
33
|
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
34
|
@error_description =
|
35
35
|
hash.key?('errorDescription') ? hash['errorDescription'] : SKIP
|
36
36
|
end
|
37
|
+
|
38
|
+
# Provides a human-readable string representation of the object.
|
39
|
+
def to_s
|
40
|
+
class_name = self.class.name.split('::').last
|
41
|
+
"<#{class_name} error_code: #{@error_code}, error_description: #{@error_description}>"
|
42
|
+
end
|
43
|
+
|
44
|
+
# Provides a debugging-friendly string with detailed object information.
|
45
|
+
def inspect
|
46
|
+
class_name = self.class.name.split('::').last
|
47
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_description:"\
|
48
|
+
" #{@error_description.inspect}>"
|
49
|
+
end
|
37
50
|
end
|
38
51
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# shell_smart_pay_api
|
2
2
|
#
|
3
3
|
# This file was automatically generated by APIMATIC v2.0
|
4
4
|
# ( https://apimatic.io ).
|
5
5
|
|
6
|
-
module
|
6
|
+
module ShellSmartPayApi
|
7
7
|
# StationLocatorNotFound class.
|
8
8
|
class StationLocatorNotFoundException < APIException
|
9
9
|
SKIP = Object.new
|
@@ -15,24 +15,37 @@ module ShellEv
|
|
15
15
|
|
16
16
|
# TODO: Write general description for this method
|
17
17
|
# @return [String]
|
18
|
-
attr_accessor :error_description
|
19
|
-
|
20
|
-
# The constructor.
|
21
|
-
# @param [String] The reason for raising an exception.
|
22
|
-
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
-
def initialize(reason, response)
|
24
|
-
super(reason, response)
|
25
|
-
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
-
unbox(hash)
|
27
|
-
end
|
28
|
-
|
29
|
-
# Populates this object by extracting properties from a hash.
|
30
|
-
# @param [Hash] The deserialized response sent by the server in the
|
31
|
-
# response body.
|
32
|
-
def unbox(hash)
|
18
|
+
attr_accessor :error_description
|
19
|
+
|
20
|
+
# The constructor.
|
21
|
+
# @param [String] The reason for raising an exception.
|
22
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
23
|
+
def initialize(reason, response)
|
24
|
+
super(reason, response)
|
25
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
26
|
+
unbox(hash)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Populates this object by extracting properties from a hash.
|
30
|
+
# @param [Hash] The deserialized response sent by the server in the
|
31
|
+
# response body.
|
32
|
+
def unbox(hash)
|
33
33
|
@error_code = hash.key?('errorCode') ? hash['errorCode'] : SKIP
|
34
34
|
@error_description =
|
35
35
|
hash.key?('errorDescription') ? hash['errorDescription'] : SKIP
|
36
36
|
end
|
37
|
+
|
38
|
+
# Provides a human-readable string representation of the object.
|
39
|
+
def to_s
|
40
|
+
class_name = self.class.name.split('::').last
|
41
|
+
"<#{class_name} error_code: #{@error_code}, error_description: #{@error_description}>"
|
42
|
+
end
|
43
|
+
|
44
|
+
# Provides a debugging-friendly string with detailed object information.
|
45
|
+
def inspect
|
46
|
+
class_name = self.class.name.split('::').last
|
47
|
+
"<#{class_name} error_code: #{@error_code.inspect}, error_description:"\
|
48
|
+
" #{@error_description.inspect}>"
|
49
|
+
end
|
37
50
|
end
|
38
51
|
end
|