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.
Files changed (70) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -20
  3. data/lib/{shell_ev → shell_smart_pay_api}/api_helper.rb +2 -2
  4. data/lib/{shell_ev → shell_smart_pay_api}/client.rb +4 -4
  5. data/lib/{shell_ev → shell_smart_pay_api}/configuration.rb +11 -8
  6. data/lib/{shell_ev → shell_smart_pay_api}/controllers/base_controller.rb +11 -11
  7. data/lib/shell_smart_pay_api/controllers/digital_payment_enablement_controller.rb +57 -0
  8. data/lib/{shell_ev → shell_smart_pay_api}/controllers/fueling_controller.rb +50 -49
  9. data/lib/{shell_ev → shell_smart_pay_api}/controllers/partner_notification_controller.rb +27 -27
  10. data/lib/{shell_ev → shell_smart_pay_api}/controllers/shell_api_platform_security_authentication_controller.rb +9 -9
  11. data/lib/{shell_ev → shell_smart_pay_api}/controllers/station_locator_controller.rb +22 -22
  12. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/access_token_error_exception.rb +28 -16
  13. data/lib/shell_smart_pay_api/exceptions/api_exception.rb +21 -0
  14. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/cancel_fueling_error_response_error_exception.rb +31 -17
  15. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/mpp_acces_token_error_response_exception.rb +31 -17
  16. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/payment_enablement_error_response_exception.rb +28 -16
  17. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_bad_request_exception.rb +30 -17
  18. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_forbidden_exception.rb +30 -17
  19. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_internal_server_error_exception.rb +30 -17
  20. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_not_found_exception.rb +30 -17
  21. data/lib/{shell_ev → shell_smart_pay_api}/exceptions/station_locator_unauthorized_exception.rb +30 -17
  22. data/lib/{shell_ev → shell_smart_pay_api}/http/auth/mpp_token.rb +2 -2
  23. data/lib/{shell_ev → shell_smart_pay_api}/http/auth/o_auth_token_post.rb +2 -2
  24. data/lib/{shell_ev → shell_smart_pay_api}/http/http_call_back.rb +2 -2
  25. data/lib/{shell_ev → shell_smart_pay_api}/http/http_method_enum.rb +2 -2
  26. data/lib/{shell_ev → shell_smart_pay_api}/http/http_request.rb +2 -2
  27. data/lib/{shell_ev → shell_smart_pay_api}/http/http_response.rb +2 -2
  28. data/lib/{shell_ev → shell_smart_pay_api}/models/access_token_response.rb +17 -4
  29. data/lib/{shell_ev → shell_smart_pay_api}/models/around_location_array.rb +16 -4
  30. data/lib/shell_smart_pay_api/models/base_model.rb +110 -0
  31. data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_error_response.rb +17 -5
  32. data/lib/{shell_ev → shell_smart_pay_api}/models/cancel_fueling_request.rb +16 -4
  33. data/lib/{shell_ev → shell_smart_pay_api}/models/collecting_company.rb +14 -2
  34. data/lib/{shell_ev/models/around_location_array_data_items.rb → shell_smart_pay_api/models/datum.rb} +78 -57
  35. data/lib/{shell_ev/models/fault_response_fault_detail.rb → shell_smart_pay_api/models/detail.rb} +17 -5
  36. data/lib/{shell_ev/models/prepare_fueling_request_device_details_items.rb → shell_smart_pay_api/models/device_detail.rb} +23 -11
  37. data/lib/{shell_ev/models/fault_response_fault.rb → shell_smart_pay_api/models/fault.rb} +21 -10
  38. data/lib/{shell_ev → shell_smart_pay_api}/models/fault_response.rb +16 -4
  39. data/lib/{shell_ev → shell_smart_pay_api}/models/finalise_fueling_request.rb +31 -18
  40. data/lib/{shell_ev/models/around_location_array_data_items_loc.rb → shell_smart_pay_api/models/loc.rb} +25 -15
  41. data/lib/{shell_ev → shell_smart_pay_api}/models/loyalty_details.rb +16 -4
  42. data/lib/{shell_ev → shell_smart_pay_api}/models/mobile_payment_registration_request.rb +22 -10
  43. data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_acces_token_response.rb +18 -6
  44. data/lib/{shell_ev → shell_smart_pay_api}/models/mpp_error.rb +18 -7
  45. data/lib/{shell_ev/models/around_location_array_data_items_opening_hours_items.rb → shell_smart_pay_api/models/opening_hour.rb} +40 -24
  46. data/lib/{shell_ev/models/finalise_fueling_request_payment.rb → shell_smart_pay_api/models/payment.rb} +22 -10
  47. data/lib/{shell_ev/models/payment_details_items.rb → shell_smart_pay_api/models/payment_details.rb} +22 -9
  48. data/lib/{shell_ev → shell_smart_pay_api}/models/payment_enablement_response.rb +14 -2
  49. data/lib/{shell_ev → shell_smart_pay_api}/models/payment_properties.rb +24 -10
  50. data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_request.rb +31 -24
  51. data/lib/{shell_ev → shell_smart_pay_api}/models/prepare_fueling_response.rb +16 -4
  52. data/lib/{shell_ev/models/finalise_fueling_request_products_items.rb → shell_smart_pay_api/models/product.rb} +22 -10
  53. data/lib/{shell_ev → shell_smart_pay_api}/utilities/date_time_helper.rb +2 -2
  54. data/lib/shell_smart_pay_api/utilities/file_wrapper.rb +28 -0
  55. data/lib/shell_smart_pay_api.rb +89 -0
  56. data/test/controllers/controller_test_base.rb +3 -3
  57. data/test/controllers/test_fueling_controller.rb +1 -1
  58. data/test/controllers/test_partner_notification_controller.rb +1 -1
  59. data/test/controllers/test_shell_api_platform_security_authentication_controller.rb +1 -1
  60. data/test/controllers/test_station_locator_controller.rb +1 -1
  61. data/test/http_response_catcher.rb +2 -2
  62. metadata +63 -72
  63. data/lib/shell_ev/controllers/digital_payment_enablement_controller.rb +0 -56
  64. data/lib/shell_ev/exceptions/api_exception.rb +0 -10
  65. data/lib/shell_ev/models/base_model.rb +0 -62
  66. data/lib/shell_ev/models/mpp_token_request_body.rb +0 -73
  67. data/lib/shell_ev/models/oauth_token_post_request_body.rb +0 -73
  68. data/lib/shell_ev/models/partner_token_request_body.rb +0 -73
  69. data/lib/shell_ev/utilities/file_wrapper.rb +0 -16
  70. data/lib/shell_ev.rb +0 -85
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digital-payments-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - developer sdksio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-06 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: apimatic_core_interfaces
@@ -16,62 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.0
19
+ version: 0.2.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.0
26
+ version: 0.2.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: apimatic_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.3.11
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.3.11
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: apimatic_faraday_client_adapter
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.0
47
+ version: 0.1.4
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.0
54
+ version: 0.1.4
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '5.14'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 5.14.1
61
+ version: 5.24.0
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '5.14'
72
- - - ">="
73
- - !ruby/object:Gem::Version
74
- version: 5.14.1
68
+ version: 5.24.0
75
69
  - !ruby/object:Gem::Dependency
76
70
  name: minitest-proveit
77
71
  requirement: !ruby/object:Gem::Requirement
@@ -97,62 +91,59 @@ extra_rdoc_files: []
97
91
  files:
98
92
  - LICENSE
99
93
  - README.md
100
- - lib/shell_ev.rb
101
- - lib/shell_ev/api_helper.rb
102
- - lib/shell_ev/client.rb
103
- - lib/shell_ev/configuration.rb
104
- - lib/shell_ev/controllers/base_controller.rb
105
- - lib/shell_ev/controllers/digital_payment_enablement_controller.rb
106
- - lib/shell_ev/controllers/fueling_controller.rb
107
- - lib/shell_ev/controllers/partner_notification_controller.rb
108
- - lib/shell_ev/controllers/shell_api_platform_security_authentication_controller.rb
109
- - lib/shell_ev/controllers/station_locator_controller.rb
110
- - lib/shell_ev/exceptions/access_token_error_exception.rb
111
- - lib/shell_ev/exceptions/api_exception.rb
112
- - lib/shell_ev/exceptions/cancel_fueling_error_response_error_exception.rb
113
- - lib/shell_ev/exceptions/mpp_acces_token_error_response_exception.rb
114
- - lib/shell_ev/exceptions/payment_enablement_error_response_exception.rb
115
- - lib/shell_ev/exceptions/station_locator_bad_request_exception.rb
116
- - lib/shell_ev/exceptions/station_locator_forbidden_exception.rb
117
- - lib/shell_ev/exceptions/station_locator_internal_server_error_exception.rb
118
- - lib/shell_ev/exceptions/station_locator_not_found_exception.rb
119
- - lib/shell_ev/exceptions/station_locator_unauthorized_exception.rb
120
- - lib/shell_ev/http/auth/mpp_token.rb
121
- - lib/shell_ev/http/auth/o_auth_token_post.rb
122
- - lib/shell_ev/http/http_call_back.rb
123
- - lib/shell_ev/http/http_method_enum.rb
124
- - lib/shell_ev/http/http_request.rb
125
- - lib/shell_ev/http/http_response.rb
126
- - lib/shell_ev/models/access_token_response.rb
127
- - lib/shell_ev/models/around_location_array.rb
128
- - lib/shell_ev/models/around_location_array_data_items.rb
129
- - lib/shell_ev/models/around_location_array_data_items_loc.rb
130
- - lib/shell_ev/models/around_location_array_data_items_opening_hours_items.rb
131
- - lib/shell_ev/models/base_model.rb
132
- - lib/shell_ev/models/cancel_fueling_error_response.rb
133
- - lib/shell_ev/models/cancel_fueling_request.rb
134
- - lib/shell_ev/models/collecting_company.rb
135
- - lib/shell_ev/models/fault_response.rb
136
- - lib/shell_ev/models/fault_response_fault.rb
137
- - lib/shell_ev/models/fault_response_fault_detail.rb
138
- - lib/shell_ev/models/finalise_fueling_request.rb
139
- - lib/shell_ev/models/finalise_fueling_request_payment.rb
140
- - lib/shell_ev/models/finalise_fueling_request_products_items.rb
141
- - lib/shell_ev/models/loyalty_details.rb
142
- - lib/shell_ev/models/mobile_payment_registration_request.rb
143
- - lib/shell_ev/models/mpp_acces_token_response.rb
144
- - lib/shell_ev/models/mpp_error.rb
145
- - lib/shell_ev/models/mpp_token_request_body.rb
146
- - lib/shell_ev/models/oauth_token_post_request_body.rb
147
- - lib/shell_ev/models/partner_token_request_body.rb
148
- - lib/shell_ev/models/payment_details_items.rb
149
- - lib/shell_ev/models/payment_enablement_response.rb
150
- - lib/shell_ev/models/payment_properties.rb
151
- - lib/shell_ev/models/prepare_fueling_request.rb
152
- - lib/shell_ev/models/prepare_fueling_request_device_details_items.rb
153
- - lib/shell_ev/models/prepare_fueling_response.rb
154
- - lib/shell_ev/utilities/date_time_helper.rb
155
- - lib/shell_ev/utilities/file_wrapper.rb
94
+ - lib/shell_smart_pay_api.rb
95
+ - lib/shell_smart_pay_api/api_helper.rb
96
+ - lib/shell_smart_pay_api/client.rb
97
+ - lib/shell_smart_pay_api/configuration.rb
98
+ - lib/shell_smart_pay_api/controllers/base_controller.rb
99
+ - lib/shell_smart_pay_api/controllers/digital_payment_enablement_controller.rb
100
+ - lib/shell_smart_pay_api/controllers/fueling_controller.rb
101
+ - lib/shell_smart_pay_api/controllers/partner_notification_controller.rb
102
+ - lib/shell_smart_pay_api/controllers/shell_api_platform_security_authentication_controller.rb
103
+ - lib/shell_smart_pay_api/controllers/station_locator_controller.rb
104
+ - lib/shell_smart_pay_api/exceptions/access_token_error_exception.rb
105
+ - lib/shell_smart_pay_api/exceptions/api_exception.rb
106
+ - lib/shell_smart_pay_api/exceptions/cancel_fueling_error_response_error_exception.rb
107
+ - lib/shell_smart_pay_api/exceptions/mpp_acces_token_error_response_exception.rb
108
+ - lib/shell_smart_pay_api/exceptions/payment_enablement_error_response_exception.rb
109
+ - lib/shell_smart_pay_api/exceptions/station_locator_bad_request_exception.rb
110
+ - lib/shell_smart_pay_api/exceptions/station_locator_forbidden_exception.rb
111
+ - lib/shell_smart_pay_api/exceptions/station_locator_internal_server_error_exception.rb
112
+ - lib/shell_smart_pay_api/exceptions/station_locator_not_found_exception.rb
113
+ - lib/shell_smart_pay_api/exceptions/station_locator_unauthorized_exception.rb
114
+ - lib/shell_smart_pay_api/http/auth/mpp_token.rb
115
+ - lib/shell_smart_pay_api/http/auth/o_auth_token_post.rb
116
+ - lib/shell_smart_pay_api/http/http_call_back.rb
117
+ - lib/shell_smart_pay_api/http/http_method_enum.rb
118
+ - lib/shell_smart_pay_api/http/http_request.rb
119
+ - lib/shell_smart_pay_api/http/http_response.rb
120
+ - lib/shell_smart_pay_api/models/access_token_response.rb
121
+ - lib/shell_smart_pay_api/models/around_location_array.rb
122
+ - lib/shell_smart_pay_api/models/base_model.rb
123
+ - lib/shell_smart_pay_api/models/cancel_fueling_error_response.rb
124
+ - lib/shell_smart_pay_api/models/cancel_fueling_request.rb
125
+ - lib/shell_smart_pay_api/models/collecting_company.rb
126
+ - lib/shell_smart_pay_api/models/datum.rb
127
+ - lib/shell_smart_pay_api/models/detail.rb
128
+ - lib/shell_smart_pay_api/models/device_detail.rb
129
+ - lib/shell_smart_pay_api/models/fault.rb
130
+ - lib/shell_smart_pay_api/models/fault_response.rb
131
+ - lib/shell_smart_pay_api/models/finalise_fueling_request.rb
132
+ - lib/shell_smart_pay_api/models/loc.rb
133
+ - lib/shell_smart_pay_api/models/loyalty_details.rb
134
+ - lib/shell_smart_pay_api/models/mobile_payment_registration_request.rb
135
+ - lib/shell_smart_pay_api/models/mpp_acces_token_response.rb
136
+ - lib/shell_smart_pay_api/models/mpp_error.rb
137
+ - lib/shell_smart_pay_api/models/opening_hour.rb
138
+ - lib/shell_smart_pay_api/models/payment.rb
139
+ - lib/shell_smart_pay_api/models/payment_details.rb
140
+ - lib/shell_smart_pay_api/models/payment_enablement_response.rb
141
+ - lib/shell_smart_pay_api/models/payment_properties.rb
142
+ - lib/shell_smart_pay_api/models/prepare_fueling_request.rb
143
+ - lib/shell_smart_pay_api/models/prepare_fueling_response.rb
144
+ - lib/shell_smart_pay_api/models/product.rb
145
+ - lib/shell_smart_pay_api/utilities/date_time_helper.rb
146
+ - lib/shell_smart_pay_api/utilities/file_wrapper.rb
156
147
  - test/controllers/controller_test_base.rb
157
148
  - test/controllers/test_fueling_controller.rb
158
149
  - test/controllers/test_partner_notification_controller.rb
@@ -1,56 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # DigitalPaymentEnablementController
8
- class DigitalPaymentEnablementController < BaseController
9
- # Generates a DPAN and stores the relationship between the Reference ID,
10
- # DPAN and the real PAN. This method is called during the customer
11
- # registration process, ahead of any payment. The Reference ID is an
12
- # identifier chosen by the client system for mobile payment registration. It
13
- # must be unique in context of the client system, and is the key to
14
- # obtaining and managing the payment details later.
15
- # @param [MobilePaymentRegistrationRequest] body Required parameter:
16
- # Example:
17
- # @return [PaymentEnablementResponse] response from the API call
18
- def mpay_v1_tokens_ref_put(body)
19
- new_api_call_builder
20
- .request(new_request_builder(HttpMethodEnum::PUT,
21
- '/PaymentEnablement/v1/ref',
22
- Server::DEFAULT)
23
- .header_param(new_parameter('application/json', key: 'Content-Type'))
24
- .body_param(new_parameter(body))
25
- .header_param(new_parameter('application/json', key: 'accept'))
26
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
27
- .auth(Single.new('oAuthTokenPost')))
28
- .response(new_response_handler
29
- .deserializer(APIHelper.method(:custom_type_deserializer))
30
- .deserialize_into(PaymentEnablementResponse.method(:from_hash))
31
- .local_error('400',
32
- 'Error Occurred. The server cannot or will not process the'\
33
- ' request due to an apparent client error (e.g., malformed'\
34
- ' request syntax, invalid request message).',
35
- PaymentEnablementErrorResponseException)
36
- .local_error('401',
37
- 'Unauthorized. The request has not been applied because it lacks'\
38
- ' valid authentication credentials for the target resource.',
39
- APIException)
40
- .local_error('403',
41
- 'Forbidden. The server understood the request but refuses to'\
42
- ' authorize it.',
43
- APIException)
44
- .local_error('404',
45
- 'Not Found. The origin server did not find a current'\
46
- ' representation for the target resource or is not willing to'\
47
- ' disclose that one exists.',
48
- APIException)
49
- .local_error('500',
50
- 'Internal Server Error. The server encountered an unexpected'\
51
- ' condition that prevented it from fulfilling the request.',
52
- APIException))
53
- .execute
54
- end
55
- end
56
- end
@@ -1,10 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # Class for exceptions when there is a network error, status code error, etc.
8
- class APIException < CoreLibrary::ApiException
9
- end
10
- end
@@ -1,62 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # Base model.
8
- class BaseModel < CoreLibrary::BaseModel
9
- # Returns a Hash representation of the current object.
10
- def to_hash
11
- # validating the model being serialized
12
- self.class.validate(self) if self.class.respond_to?(:validate)
13
-
14
- hash = {}
15
- instance_variables.each do |name|
16
- value = instance_variable_get(name)
17
- name = name[1..]
18
- key = self.class.names.key?(name) ? self.class.names[name] : name
19
- optional_fields = self.class.optionals
20
- nullable_fields = self.class.nullables
21
- if value.nil?
22
- next unless nullable_fields.include?(name)
23
-
24
- if !optional_fields.include?(name) && !nullable_fields.include?(name)
25
- raise ArgumentError,
26
- "`#{name}` cannot be nil in `#{self.class}`. Please specify a valid value."
27
- end
28
- end
29
-
30
- hash[key] = nil
31
- unless value.nil?
32
- if respond_to?("to_custom_#{name}")
33
- if (value.instance_of? Array) || (value.instance_of? Hash)
34
- params = [hash, key]
35
- hash[key] = send("to_custom_#{name}", *params)
36
- else
37
- hash[key] = send("to_custom_#{name}")
38
- end
39
- elsif respond_to?("to_union_type_#{name}")
40
- hash[key] = send("to_union_type_#{name}")
41
- elsif value.instance_of? Array
42
- hash[key] = value.map { |v| v.is_a?(BaseModel) ? v.to_hash : v }
43
- elsif value.instance_of? Hash
44
- hash[key] = {}
45
- value.each do |k, v|
46
- hash[key][k] = v.is_a?(BaseModel) ? v.to_hash : v
47
- end
48
- else
49
- hash[key] = value.is_a?(BaseModel) ? value.to_hash : value
50
- end
51
- end
52
- end
53
- hash
54
- end
55
-
56
- # Returns a JSON representation of the curent object.
57
- def to_json(options = {})
58
- hash = to_hash
59
- hash.to_json(options)
60
- end
61
- end
62
- end
@@ -1,73 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # MppTokenRequestBody Model.
8
- class MppTokenRequestBody < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # In OAuth 2.0, the term grant type refers to the way an application gets an
13
- # access token. OAuth 2.0 defines several grant types, including the
14
- # authorization code flow.
15
- # @return [String]
16
- attr_accessor :grant_type
17
-
18
- # After registering your app, you will receive a client ID and a client
19
- # secret. The client ID is considered public information, and is used to
20
- # build login URLs, or included in Javascript source code on a page.
21
- # @return [String]
22
- attr_accessor :client_id
23
-
24
- # After registering your app, you will receive a client ID and a client
25
- # secret. The client ID is considered public information, and is used to
26
- # build login URLs, or included in Javascript source code on a page. The
27
- # client secret must be kept confidential.
28
- # @return [String]
29
- attr_accessor :client_secret
30
-
31
- # A mapping from model property names to API property names.
32
- def self.names
33
- @_hash = {} if @_hash.nil?
34
- @_hash['grant_type'] = 'grant_type'
35
- @_hash['client_id'] = 'client_id'
36
- @_hash['client_secret'] = 'client_secret'
37
- @_hash
38
- end
39
-
40
- # An array for optional fields
41
- def self.optionals
42
- []
43
- end
44
-
45
- # An array for nullable fields
46
- def self.nullables
47
- []
48
- end
49
-
50
- def initialize(grant_type = nil,
51
- client_id = nil,
52
- client_secret = nil)
53
- @grant_type = grant_type
54
- @client_id = client_id
55
- @client_secret = client_secret
56
- end
57
-
58
- # Creates an instance of the object from a hash.
59
- def self.from_hash(hash)
60
- return nil unless hash
61
-
62
- # Extract variables from the hash.
63
- grant_type = hash.key?('grant_type') ? hash['grant_type'] : nil
64
- client_id = hash.key?('client_id') ? hash['client_id'] : nil
65
- client_secret = hash.key?('client_secret') ? hash['client_secret'] : nil
66
-
67
- # Create object from extracted values.
68
- MppTokenRequestBody.new(grant_type,
69
- client_id,
70
- client_secret)
71
- end
72
- end
73
- end
@@ -1,73 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # OauthTokenPostRequestBody Model.
8
- class OauthTokenPostRequestBody < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # In OAuth 2.0, the term grant typee refers to the way an application gets
13
- # an access token. OAuth 2.0 defines several grant types, including the
14
- # authorization code flow.
15
- # @return [String]
16
- attr_accessor :grant_type
17
-
18
- # After registering your app, you will receive a client ID and a client
19
- # secret. The client ID is considered public information, and is used to
20
- # build login URLs, or included in Javascript source code on a page.
21
- # @return [String]
22
- attr_accessor :client_id
23
-
24
- # After registering your app, you will receive a client ID and a client
25
- # secret. The client ID is considered public information, and is used to
26
- # build login URLs, or included in Javascript source code on a page. The
27
- # client secret must be kept confidential.
28
- # @return [String]
29
- attr_accessor :client_secret
30
-
31
- # A mapping from model property names to API property names.
32
- def self.names
33
- @_hash = {} if @_hash.nil?
34
- @_hash['grant_type'] = 'grant_type'
35
- @_hash['client_id'] = 'client_id'
36
- @_hash['client_secret'] = 'client_secret'
37
- @_hash
38
- end
39
-
40
- # An array for optional fields
41
- def self.optionals
42
- []
43
- end
44
-
45
- # An array for nullable fields
46
- def self.nullables
47
- []
48
- end
49
-
50
- def initialize(grant_type = 'client_credentials',
51
- client_id = 'SOFflRakNlwnWlxfOXQ4GHDVyqGawuKA',
52
- client_secret = 'cRnWgw7gACqM3gVS')
53
- @grant_type = grant_type
54
- @client_id = client_id
55
- @client_secret = client_secret
56
- end
57
-
58
- # Creates an instance of the object from a hash.
59
- def self.from_hash(hash)
60
- return nil unless hash
61
-
62
- # Extract variables from the hash.
63
- grant_type = hash['grant_type'] ||= 'client_credentials'
64
- client_id = hash['client_id'] ||= 'SOFflRakNlwnWlxfOXQ4GHDVyqGawuKA'
65
- client_secret = hash['client_secret'] ||= 'cRnWgw7gACqM3gVS'
66
-
67
- # Create object from extracted values.
68
- OauthTokenPostRequestBody.new(grant_type,
69
- client_id,
70
- client_secret)
71
- end
72
- end
73
- end
@@ -1,73 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # PartnerTokenRequestBody Model.
8
- class PartnerTokenRequestBody < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # In OAuth 2.0, the term grant typee refers to the way an application gets
13
- # an access token. OAuth 2.0 defines several grant types, including the
14
- # authorization code flow.
15
- # @return [String]
16
- attr_accessor :grant_type
17
-
18
- # After registering your app, you will receive a client ID and a client
19
- # secret. The client ID is considered public information, and is used to
20
- # build login URLs, or included in Javascript source code on a page.
21
- # @return [String]
22
- attr_accessor :client_id
23
-
24
- # After registering your app, you will receive a client ID and a client
25
- # secret. The client ID is considered public information, and is used to
26
- # build login URLs, or included in Javascript source code on a page. The
27
- # client secret must be kept confidential.
28
- # @return [String]
29
- attr_accessor :client_secret
30
-
31
- # A mapping from model property names to API property names.
32
- def self.names
33
- @_hash = {} if @_hash.nil?
34
- @_hash['grant_type'] = 'grant_type'
35
- @_hash['client_id'] = 'client_id'
36
- @_hash['client_secret'] = 'client_secret'
37
- @_hash
38
- end
39
-
40
- # An array for optional fields
41
- def self.optionals
42
- []
43
- end
44
-
45
- # An array for nullable fields
46
- def self.nullables
47
- []
48
- end
49
-
50
- def initialize(grant_type = 'client_credentials',
51
- client_id = 'SOFflRakNlwnWlxfOXQ4GHDVyqGawuKA',
52
- client_secret = 'cRnWgw7gACqM3gVS')
53
- @grant_type = grant_type
54
- @client_id = client_id
55
- @client_secret = client_secret
56
- end
57
-
58
- # Creates an instance of the object from a hash.
59
- def self.from_hash(hash)
60
- return nil unless hash
61
-
62
- # Extract variables from the hash.
63
- grant_type = hash['grant_type'] ||= 'client_credentials'
64
- client_id = hash['client_id'] ||= 'SOFflRakNlwnWlxfOXQ4GHDVyqGawuKA'
65
- client_secret = hash['client_secret'] ||= 'cRnWgw7gACqM3gVS'
66
-
67
- # Create object from extracted values.
68
- PartnerTokenRequestBody.new(grant_type,
69
- client_id,
70
- client_secret)
71
- end
72
- end
73
- end
@@ -1,16 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- module ShellEv
7
- # A utility to allow users to set the content-type for files
8
- class FileWrapper < CoreLibrary::FileWrapper
9
- # The constructor.
10
- # @param [File] file The file to be sent in the request.
11
- # @param [string] content_type The content type of the provided file.
12
- def initialize(file, content_type: 'application/octet-stream')
13
- super
14
- end
15
- end
16
- end
data/lib/shell_ev.rb DELETED
@@ -1,85 +0,0 @@
1
- # shell_ev
2
- #
3
- # This file was automatically generated by APIMATIC v2.0
4
- # ( https://apimatic.io ).
5
-
6
- require 'date'
7
- require 'json'
8
-
9
- require 'apimatic_core_interfaces'
10
- require 'apimatic_core'
11
- require 'apimatic_faraday_client_adapter'
12
-
13
- require_relative 'shell_ev/api_helper'
14
- require_relative 'shell_ev/client'
15
-
16
- # Utilities
17
- require_relative 'shell_ev/utilities/file_wrapper'
18
- require_relative 'shell_ev/utilities/date_time_helper'
19
-
20
- # Http
21
- require_relative 'shell_ev/http/http_call_back'
22
- require_relative 'shell_ev/http/http_method_enum'
23
- require_relative 'shell_ev/http/http_request'
24
- require_relative 'shell_ev/http/http_response'
25
-
26
- # Logger
27
- require_relative 'shell_ev/http/auth/mpp_token'
28
- require_relative 'shell_ev/http/auth/o_auth_token_post'
29
-
30
- # Models
31
- require_relative 'shell_ev/models/base_model'
32
- require_relative 'shell_ev/models/collecting_company'
33
- require_relative 'shell_ev/models/mobile_payment_registration_request'
34
- require_relative 'shell_ev/models/around_location_array'
35
- require_relative 'shell_ev/models/payment_enablement_response'
36
- require_relative 'shell_ev/models/access_token_response'
37
- require_relative 'shell_ev/models/mpp_acces_token_response'
38
- require_relative 'shell_ev/models/prepare_fueling_request'
39
- require_relative 'shell_ev/models/loyalty_details'
40
- require_relative 'shell_ev/models/payment_details_items'
41
- require_relative 'shell_ev/models/payment_properties'
42
- require_relative 'shell_ev/models/prepare_fueling_response'
43
- require_relative 'shell_ev/models/cancel_fueling_error_response'
44
- require_relative 'shell_ev/models/mpp_error'
45
- require_relative 'shell_ev/models/fault_response'
46
- require_relative 'shell_ev/models/finalise_fueling_request'
47
- require_relative 'shell_ev/models/cancel_fueling_request'
48
- require_relative 'shell_ev/models/oauth_token_post_request_body'
49
- require_relative 'shell_ev/models/mpp_token_request_body'
50
- require_relative 'shell_ev/models/partner_token_request_body'
51
- require_relative 'shell_ev/models/around_location_array_data_items'
52
- require_relative 'shell_ev/models/around_location_array_data_items_loc'
53
- require_relative 'shell_ev/models/' \
54
- 'around_location_array_data_items_opening_hours_items'
55
- require_relative 'shell_ev/models/prepare_fueling_request_device_details_items'
56
- require_relative 'shell_ev/models/fault_response_fault'
57
- require_relative 'shell_ev/models/fault_response_fault_detail'
58
- require_relative 'shell_ev/models/finalise_fueling_request_payment'
59
- require_relative 'shell_ev/models/finalise_fueling_request_products_items'
60
-
61
- # Exceptions
62
- require_relative 'shell_ev/exceptions/api_exception'
63
- require_relative 'shell_ev/exceptions/' \
64
- 'payment_enablement_error_response_exception'
65
- require_relative 'shell_ev/exceptions/access_token_error_exception'
66
- require_relative 'shell_ev/exceptions/mpp_acces_token_error_response_exception'
67
- require_relative 'shell_ev/exceptions/station_locator_unauthorized_exception'
68
- require_relative 'shell_ev/exceptions/station_locator_bad_request_exception'
69
- require_relative 'shell_ev/exceptions/station_locator_not_found_exception'
70
- require_relative 'shell_ev/exceptions/station_locator_forbidden_exception'
71
- require_relative 'shell_ev/exceptions/' \
72
- 'station_locator_internal_server_error_exception'
73
- require_relative 'shell_ev/exceptions/' \
74
- 'cancel_fueling_error_response_error_exception'
75
-
76
- require_relative 'shell_ev/configuration'
77
-
78
- # Controllers
79
- require_relative 'shell_ev/controllers/base_controller'
80
- require_relative 'shell_ev/controllers/' \
81
- 'shell_api_platform_security_authentication_controller'
82
- require_relative 'shell_ev/controllers/digital_payment_enablement_controller'
83
- require_relative 'shell_ev/controllers/station_locator_controller'
84
- require_relative 'shell_ev/controllers/fueling_controller'
85
- require_relative 'shell_ev/controllers/partner_notification_controller'