digital-payments-sdk 1.1.0 → 1.2.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/LICENSE +1 -1
- data/README.md +16 -16
- data/lib/shell_smart_pay_api/controllers/station_locator_controller.rb +13 -1
- data/lib/shell_smart_pay_api/models/type_enum.rb +29 -0
- data/lib/shell_smart_pay_api.rb +1 -0
- data/test/controllers/test_station_locator_controller.rb +2 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ee03880942dd2e9588b8080238f922952bdfbb088daf522f774a0a8b5c60ee9
|
4
|
+
data.tar.gz: 1f2db2b01421612106aa5918892d164bccb73716923cbc0e94a6210b7b12f053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eeffd7932b5fca6ed4cba9487fdea3945fe5959fdce776069fef71f506e02079c615c83a257926cfa72df5edc898153971a905776391cc4fb0b1f89393437a2c
|
7
|
+
data.tar.gz: ee556e28f9322702cc33e219ac6fb1f62a018c9229a81a7e767073bb85dbdf68f80983c0e64415e95e2dc919ce06327a8ffd03898cef447ff0c84fd2c0008072
|
data/LICENSE
CHANGED
@@ -3,7 +3,7 @@ License:
|
|
3
3
|
The MIT License (MIT)
|
4
4
|
http://opensource.org/licenses/MIT
|
5
5
|
|
6
|
-
Copyright (c) 2014 -
|
6
|
+
Copyright (c) 2014 - 2025 APIMATIC Limited
|
7
7
|
|
8
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
9
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -10,16 +10,16 @@ The APIs detailed within this document will enable Shell's Fleet Solutions Custo
|
|
10
10
|
Install the gem from the command line:
|
11
11
|
|
12
12
|
```bash
|
13
|
-
gem install digital-payments-sdk -v 1.
|
13
|
+
gem install digital-payments-sdk -v 1.2.0
|
14
14
|
```
|
15
15
|
|
16
16
|
Or add the gem to your Gemfile and run `bundle`:
|
17
17
|
|
18
18
|
```ruby
|
19
|
-
gem 'digital-payments-sdk', '1.
|
19
|
+
gem 'digital-payments-sdk', '1.2.0'
|
20
20
|
```
|
21
21
|
|
22
|
-
For additional gem details, see the [RubyGems page for the digital-payments-sdk gem](https://rubygems.org/gems/digital-payments-sdk/versions/1.
|
22
|
+
For additional gem details, see the [RubyGems page for the digital-payments-sdk gem](https://rubygems.org/gems/digital-payments-sdk/versions/1.2.0).
|
23
23
|
|
24
24
|
## Test the SDK
|
25
25
|
|
@@ -31,7 +31,7 @@ rake
|
|
31
31
|
|
32
32
|
## Initialize the API Client
|
33
33
|
|
34
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
34
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/client.md)
|
35
35
|
|
36
36
|
The following parameters are configurable for the API Client:
|
37
37
|
|
@@ -47,8 +47,8 @@ The following parameters are configurable for the API Client:
|
|
47
47
|
| `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
48
48
|
| `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
49
49
|
| `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
50
|
-
| `mpp_token_credentials` | [`MppTokenCredentials`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
51
|
-
| `o_auth_token_post_credentials` | [`OAuthTokenPostCredentials`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
50
|
+
| `mpp_token_credentials` | [`MppTokenCredentials`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/auth/custom-header-signature.md) | The credential object for Custom Header Signature |
|
51
|
+
| `o_auth_token_post_credentials` | [`OAuthTokenPostCredentials`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/auth/custom-header-signature-1.md) | The credential object for Custom Header Signature |
|
52
52
|
|
53
53
|
The API client can be initialized as follows:
|
54
54
|
|
@@ -79,20 +79,20 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
79
79
|
|
80
80
|
This API uses the following authentication schemes.
|
81
81
|
|
82
|
-
* [`MppToken (Custom Header Signature)`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
83
|
-
* [`oAuthTokenPost (Custom Header Signature)`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
82
|
+
* [`MppToken (Custom Header Signature)`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/auth/custom-header-signature.md)
|
83
|
+
* [`oAuthTokenPost (Custom Header Signature)`](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/auth/custom-header-signature-1.md)
|
84
84
|
|
85
85
|
## List of APIs
|
86
86
|
|
87
|
-
* [Shell API Platform Security Authentication](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
88
|
-
* [Digital Payment Enablement](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
89
|
-
* [Station Locator](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
90
|
-
* [Partner Notification](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
91
|
-
* [Fueling](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
87
|
+
* [Shell API Platform Security Authentication](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/controllers/shell-api-platform-security-authentication.md)
|
88
|
+
* [Digital Payment Enablement](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/controllers/digital-payment-enablement.md)
|
89
|
+
* [Station Locator](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/controllers/station-locator.md)
|
90
|
+
* [Partner Notification](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/controllers/partner-notification.md)
|
91
|
+
* [Fueling](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/controllers/fueling.md)
|
92
92
|
|
93
93
|
## Classes Documentation
|
94
94
|
|
95
|
-
* [Utility Classes](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
96
|
-
* [HttpResponse](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
97
|
-
* [HttpRequest](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.
|
95
|
+
* [Utility Classes](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/utility-classes.md)
|
96
|
+
* [HttpResponse](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/http-response.md)
|
97
|
+
* [HttpRequest](https://www.github.com/sdks-io/digital-payments-ruby-sdk/tree/1.2.0/doc/http-request.md)
|
98
98
|
|
@@ -29,6 +29,16 @@ module ShellSmartPayApi
|
|
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
|
+
# @param [TypeEnum] type Optional parameter: All fuel stations are of at
|
33
|
+
# least one Type, indicating whether it is Shell-branded or not, and if the
|
34
|
+
# station can be used by trucks. Note that a station can have more than one
|
35
|
+
# Type (e.g. Shell retail sites (Type=0) can also be truck friendly
|
36
|
+
# (Type=2)). Type values are as follows: * 0 = Shell owned/branded
|
37
|
+
# stations that are not also Type=2 or Type=3 * 1 = Partner stations
|
38
|
+
# accepting Shell Card * 2 = Shell owned/branded stations that are truck
|
39
|
+
# friendly but not Type=3 * 3 = Shell owned/branded stations that are
|
40
|
+
# truck only <br/>**When type is not provided, API will return type 0 and
|
41
|
+
# 2 only.**
|
32
42
|
# @return [AroundLocationArray] response from the API call.
|
33
43
|
def stationlocator_v1_stations_get_around_location(m,
|
34
44
|
lon,
|
@@ -37,7 +47,8 @@ module ShellSmartPayApi
|
|
37
47
|
offer_code: nil,
|
38
48
|
n: nil,
|
39
49
|
amenities: nil,
|
40
|
-
countries: nil
|
50
|
+
countries: nil,
|
51
|
+
type: nil)
|
41
52
|
new_api_call_builder
|
42
53
|
.request(new_request_builder(HttpMethodEnum::GET,
|
43
54
|
'/SiteData/v1/stations',
|
@@ -50,6 +61,7 @@ module ShellSmartPayApi
|
|
50
61
|
.query_param(new_parameter(n, key: 'n'))
|
51
62
|
.query_param(new_parameter(amenities, key: 'amenities'))
|
52
63
|
.query_param(new_parameter(countries, key: 'countries'))
|
64
|
+
.query_param(new_parameter(type, key: 'type'))
|
53
65
|
.header_param(new_parameter('application/json', key: 'accept'))
|
54
66
|
.auth(Single.new('oAuthTokenPost')))
|
55
67
|
.response(new_response_handler
|
@@ -0,0 +1,29 @@
|
|
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
|
+
# type.
|
8
|
+
class TypeEnum
|
9
|
+
TYPE_ENUM = [
|
10
|
+
# TODO: Write general description for ENUM_0
|
11
|
+
ENUM_0 = 0,
|
12
|
+
|
13
|
+
# TODO: Write general description for ENUM_1
|
14
|
+
ENUM_1 = 1,
|
15
|
+
|
16
|
+
# TODO: Write general description for ENUM_2
|
17
|
+
ENUM_2 = 2,
|
18
|
+
|
19
|
+
# TODO: Write general description for ENUM_3
|
20
|
+
ENUM_3 = 3
|
21
|
+
].freeze
|
22
|
+
|
23
|
+
def self.validate(value)
|
24
|
+
return false if value.nil?
|
25
|
+
|
26
|
+
TYPE_ENUM.include?(value)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/shell_smart_pay_api.rb
CHANGED
@@ -54,6 +54,7 @@ require_relative 'shell_smart_pay_api/models/loc'
|
|
54
54
|
require_relative 'shell_smart_pay_api/models/opening_hour'
|
55
55
|
require_relative 'shell_smart_pay_api/models/payment'
|
56
56
|
require_relative 'shell_smart_pay_api/models/product'
|
57
|
+
require_relative 'shell_smart_pay_api/models/type_enum'
|
57
58
|
|
58
59
|
# Exceptions
|
59
60
|
require_relative 'shell_smart_pay_api/exceptions/api_exception'
|
@@ -24,11 +24,12 @@ class StationLocatorControllerTests < ControllerTestBase
|
|
24
24
|
n = nil
|
25
25
|
amenities = nil
|
26
26
|
countries = nil
|
27
|
+
type = nil
|
27
28
|
|
28
29
|
# Perform the API call through the SDK function
|
29
30
|
result = @controller.stationlocator_v1_stations_get_around_location(
|
30
31
|
m, lon, lat, radius, offer_code: offer_code, n: n, amenities: amenities,
|
31
|
-
countries: countries
|
32
|
+
countries: countries, type: type
|
32
33
|
)
|
33
34
|
|
34
35
|
# Test response code
|
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.
|
4
|
+
version: 1.2.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:
|
11
|
+
date: 2025-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: apimatic_core_interfaces
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/shell_smart_pay_api/models/prepare_fueling_request.rb
|
143
143
|
- lib/shell_smart_pay_api/models/prepare_fueling_response.rb
|
144
144
|
- lib/shell_smart_pay_api/models/product.rb
|
145
|
+
- lib/shell_smart_pay_api/models/type_enum.rb
|
145
146
|
- lib/shell_smart_pay_api/utilities/date_time_helper.rb
|
146
147
|
- lib/shell_smart_pay_api/utilities/file_wrapper.rb
|
147
148
|
- test/controllers/controller_test_base.rb
|