ultracart_api 4.1.125 → 4.1.127
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 +6 -4
- data/docs/OauthApi.md +52 -0
- data/docs/OauthMeResponse.md +26 -0
- data/docs/OauthTokenResponse.md +2 -0
- data/docs/OrderSummary.md +4 -0
- data/lib/ultracart_api/api/oauth_api.rb +58 -0
- data/lib/ultracart_api/models/oauth_me_response.rb +262 -0
- data/lib/ultracart_api/models/oauth_token_response.rb +11 -1
- data/lib/ultracart_api/models/order_summary.rb +19 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '08460676e9c199d66136e10351264de997b68df8db29959ccf3aba26b2fe2760'
|
|
4
|
+
data.tar.gz: d9bfaebb7453c3fa66412e114499644912e27e9a57d0781efa9d20e50e6c7c59
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a7aaddf46d4adc2db245c572560fb06065d21f45d7035ae28a92dbfab4cc8255fe4ca0c99058f21d85d3dddf378e7a7bc46692e325ed4a8a592bc17b9ffb6c1
|
|
7
|
+
data.tar.gz: 73381ec98aa4a285b9f91da2a4a4191533acb094065417b73ae60074fe3606687caf7dbc50313743fbbe5effd65f5229c51b668ee38f3ab6d6e3c314a096a65e
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 4.1.
|
|
10
|
+
- Package version: 4.1.127
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
|
16
16
|
gemfile:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
gem 'ultracart_api', '4.1.
|
|
19
|
+
gem 'ultracart_api', '4.1.127'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -426,6 +426,7 @@ Class | Method | HTTP request | Description
|
|
|
426
426
|
*UltracartClient::ItemApi* | [**upload_temporary_multimedia**](docs/ItemApi.md#upload_temporary_multimedia) | **POST** /item/temp_multimedia | Upload an image to the temporary multimedia.
|
|
427
427
|
*UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
|
|
428
428
|
*UltracartClient::OauthApi* | [**oauth_device_authorize**](docs/OauthApi.md#oauth_device_authorize) | **POST** /oauth/device/authorize | Initiate a device authorization flow.
|
|
429
|
+
*UltracartClient::OauthApi* | [**oauth_me**](docs/OauthApi.md#oauth_me) | **GET** /oauth/me | Identify the merchant account this access token belongs to.
|
|
429
430
|
*UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
|
|
430
431
|
*UltracartClient::OrderApi* | [**adjust_order_total**](docs/OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
|
|
431
432
|
*UltracartClient::OrderApi* | [**assign_to_affiliate**](docs/OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
|
|
@@ -1489,6 +1490,7 @@ Class | Method | HTTP request | Description
|
|
|
1489
1490
|
- [UltracartClient::Metric](docs/Metric.md)
|
|
1490
1491
|
- [UltracartClient::Notification](docs/Notification.md)
|
|
1491
1492
|
- [UltracartClient::OauthDeviceAuthorizationResponse](docs/OauthDeviceAuthorizationResponse.md)
|
|
1493
|
+
- [UltracartClient::OauthMeResponse](docs/OauthMeResponse.md)
|
|
1492
1494
|
- [UltracartClient::OauthRevokeSuccessResponse](docs/OauthRevokeSuccessResponse.md)
|
|
1493
1495
|
- [UltracartClient::OauthTokenResponse](docs/OauthTokenResponse.md)
|
|
1494
1496
|
- [UltracartClient::Order](docs/Order.md)
|
|
@@ -1782,8 +1784,6 @@ Class | Method | HTTP request | Description
|
|
|
1782
1784
|
- auto_order_write: Allows you to write auto order information.
|
|
1783
1785
|
- channel_partner_read: Allows you to read channel partner information.
|
|
1784
1786
|
- channel_partner_write: Allows you to write channel partner information.
|
|
1785
|
-
- chargeback_read: Allows you to read chargeback information.
|
|
1786
|
-
- chargeback_write: Allows you to write chargeback information.
|
|
1787
1787
|
- checkout_read: Allows you to read checkout information.
|
|
1788
1788
|
- checkout_write: Allows you to write checkout information.
|
|
1789
1789
|
- configuration_read: Allows you to read configuration information.
|
|
@@ -1834,6 +1834,8 @@ Not every change is committed to every SDK.
|
|
|
1834
1834
|
|
|
1835
1835
|
| Version | Date | Comments |
|
|
1836
1836
|
| --: | :-: | --- |
|
|
1837
|
+
| 4.1.127 | 08/13/2026 | added arbitrary discounts to order creation for historical imports |
|
|
1838
|
+
| 4.1.126 | 08/10/2026 | oauth - add /oauth/me method to assist application in indentifying the connected account |
|
|
1837
1839
|
| 4.1.125 | 08/06/2026 | order api - ability to query by bin and last 4 in unlimited scenarios for chargeback order association |
|
|
1838
1840
|
| 4.1.124 | 08/04/2026 | customer - method to remove customer profile from email suppression |
|
|
1839
1841
|
| 4.1.123 | 08/04/2026 | customer - method to remove customer profile from email suppression |
|
data/docs/OauthApi.md
CHANGED
|
@@ -6,6 +6,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**oauth_access_token**](OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token. |
|
|
8
8
|
| [**oauth_device_authorize**](OauthApi.md#oauth_device_authorize) | **POST** /oauth/device/authorize | Initiate a device authorization flow. |
|
|
9
|
+
| [**oauth_me**](OauthApi.md#oauth_me) | **GET** /oauth/me | Identify the merchant account this access token belongs to. |
|
|
9
10
|
| [**oauth_revoke**](OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application. |
|
|
10
11
|
|
|
11
12
|
|
|
@@ -178,6 +179,57 @@ end
|
|
|
178
179
|
- **Accept**: application/json
|
|
179
180
|
|
|
180
181
|
|
|
182
|
+
## oauth_me
|
|
183
|
+
|
|
184
|
+
> oauth_me
|
|
185
|
+
|
|
186
|
+
Identify the merchant account this access token belongs to.
|
|
187
|
+
|
|
188
|
+
Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application's configured permissions.
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
### Examples
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
(No example for this operation).
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
#### Using the oauth_me_with_http_info variant
|
|
198
|
+
|
|
199
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
200
|
+
|
|
201
|
+
> <Array(nil, Integer, Hash)> oauth_me_with_http_info
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
begin
|
|
205
|
+
# Identify the merchant account this access token belongs to.
|
|
206
|
+
data, status_code, headers = api_instance.oauth_me_with_http_info
|
|
207
|
+
p status_code # => 2xx
|
|
208
|
+
p headers # => { ... }
|
|
209
|
+
p data # => nil
|
|
210
|
+
rescue UltracartClient::ApiError => e
|
|
211
|
+
puts "Error when calling OauthApi->oauth_me_with_http_info: #{e}"
|
|
212
|
+
end
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
This endpoint does not need any parameter.
|
|
218
|
+
|
|
219
|
+
### Return type
|
|
220
|
+
|
|
221
|
+
nil (empty response body)
|
|
222
|
+
|
|
223
|
+
### Authorization
|
|
224
|
+
|
|
225
|
+
[ultraCartOauth](../README.md#ultraCartOauth)
|
|
226
|
+
|
|
227
|
+
### HTTP request headers
|
|
228
|
+
|
|
229
|
+
- **Content-Type**: Not defined
|
|
230
|
+
- **Accept**: application/json
|
|
231
|
+
|
|
232
|
+
|
|
181
233
|
## oauth_revoke
|
|
182
234
|
|
|
183
235
|
> <OauthRevokeSuccessResponse> oauth_revoke(client_id, token)
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# UltracartClient::OauthMeResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **application_name** | **String** | The name of your application as the merchant approved it. | [optional] |
|
|
8
|
+
| **client_id** | **String** | Your application's client_id. Null when authenticating with a simple key, which is not tied to an application. | [optional] |
|
|
9
|
+
| **merchant_id** | **String** | The UltraCart merchant account that authorized your application. Stable, and the value to key your own records on. | [optional] |
|
|
10
|
+
| **merchant_name** | **String** | The account's company name, suitable for displaying to your user. The merchant can change this, so display it rather than storing it as an identifier. | [optional] |
|
|
11
|
+
| **scopes** | **Array<String>** | The permissions the merchant granted. May be narrower than the permissions your application currently requests. | [optional] |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ultracart_api'
|
|
17
|
+
|
|
18
|
+
instance = UltracartClient::OauthMeResponse.new(
|
|
19
|
+
application_name: null,
|
|
20
|
+
client_id: null,
|
|
21
|
+
merchant_id: null,
|
|
22
|
+
merchant_name: null,
|
|
23
|
+
scopes: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
data/docs/OauthTokenResponse.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **error_description** | **String** | | [optional] |
|
|
10
10
|
| **error_uri** | **String** | | [optional] |
|
|
11
11
|
| **expires_in** | **String** | The number of seconds since issuance when the access token will expire and need to be refreshed using the refresh token | [optional] |
|
|
12
|
+
| **merchant_id** | **String** | The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name. | [optional] |
|
|
12
13
|
| **refresh_token** | **String** | The refresh token that should be used to fetch a new access token when the expiration occurs | [optional] |
|
|
13
14
|
| **scope** | **String** | The scope of permissions associated with teh access token | [optional] |
|
|
14
15
|
| **token_type** | **String** | Type of token | [optional] |
|
|
@@ -24,6 +25,7 @@ instance = UltracartClient::OauthTokenResponse.new(
|
|
|
24
25
|
error_description: null,
|
|
25
26
|
error_uri: null,
|
|
26
27
|
expires_in: null,
|
|
28
|
+
merchant_id: null,
|
|
27
29
|
refresh_token: null,
|
|
28
30
|
scope: null,
|
|
29
31
|
token_type: null
|
data/docs/OrderSummary.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
| **actual_profit_review** | **Boolean** | Actual profit needs review | [optional] |
|
|
13
13
|
| **actual_shipping** | [**Currency**](Currency.md) | | [optional] |
|
|
14
14
|
| **arbitrary_shipping_handling_total** | [**Currency**](Currency.md) | | [optional] |
|
|
15
|
+
| **arbitrary_subtotal_discount** | [**Currency**](Currency.md) | | [optional] |
|
|
16
|
+
| **arbitrary_taxable_subtotal_discount** | [**Currency**](Currency.md) | | [optional] |
|
|
15
17
|
| **health_benefit_card_amount** | [**Currency**](Currency.md) | | [optional] |
|
|
16
18
|
| **health_benefit_card_refunded** | [**Currency**](Currency.md) | | [optional] |
|
|
17
19
|
| **internal_gift_certificate_amount** | [**Currency**](Currency.md) | | [optional] |
|
|
@@ -45,6 +47,8 @@ instance = UltracartClient::OrderSummary.new(
|
|
|
45
47
|
actual_profit_review: null,
|
|
46
48
|
actual_shipping: null,
|
|
47
49
|
arbitrary_shipping_handling_total: null,
|
|
50
|
+
arbitrary_subtotal_discount: null,
|
|
51
|
+
arbitrary_taxable_subtotal_discount: null,
|
|
48
52
|
health_benefit_card_amount: null,
|
|
49
53
|
health_benefit_card_refunded: null,
|
|
50
54
|
internal_gift_certificate_amount: null,
|
|
@@ -198,6 +198,64 @@ module UltracartClient
|
|
|
198
198
|
return data, status_code, headers
|
|
199
199
|
end
|
|
200
200
|
|
|
201
|
+
# Identify the merchant account this access token belongs to.
|
|
202
|
+
# Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application's configured permissions.
|
|
203
|
+
# @param [Hash] opts the optional parameters
|
|
204
|
+
# @return [nil]
|
|
205
|
+
def oauth_me(opts = {})
|
|
206
|
+
oauth_me_with_http_info(opts)
|
|
207
|
+
nil
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Identify the merchant account this access token belongs to.
|
|
211
|
+
# Returns the UltraCart merchant account that authorized your application, along with the permissions that were granted. Call it immediately after exchanging your authorization code so you can display the connected account to your user and map it within your own system. Any OAuth access token may call this endpoint regardless of the permissions it holds. The granted permissions are the ones the merchant approved, which may be narrower than the permissions your application currently requests, because permissions are recorded when the merchant authorizes and do not change afterwards. If you add a permission to your application, already connected merchants keep the permissions they originally approved until they authorize again, so read this list rather than assuming your application's configured permissions.
|
|
212
|
+
# @param [Hash] opts the optional parameters
|
|
213
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
214
|
+
def oauth_me_with_http_info(opts = {})
|
|
215
|
+
if @api_client.config.debugging
|
|
216
|
+
@api_client.config.logger.debug 'Calling API: OauthApi.oauth_me ...'
|
|
217
|
+
end
|
|
218
|
+
# resource path
|
|
219
|
+
local_var_path = '/oauth/me'
|
|
220
|
+
|
|
221
|
+
# query parameters
|
|
222
|
+
query_params = opts[:query_params] || {}
|
|
223
|
+
|
|
224
|
+
# header parameters
|
|
225
|
+
header_params = opts[:header_params] || {}
|
|
226
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
227
|
+
# HTTP header 'Accept' (if needed)
|
|
228
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
229
|
+
|
|
230
|
+
# form parameters
|
|
231
|
+
form_params = opts[:form_params] || {}
|
|
232
|
+
|
|
233
|
+
# http body (model)
|
|
234
|
+
post_body = opts[:debug_body]
|
|
235
|
+
|
|
236
|
+
# return_type
|
|
237
|
+
return_type = opts[:debug_return_type]
|
|
238
|
+
|
|
239
|
+
# auth_names
|
|
240
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth']
|
|
241
|
+
|
|
242
|
+
new_options = opts.merge(
|
|
243
|
+
:operation => :"OauthApi.oauth_me",
|
|
244
|
+
:header_params => header_params,
|
|
245
|
+
:query_params => query_params,
|
|
246
|
+
:form_params => form_params,
|
|
247
|
+
:body => post_body,
|
|
248
|
+
:auth_names => auth_names,
|
|
249
|
+
:return_type => return_type
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
253
|
+
if @api_client.config.debugging
|
|
254
|
+
@api_client.config.logger.debug "API called: OauthApi#oauth_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
255
|
+
end
|
|
256
|
+
return data, status_code, headers
|
|
257
|
+
end
|
|
258
|
+
|
|
201
259
|
# Revoke this OAuth application.
|
|
202
260
|
# Revokes the OAuth application associated with the specified client_id and token.
|
|
203
261
|
# @param client_id [String] The OAuth application client_id.
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module UltracartClient
|
|
17
|
+
class OauthMeResponse
|
|
18
|
+
# The name of your application as the merchant approved it.
|
|
19
|
+
attr_accessor :application_name
|
|
20
|
+
|
|
21
|
+
# Your application's client_id. Null when authenticating with a simple key, which is not tied to an application.
|
|
22
|
+
attr_accessor :client_id
|
|
23
|
+
|
|
24
|
+
# The UltraCart merchant account that authorized your application. Stable, and the value to key your own records on.
|
|
25
|
+
attr_accessor :merchant_id
|
|
26
|
+
|
|
27
|
+
# The account's company name, suitable for displaying to your user. The merchant can change this, so display it rather than storing it as an identifier.
|
|
28
|
+
attr_accessor :merchant_name
|
|
29
|
+
|
|
30
|
+
# The permissions the merchant granted. May be narrower than the permissions your application currently requests.
|
|
31
|
+
attr_accessor :scopes
|
|
32
|
+
|
|
33
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
34
|
+
def self.attribute_map
|
|
35
|
+
{
|
|
36
|
+
:'application_name' => :'application_name',
|
|
37
|
+
:'client_id' => :'client_id',
|
|
38
|
+
:'merchant_id' => :'merchant_id',
|
|
39
|
+
:'merchant_name' => :'merchant_name',
|
|
40
|
+
:'scopes' => :'scopes'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Returns all the JSON keys this model knows about
|
|
45
|
+
def self.acceptable_attributes
|
|
46
|
+
attribute_map.values
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.openapi_types
|
|
51
|
+
{
|
|
52
|
+
:'application_name' => :'String',
|
|
53
|
+
:'client_id' => :'String',
|
|
54
|
+
:'merchant_id' => :'String',
|
|
55
|
+
:'merchant_name' => :'String',
|
|
56
|
+
:'scopes' => :'Array<String>'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OauthMeResponse` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OauthMeResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'application_name')
|
|
82
|
+
self.application_name = attributes[:'application_name']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'client_id')
|
|
86
|
+
self.client_id = attributes[:'client_id']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'merchant_id')
|
|
90
|
+
self.merchant_id = attributes[:'merchant_id']
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if attributes.key?(:'merchant_name')
|
|
94
|
+
self.merchant_name = attributes[:'merchant_name']
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
if attributes.key?(:'scopes')
|
|
98
|
+
if (value = attributes[:'scopes']).is_a?(Array)
|
|
99
|
+
self.scopes = value
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
105
|
+
# @return Array for valid properties with the reasons
|
|
106
|
+
def list_invalid_properties
|
|
107
|
+
invalid_properties = Array.new
|
|
108
|
+
invalid_properties
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Check to see if the all the properties in the model are valid
|
|
112
|
+
# @return true if the model is valid
|
|
113
|
+
def valid?
|
|
114
|
+
true
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Checks equality by comparing each attribute.
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def ==(o)
|
|
120
|
+
return true if self.equal?(o)
|
|
121
|
+
self.class == o.class &&
|
|
122
|
+
application_name == o.application_name &&
|
|
123
|
+
client_id == o.client_id &&
|
|
124
|
+
merchant_id == o.merchant_id &&
|
|
125
|
+
merchant_name == o.merchant_name &&
|
|
126
|
+
scopes == o.scopes
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# @see the `==` method
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def eql?(o)
|
|
132
|
+
self == o
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Calculates hash code according to all attributes.
|
|
136
|
+
# @return [Integer] Hash code
|
|
137
|
+
def hash
|
|
138
|
+
[application_name, client_id, merchant_id, merchant_name, scopes].hash
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Builds the object from hash
|
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
143
|
+
# @return [Object] Returns the model itself
|
|
144
|
+
def self.build_from_hash(attributes)
|
|
145
|
+
new.build_from_hash(attributes)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Builds the object from hash
|
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
150
|
+
# @return [Object] Returns the model itself
|
|
151
|
+
def build_from_hash(attributes)
|
|
152
|
+
return nil unless attributes.is_a?(Hash)
|
|
153
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
154
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
155
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
156
|
+
self.send("#{key}=", nil)
|
|
157
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
158
|
+
# check to ensure the input is an array given that the attribute
|
|
159
|
+
# is documented as an array but the input is not
|
|
160
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
161
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
162
|
+
end
|
|
163
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
164
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
self
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# Deserializes the data based on type
|
|
172
|
+
# @param string type Data type
|
|
173
|
+
# @param string value Value to be deserialized
|
|
174
|
+
# @return [Object] Deserialized data
|
|
175
|
+
def _deserialize(type, value)
|
|
176
|
+
case type.to_sym
|
|
177
|
+
when :Time
|
|
178
|
+
Time.parse(value)
|
|
179
|
+
when :Date
|
|
180
|
+
Date.parse(value)
|
|
181
|
+
when :String
|
|
182
|
+
value.to_s
|
|
183
|
+
when :Integer
|
|
184
|
+
value.to_i
|
|
185
|
+
when :Float
|
|
186
|
+
value.to_f
|
|
187
|
+
when :Boolean
|
|
188
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
189
|
+
true
|
|
190
|
+
else
|
|
191
|
+
false
|
|
192
|
+
end
|
|
193
|
+
when :Object
|
|
194
|
+
# generic object (usually a Hash), return directly
|
|
195
|
+
value
|
|
196
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
197
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
198
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
199
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
200
|
+
k_type = Regexp.last_match[:k_type]
|
|
201
|
+
v_type = Regexp.last_match[:v_type]
|
|
202
|
+
{}.tap do |hash|
|
|
203
|
+
value.each do |k, v|
|
|
204
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
else # model
|
|
208
|
+
# models (e.g. Pet) or oneOf
|
|
209
|
+
klass = UltracartClient.const_get(type)
|
|
210
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
211
|
+
end
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the string representation of the object
|
|
215
|
+
# @return [String] String presentation of the object
|
|
216
|
+
def to_s
|
|
217
|
+
to_hash.to_s
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_body
|
|
223
|
+
to_hash
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Returns the object in the form of hash
|
|
227
|
+
# @return [Hash] Returns the object in the form of hash
|
|
228
|
+
def to_hash
|
|
229
|
+
hash = {}
|
|
230
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
231
|
+
value = self.send(attr)
|
|
232
|
+
if value.nil?
|
|
233
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
234
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
hash[param] = _to_hash(value)
|
|
238
|
+
end
|
|
239
|
+
hash
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Outputs non-array value in the form of hash
|
|
243
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
244
|
+
# @param [Object] value Any valid value
|
|
245
|
+
# @return [Hash] Returns the value in the form of hash
|
|
246
|
+
def _to_hash(value)
|
|
247
|
+
if value.is_a?(Array)
|
|
248
|
+
value.compact.map { |v| _to_hash(v) }
|
|
249
|
+
elsif value.is_a?(Hash)
|
|
250
|
+
{}.tap do |hash|
|
|
251
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
252
|
+
end
|
|
253
|
+
elsif value.respond_to? :to_hash
|
|
254
|
+
value.to_hash
|
|
255
|
+
else
|
|
256
|
+
value
|
|
257
|
+
end
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
end
|
|
@@ -27,6 +27,9 @@ module UltracartClient
|
|
|
27
27
|
# The number of seconds since issuance when the access token will expire and need to be refreshed using the refresh token
|
|
28
28
|
attr_accessor :expires_in
|
|
29
29
|
|
|
30
|
+
# The UltraCart merchant account that authorized this token. Use it to map the token to the merchant within your own system. Also returned by GET /oauth/me along with the account name.
|
|
31
|
+
attr_accessor :merchant_id
|
|
32
|
+
|
|
30
33
|
# The refresh token that should be used to fetch a new access token when the expiration occurs
|
|
31
34
|
attr_accessor :refresh_token
|
|
32
35
|
|
|
@@ -66,6 +69,7 @@ module UltracartClient
|
|
|
66
69
|
:'error_description' => :'error_description',
|
|
67
70
|
:'error_uri' => :'error_uri',
|
|
68
71
|
:'expires_in' => :'expires_in',
|
|
72
|
+
:'merchant_id' => :'merchant_id',
|
|
69
73
|
:'refresh_token' => :'refresh_token',
|
|
70
74
|
:'scope' => :'scope',
|
|
71
75
|
:'token_type' => :'token_type'
|
|
@@ -85,6 +89,7 @@ module UltracartClient
|
|
|
85
89
|
:'error_description' => :'String',
|
|
86
90
|
:'error_uri' => :'String',
|
|
87
91
|
:'expires_in' => :'String',
|
|
92
|
+
:'merchant_id' => :'String',
|
|
88
93
|
:'refresh_token' => :'String',
|
|
89
94
|
:'scope' => :'String',
|
|
90
95
|
:'token_type' => :'String'
|
|
@@ -132,6 +137,10 @@ module UltracartClient
|
|
|
132
137
|
self.expires_in = attributes[:'expires_in']
|
|
133
138
|
end
|
|
134
139
|
|
|
140
|
+
if attributes.key?(:'merchant_id')
|
|
141
|
+
self.merchant_id = attributes[:'merchant_id']
|
|
142
|
+
end
|
|
143
|
+
|
|
135
144
|
if attributes.key?(:'refresh_token')
|
|
136
145
|
self.refresh_token = attributes[:'refresh_token']
|
|
137
146
|
end
|
|
@@ -180,6 +189,7 @@ module UltracartClient
|
|
|
180
189
|
error_description == o.error_description &&
|
|
181
190
|
error_uri == o.error_uri &&
|
|
182
191
|
expires_in == o.expires_in &&
|
|
192
|
+
merchant_id == o.merchant_id &&
|
|
183
193
|
refresh_token == o.refresh_token &&
|
|
184
194
|
scope == o.scope &&
|
|
185
195
|
token_type == o.token_type
|
|
@@ -194,7 +204,7 @@ module UltracartClient
|
|
|
194
204
|
# Calculates hash code according to all attributes.
|
|
195
205
|
# @return [Integer] Hash code
|
|
196
206
|
def hash
|
|
197
|
-
[access_token, error, error_description, error_uri, expires_in, refresh_token, scope, token_type].hash
|
|
207
|
+
[access_token, error, error_description, error_uri, expires_in, merchant_id, refresh_token, scope, token_type].hash
|
|
198
208
|
end
|
|
199
209
|
|
|
200
210
|
# Builds the object from hash
|
|
@@ -33,6 +33,10 @@ module UltracartClient
|
|
|
33
33
|
|
|
34
34
|
attr_accessor :arbitrary_shipping_handling_total
|
|
35
35
|
|
|
36
|
+
attr_accessor :arbitrary_subtotal_discount
|
|
37
|
+
|
|
38
|
+
attr_accessor :arbitrary_taxable_subtotal_discount
|
|
39
|
+
|
|
36
40
|
attr_accessor :health_benefit_card_amount
|
|
37
41
|
|
|
38
42
|
attr_accessor :health_benefit_card_refunded
|
|
@@ -80,6 +84,8 @@ module UltracartClient
|
|
|
80
84
|
:'actual_profit_review' => :'actual_profit_review',
|
|
81
85
|
:'actual_shipping' => :'actual_shipping',
|
|
82
86
|
:'arbitrary_shipping_handling_total' => :'arbitrary_shipping_handling_total',
|
|
87
|
+
:'arbitrary_subtotal_discount' => :'arbitrary_subtotal_discount',
|
|
88
|
+
:'arbitrary_taxable_subtotal_discount' => :'arbitrary_taxable_subtotal_discount',
|
|
83
89
|
:'health_benefit_card_amount' => :'health_benefit_card_amount',
|
|
84
90
|
:'health_benefit_card_refunded' => :'health_benefit_card_refunded',
|
|
85
91
|
:'internal_gift_certificate_amount' => :'internal_gift_certificate_amount',
|
|
@@ -117,6 +123,8 @@ module UltracartClient
|
|
|
117
123
|
:'actual_profit_review' => :'Boolean',
|
|
118
124
|
:'actual_shipping' => :'Currency',
|
|
119
125
|
:'arbitrary_shipping_handling_total' => :'Currency',
|
|
126
|
+
:'arbitrary_subtotal_discount' => :'Currency',
|
|
127
|
+
:'arbitrary_taxable_subtotal_discount' => :'Currency',
|
|
120
128
|
:'health_benefit_card_amount' => :'Currency',
|
|
121
129
|
:'health_benefit_card_refunded' => :'Currency',
|
|
122
130
|
:'internal_gift_certificate_amount' => :'Currency',
|
|
@@ -191,6 +199,14 @@ module UltracartClient
|
|
|
191
199
|
self.arbitrary_shipping_handling_total = attributes[:'arbitrary_shipping_handling_total']
|
|
192
200
|
end
|
|
193
201
|
|
|
202
|
+
if attributes.key?(:'arbitrary_subtotal_discount')
|
|
203
|
+
self.arbitrary_subtotal_discount = attributes[:'arbitrary_subtotal_discount']
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
if attributes.key?(:'arbitrary_taxable_subtotal_discount')
|
|
207
|
+
self.arbitrary_taxable_subtotal_discount = attributes[:'arbitrary_taxable_subtotal_discount']
|
|
208
|
+
end
|
|
209
|
+
|
|
194
210
|
if attributes.key?(:'health_benefit_card_amount')
|
|
195
211
|
self.health_benefit_card_amount = attributes[:'health_benefit_card_amount']
|
|
196
212
|
end
|
|
@@ -290,6 +306,8 @@ module UltracartClient
|
|
|
290
306
|
actual_profit_review == o.actual_profit_review &&
|
|
291
307
|
actual_shipping == o.actual_shipping &&
|
|
292
308
|
arbitrary_shipping_handling_total == o.arbitrary_shipping_handling_total &&
|
|
309
|
+
arbitrary_subtotal_discount == o.arbitrary_subtotal_discount &&
|
|
310
|
+
arbitrary_taxable_subtotal_discount == o.arbitrary_taxable_subtotal_discount &&
|
|
293
311
|
health_benefit_card_amount == o.health_benefit_card_amount &&
|
|
294
312
|
health_benefit_card_refunded == o.health_benefit_card_refunded &&
|
|
295
313
|
internal_gift_certificate_amount == o.internal_gift_certificate_amount &&
|
|
@@ -319,7 +337,7 @@ module UltracartClient
|
|
|
319
337
|
# Calculates hash code according to all attributes.
|
|
320
338
|
# @return [Integer] Hash code
|
|
321
339
|
def hash
|
|
322
|
-
[actual_fulfillment, actual_other_cost, actual_payment_processing, actual_profit, actual_profit_analyzed, actual_profit_review, actual_shipping, arbitrary_shipping_handling_total, health_benefit_card_amount, health_benefit_card_refunded, internal_gift_certificate_amount, internal_gift_certificate_refunded, other_refunded, shipping_handling_refunded, shipping_handling_total, shipping_handling_total_discount, subtotal, subtotal_discount, subtotal_discount_refunded, subtotal_refunded, tax, tax_refunded, taxable_subtotal, taxable_subtotal_discount, total, total_refunded].hash
|
|
340
|
+
[actual_fulfillment, actual_other_cost, actual_payment_processing, actual_profit, actual_profit_analyzed, actual_profit_review, actual_shipping, arbitrary_shipping_handling_total, arbitrary_subtotal_discount, arbitrary_taxable_subtotal_discount, health_benefit_card_amount, health_benefit_card_refunded, internal_gift_certificate_amount, internal_gift_certificate_refunded, other_refunded, shipping_handling_refunded, shipping_handling_total, shipping_handling_total_discount, subtotal, subtotal_discount, subtotal_discount_refunded, subtotal_refunded, tax, tax_refunded, taxable_subtotal, taxable_subtotal_discount, total, total_refunded].hash
|
|
323
341
|
end
|
|
324
342
|
|
|
325
343
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -786,6 +786,7 @@ require 'ultracart_api/models/mailgun'
|
|
|
786
786
|
require 'ultracart_api/models/metric'
|
|
787
787
|
require 'ultracart_api/models/notification'
|
|
788
788
|
require 'ultracart_api/models/oauth_device_authorization_response'
|
|
789
|
+
require 'ultracart_api/models/oauth_me_response'
|
|
789
790
|
require 'ultracart_api/models/oauth_revoke_success_response'
|
|
790
791
|
require 'ultracart_api/models/oauth_token_response'
|
|
791
792
|
require 'ultracart_api/models/order'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultracart_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.127
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -846,6 +846,7 @@ files:
|
|
|
846
846
|
- docs/Notification.md
|
|
847
847
|
- docs/OauthApi.md
|
|
848
848
|
- docs/OauthDeviceAuthorizationResponse.md
|
|
849
|
+
- docs/OauthMeResponse.md
|
|
849
850
|
- docs/OauthRevokeSuccessResponse.md
|
|
850
851
|
- docs/OauthTokenResponse.md
|
|
851
852
|
- docs/Order.md
|
|
@@ -1918,6 +1919,7 @@ files:
|
|
|
1918
1919
|
- lib/ultracart_api/models/metric.rb
|
|
1919
1920
|
- lib/ultracart_api/models/notification.rb
|
|
1920
1921
|
- lib/ultracart_api/models/oauth_device_authorization_response.rb
|
|
1922
|
+
- lib/ultracart_api/models/oauth_me_response.rb
|
|
1921
1923
|
- lib/ultracart_api/models/oauth_revoke_success_response.rb
|
|
1922
1924
|
- lib/ultracart_api/models/oauth_token_response.rb
|
|
1923
1925
|
- lib/ultracart_api/models/order.rb
|