loyalty-sdk 0.0.1 → 0.0.3
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 275277ce790b447c540b49a8558e46a5dd8e55b94b6e6f68a4361c0b512b15d1
|
|
4
|
+
data.tar.gz: 7ef8b395b23f48f970108a8593617beb67818b23ce978fb87da7382fc3a3d281
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ef2859cb20b3c39a61315940739d9750c76f146d1ba8426871467426df4c0ec6d8f0da9a88adf818e7559e2c5086caea97aa7a2db865ae77b557ec11ee10a736
|
|
7
|
+
data.tar.gz: dd46bd71b0f0994c7343cc688105b6d701f111657384d116ad365fac00944ea8fb81ce436283024aabe789cb500cbf93ce095a8e2fa981af0f39d8e15bfd0e72
|
data/README.md
CHANGED
|
@@ -10,16 +10,16 @@ Loyalty Account Management provides the end points needed in order to generate t
|
|
|
10
10
|
Install the gem from the command line:
|
|
11
11
|
|
|
12
12
|
```bash
|
|
13
|
-
gem install loyalty-sdk -v 0.0.
|
|
13
|
+
gem install loyalty-sdk -v 0.0.3
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
Or add the gem to your Gemfile and run `bundle`:
|
|
17
17
|
|
|
18
18
|
```ruby
|
|
19
|
-
gem 'loyalty-sdk', '0.0.
|
|
19
|
+
gem 'loyalty-sdk', '0.0.3'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
-
For additional gem details, see the [RubyGems page for the loyalty-sdk gem](https://rubygems.org/gems/loyalty-sdk/versions/0.0.
|
|
22
|
+
For additional gem details, see the [RubyGems page for the loyalty-sdk gem](https://rubygems.org/gems/loyalty-sdk/versions/0.0.3).
|
|
23
23
|
|
|
24
24
|
## IRB Console Usage
|
|
25
25
|
|
|
@@ -58,13 +58,13 @@ ruby bin/console
|
|
|
58
58
|
|
|
59
59
|
## Initialize the API Client
|
|
60
60
|
|
|
61
|
-
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
61
|
+
**_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/client.md)
|
|
62
62
|
|
|
63
63
|
The following parameters are configurable for the API Client:
|
|
64
64
|
|
|
65
65
|
| Parameter | Type | Description |
|
|
66
66
|
| --- | --- | --- |
|
|
67
|
-
| environment | [`Environment`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
67
|
+
| environment | [`Environment`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/README.md#environments) | The API environment. <br> **Default: `Environment.SIT`** |
|
|
68
68
|
| connection | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
|
|
69
69
|
| adapter | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
|
|
70
70
|
| timeout | `Float` | The value to use for connection timeout. <br> **Default: 30** |
|
|
@@ -74,13 +74,13 @@ The following parameters are configurable for the API Client:
|
|
|
74
74
|
| retry_statuses | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
|
|
75
75
|
| retry_methods | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
|
|
76
76
|
| http_callback | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
|
|
77
|
-
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
78
|
-
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
79
|
-
| public_bearer_token_credentials | [`PublicBearerTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
80
|
-
| public_basic_token_credentials | [`PublicBasicTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
81
|
-
| private_basic_token_credentials | [`PrivateBasicTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
82
|
-
| client_authorization_token_credentials | [`ClientAuthorizationTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
83
|
-
| customer_header_credentials | [`CustomerHeaderCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
77
|
+
| proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
|
|
78
|
+
| logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/logging-configuration.md) | The SDK logging configuration for API calls |
|
|
79
|
+
| public_bearer_token_credentials | [`PublicBearerTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
|
|
80
|
+
| public_basic_token_credentials | [`PublicBasicTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature.md) | The credential object for Custom Header Signature |
|
|
81
|
+
| private_basic_token_credentials | [`PrivateBasicTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature-1.md) | The credential object for Custom Header Signature |
|
|
82
|
+
| client_authorization_token_credentials | [`ClientAuthorizationTokenCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
|
|
83
|
+
| customer_header_credentials | [`CustomerHeaderCredentials`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature-2.md) | The credential object for Custom Header Signature |
|
|
84
84
|
|
|
85
85
|
The API client can be initialized as follows:
|
|
86
86
|
|
|
@@ -130,7 +130,7 @@ include LoyaltyApIs
|
|
|
130
130
|
client = Client.from_env
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
133
|
+
See the [`Environment-Based Client Initialization`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/environment-based-client-initialization.md) section for details.
|
|
134
134
|
|
|
135
135
|
## Environments
|
|
136
136
|
|
|
@@ -148,40 +148,40 @@ The SDK can be configured to use a different environment for making API calls. A
|
|
|
148
148
|
|
|
149
149
|
This API uses the following authentication schemes.
|
|
150
150
|
|
|
151
|
-
* [`PublicBearerToken (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
152
|
-
* [`PublicBasicToken (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
153
|
-
* [`PrivateBasicToken (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
154
|
-
* [`client-authorization-token (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
155
|
-
* [`customerHeader (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
151
|
+
* [`PublicBearerToken (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/oauth-2-bearer-token.md)
|
|
152
|
+
* [`PublicBasicToken (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature.md)
|
|
153
|
+
* [`PrivateBasicToken (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature-1.md)
|
|
154
|
+
* [`client-authorization-token (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/oauth-2-client-credentials-grant.md)
|
|
155
|
+
* [`customerHeader (Custom Header Signature)`](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/auth/custom-header-signature-2.md)
|
|
156
156
|
|
|
157
157
|
## List of APIs
|
|
158
158
|
|
|
159
|
-
* [Profile Management](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
160
|
-
* [Authorization](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
161
|
-
* [Offer](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
162
|
-
* [Balances](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
163
|
-
* [Redemption](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
164
|
-
* [Transaction](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
159
|
+
* [Profile Management](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/profile-management.md)
|
|
160
|
+
* [Authorization](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/authorization.md)
|
|
161
|
+
* [Offer](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/offer.md)
|
|
162
|
+
* [Balances](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/balances.md)
|
|
163
|
+
* [Redemption](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/redemption.md)
|
|
164
|
+
* [Transaction](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/controllers/transaction.md)
|
|
165
165
|
|
|
166
166
|
## SDK Infrastructure
|
|
167
167
|
|
|
168
168
|
### Configuration
|
|
169
169
|
|
|
170
|
-
* [ProxySettings](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
171
|
-
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
172
|
-
* [AbstractLogger](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
173
|
-
* [LoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
174
|
-
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
175
|
-
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
170
|
+
* [ProxySettings](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/proxy-settings.md)
|
|
171
|
+
* [Environment-Based Client Initialization](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/environment-based-client-initialization.md)
|
|
172
|
+
* [AbstractLogger](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/abstract-logger.md)
|
|
173
|
+
* [LoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/logging-configuration.md)
|
|
174
|
+
* [RequestLoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/request-logging-configuration.md)
|
|
175
|
+
* [ResponseLoggingConfiguration](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/response-logging-configuration.md)
|
|
176
176
|
|
|
177
177
|
### HTTP
|
|
178
178
|
|
|
179
|
-
* [HttpResponse](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
180
|
-
* [HttpRequest](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
179
|
+
* [HttpResponse](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/http-response.md)
|
|
180
|
+
* [HttpRequest](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/http-request.md)
|
|
181
181
|
|
|
182
182
|
### Utilities
|
|
183
183
|
|
|
184
|
-
* [ApiResponse](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
185
|
-
* [ApiHelper](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
186
|
-
* [DateTimeHelper](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.
|
|
184
|
+
* [ApiResponse](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/api-response.md)
|
|
185
|
+
* [ApiHelper](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/api-helper.md)
|
|
186
|
+
* [DateTimeHelper](https://www.github.com/sdks-io/loyalty-ruby-sdk/tree/0.0.3/doc/date-time-helper.md)
|
|
187
187
|
|
|
@@ -10,7 +10,7 @@ module LoyaltyApIs
|
|
|
10
10
|
attr_accessor :config, :http_call_back
|
|
11
11
|
|
|
12
12
|
def self.user_agent
|
|
13
|
-
'Ruby-SDK/0.0.
|
|
13
|
+
'Ruby-SDK/0.0.3 (OS: {os-info}, Engine: {engine}/{engine-version})'
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def self.user_agent_parameters
|
|
@@ -6,16 +6,16 @@
|
|
|
6
6
|
module LoyaltyApIs
|
|
7
7
|
# ProfileManagementApi
|
|
8
8
|
class ProfileManagementApi < BaseApi
|
|
9
|
-
# This endpoint allows get the Access Code from
|
|
9
|
+
# This endpoint allows get the Access Code from /api/v2/auth/accessCode
|
|
10
10
|
# endpoint. Use the *accessToken* obtained using
|
|
11
|
-
#
|
|
11
|
+
# /api/v2/auth/exchangeAccessCode as Bearer in the Authorization header.
|
|
12
12
|
# @param [String] x_sso_market Required parameter: A combination of
|
|
13
13
|
# [language code](https://www.iso.org/standard/22109.html) (lower case) and
|
|
14
14
|
# [country code](https://www.iso.org/iso-3166-country-codes.html) (upper
|
|
15
15
|
# case), separated by a hyphen. For example: **en-TH**.
|
|
16
16
|
# @param [Object] authorization Required parameter: The input value is
|
|
17
17
|
# **Bearer {{accessToken}}**. The value of *accessToken* is retrieved from
|
|
18
|
-
# the
|
|
18
|
+
# the /auth/exchangeAccessCode endpoint.
|
|
19
19
|
# @return [ApiResponse] Complete http response with raw body and status code.
|
|
20
20
|
def access_code(x_sso_market,
|
|
21
21
|
authorization)
|
|
@@ -26,7 +26,7 @@ module LoyaltyApIs
|
|
|
26
26
|
# @param [String] consumer_uuid Required parameter: This is the consumer's
|
|
27
27
|
# or customer's unique SSO UUID.
|
|
28
28
|
# @param [String] user_authorization_token Required parameter: This is the
|
|
29
|
-
# consumer's SSO access, which you retrieved from
|
|
29
|
+
# consumer's SSO access, which you retrieved from /auth/exchangeAccessCode
|
|
30
30
|
# endpoint prefixed by Bearer.
|
|
31
31
|
# @param [String] application Required parameter: This is the calling
|
|
32
32
|
# application.
|