ultracart_api 4.1.67 → 4.1.68
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 +5 -2
- data/docs/OauthApi.md +56 -0
- data/docs/OauthDeviceAuthorizationResponse.md +28 -0
- data/docs/PointOfSaleLocation.md +3 -1
- data/lib/ultracart_api/api/oauth_api.rb +80 -0
- data/lib/ultracart_api/models/oauth_device_authorization_response.rb +270 -0
- data/lib/ultracart_api/models/point_of_sale_location.rb +29 -4
- 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: e989efec4967fb53083fd80074ed8dec364c429b3f82df7ee8067c39ce29e84a
|
|
4
|
+
data.tar.gz: 3698fd7e40c24e3ebab4bf1cfbf0d1ebd9559bcc3e23de957129fbb41fd084fc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1d89153e5d774e89606560761cefcb974473f98471d3d8565c2f82c24b6dc8472aa8946d08cf04556e7a072e18e0f59af16fb9fc13be5ebd9190c25c8efd2983
|
|
7
|
+
data.tar.gz: f71bfdd7d7d0043ed79a8ae7ff236e86cb8c92d584fba650d40de5a5b9cc6f0fb1cfe47ab4042853eaa5c3ce5e68bb9eb92cb5d5bae514022cd3706115132c24
|
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.68
|
|
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.68'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -375,6 +375,7 @@ Class | Method | HTTP request | Description
|
|
|
375
375
|
*UltracartClient::ItemApi* | [**update_review**](docs/ItemApi.md#update_review) | **PUT** /item/items/{merchant_item_oid}/reviews/{review_oid} | Update a review
|
|
376
376
|
*UltracartClient::ItemApi* | [**upload_temporary_multimedia**](docs/ItemApi.md#upload_temporary_multimedia) | **POST** /item/temp_multimedia | Upload an image to the temporary multimedia.
|
|
377
377
|
*UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
|
|
378
|
+
*UltracartClient::OauthApi* | [**oauth_device_authorize**](docs/OauthApi.md#oauth_device_authorize) | **POST** /oauth/device/authorize | Initiate a device authorization flow.
|
|
378
379
|
*UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
|
|
379
380
|
*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
|
|
380
381
|
*UltracartClient::OrderApi* | [**assign_to_affiliate**](docs/OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
|
|
@@ -1349,6 +1350,7 @@ Class | Method | HTTP request | Description
|
|
|
1349
1350
|
- [UltracartClient::Mailgun](docs/Mailgun.md)
|
|
1350
1351
|
- [UltracartClient::Metric](docs/Metric.md)
|
|
1351
1352
|
- [UltracartClient::Notification](docs/Notification.md)
|
|
1353
|
+
- [UltracartClient::OauthDeviceAuthorizationResponse](docs/OauthDeviceAuthorizationResponse.md)
|
|
1352
1354
|
- [UltracartClient::OauthRevokeSuccessResponse](docs/OauthRevokeSuccessResponse.md)
|
|
1353
1355
|
- [UltracartClient::OauthTokenResponse](docs/OauthTokenResponse.md)
|
|
1354
1356
|
- [UltracartClient::Order](docs/Order.md)
|
|
@@ -1679,6 +1681,7 @@ Not every change is committed to every SDK.
|
|
|
1679
1681
|
|
|
1680
1682
|
| Version | Date | Comments |
|
|
1681
1683
|
| --: | :-: | --- |
|
|
1684
|
+
| 4.1.68 | 03/31/2026 | oauth - device support |
|
|
1682
1685
|
| 4.1.67 | 02/24/2026 | customer activity - sms and sms_stop fields added |
|
|
1683
1686
|
| 4.1.66 | 02/18/2026 | conversations - agent auth customer_profile flag |
|
|
1684
1687
|
| 4.1.65 | 02/16/2026 | item - include variant pricing in the response |
|
data/docs/OauthApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**oauth_access_token**](OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token. |
|
|
8
|
+
| [**oauth_device_authorize**](OauthApi.md#oauth_device_authorize) | **POST** /oauth/device/authorize | Initiate a device authorization flow. |
|
|
8
9
|
| [**oauth_revoke**](OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application. |
|
|
9
10
|
|
|
10
11
|
|
|
@@ -107,6 +108,7 @@ end
|
|
|
107
108
|
| **code** | **String** | Authorization code received back from the browser redirect | [optional] |
|
|
108
109
|
| **redirect_uri** | **String** | The URI that you redirect the browser to start the authorization process | [optional] |
|
|
109
110
|
| **refresh_token** | **String** | The refresh token received during the original grant_type=authorization_code that can be used to return a new access token | [optional] |
|
|
111
|
+
| **device_code** | **String** | The device code received from /oauth/device/authorize | [optional] |
|
|
110
112
|
|
|
111
113
|
### Return type
|
|
112
114
|
|
|
@@ -122,6 +124,60 @@ end
|
|
|
122
124
|
- **Accept**: application/json
|
|
123
125
|
|
|
124
126
|
|
|
127
|
+
## oauth_device_authorize
|
|
128
|
+
|
|
129
|
+
> oauth_device_authorize(client_id, scope)
|
|
130
|
+
|
|
131
|
+
Initiate a device authorization flow.
|
|
132
|
+
|
|
133
|
+
Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
### Examples
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
(No example for this operation).
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
#### Using the oauth_device_authorize_with_http_info variant
|
|
143
|
+
|
|
144
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
145
|
+
|
|
146
|
+
> <Array(nil, Integer, Hash)> oauth_device_authorize_with_http_info(client_id, scope)
|
|
147
|
+
|
|
148
|
+
```ruby
|
|
149
|
+
begin
|
|
150
|
+
# Initiate a device authorization flow.
|
|
151
|
+
data, status_code, headers = api_instance.oauth_device_authorize_with_http_info(client_id, scope)
|
|
152
|
+
p status_code # => 2xx
|
|
153
|
+
p headers # => { ... }
|
|
154
|
+
p data # => nil
|
|
155
|
+
rescue UltracartClient::ApiError => e
|
|
156
|
+
puts "Error when calling OauthApi->oauth_device_authorize_with_http_info: #{e}"
|
|
157
|
+
end
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Parameters
|
|
161
|
+
|
|
162
|
+
| Name | Type | Description | Notes |
|
|
163
|
+
| ---- | ---- | ----------- | ----- |
|
|
164
|
+
| **client_id** | **String** | The OAuth application client_id. | |
|
|
165
|
+
| **scope** | **String** | The application-level scope (e.g., crm, ultraship). | |
|
|
166
|
+
|
|
167
|
+
### Return type
|
|
168
|
+
|
|
169
|
+
nil (empty response body)
|
|
170
|
+
|
|
171
|
+
### Authorization
|
|
172
|
+
|
|
173
|
+
[ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
174
|
+
|
|
175
|
+
### HTTP request headers
|
|
176
|
+
|
|
177
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
178
|
+
- **Accept**: application/json
|
|
179
|
+
|
|
180
|
+
|
|
125
181
|
## oauth_revoke
|
|
126
182
|
|
|
127
183
|
> <OauthRevokeSuccessResponse> oauth_revoke(client_id, token)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# UltracartClient::OauthDeviceAuthorizationResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **device_code** | **String** | The device verification code | [optional] |
|
|
8
|
+
| **expires_in** | **Integer** | The lifetime in seconds of the device_code and user_code | [optional] |
|
|
9
|
+
| **interval** | **Integer** | The minimum amount of time in seconds the client should wait between polling requests | [optional] |
|
|
10
|
+
| **user_code** | **String** | The end-user verification code | [optional] |
|
|
11
|
+
| **verification_uri** | **String** | The end-user verification URI on the authorization server | [optional] |
|
|
12
|
+
| **verification_uri_complete** | **String** | The verification URI with the user code pre-filled | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'ultracart_api'
|
|
18
|
+
|
|
19
|
+
instance = UltracartClient::OauthDeviceAuthorizationResponse.new(
|
|
20
|
+
device_code: null,
|
|
21
|
+
expires_in: null,
|
|
22
|
+
interval: null,
|
|
23
|
+
user_code: null,
|
|
24
|
+
verification_uri: null,
|
|
25
|
+
verification_uri_complete: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/PointOfSaleLocation.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| **pos_location_oid** | **Integer** | Object identifier of the point of sale location. | [optional] |
|
|
15
15
|
| **postal_code** | **String** | Postal code | [optional] |
|
|
16
16
|
| **state_province** | **String** | State/province | [optional] |
|
|
17
|
+
| **tax_county** | **String** | Tax county associated with this address. Need when a self managed tax configuration is being used. | [optional] |
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
|
|
@@ -30,7 +31,8 @@ instance = UltracartClient::PointOfSaleLocation.new(
|
|
|
30
31
|
merchant_id: null,
|
|
31
32
|
pos_location_oid: null,
|
|
32
33
|
postal_code: null,
|
|
33
|
-
state_province: null
|
|
34
|
+
state_province: null,
|
|
35
|
+
tax_county: null
|
|
34
36
|
)
|
|
35
37
|
```
|
|
36
38
|
|
|
@@ -40,6 +40,7 @@ module UltracartClient
|
|
|
40
40
|
# @option opts [String] :code Authorization code received back from the browser redirect
|
|
41
41
|
# @option opts [String] :redirect_uri The URI that you redirect the browser to start the authorization process
|
|
42
42
|
# @option opts [String] :refresh_token The refresh token received during the original grant_type=authorization_code that can be used to return a new access token
|
|
43
|
+
# @option opts [String] :device_code The device code received from /oauth/device/authorize
|
|
43
44
|
# @return [OauthTokenResponse]
|
|
44
45
|
def oauth_access_token(client_id, grant_type, opts = {})
|
|
45
46
|
data, _status_code, _headers = oauth_access_token_with_http_info(client_id, grant_type, opts)
|
|
@@ -54,6 +55,7 @@ module UltracartClient
|
|
|
54
55
|
# @option opts [String] :code Authorization code received back from the browser redirect
|
|
55
56
|
# @option opts [String] :redirect_uri The URI that you redirect the browser to start the authorization process
|
|
56
57
|
# @option opts [String] :refresh_token The refresh token received during the original grant_type=authorization_code that can be used to return a new access token
|
|
58
|
+
# @option opts [String] :device_code The device code received from /oauth/device/authorize
|
|
57
59
|
# @return [Array<(OauthTokenResponse, Integer, Hash)>] OauthTokenResponse data, response status code and response headers
|
|
58
60
|
def oauth_access_token_with_http_info(client_id, grant_type, opts = {})
|
|
59
61
|
if @api_client.config.debugging
|
|
@@ -91,6 +93,7 @@ module UltracartClient
|
|
|
91
93
|
form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
|
|
92
94
|
form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
|
|
93
95
|
form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
|
|
96
|
+
form_params['device_code'] = opts[:'device_code'] if !opts[:'device_code'].nil?
|
|
94
97
|
|
|
95
98
|
# http body (model)
|
|
96
99
|
post_body = opts[:debug_body]
|
|
@@ -118,6 +121,83 @@ module UltracartClient
|
|
|
118
121
|
return data, status_code, headers
|
|
119
122
|
end
|
|
120
123
|
|
|
124
|
+
# Initiate a device authorization flow.
|
|
125
|
+
# Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
|
|
126
|
+
# @param client_id [String] The OAuth application client_id.
|
|
127
|
+
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @return [nil]
|
|
130
|
+
def oauth_device_authorize(client_id, scope, opts = {})
|
|
131
|
+
oauth_device_authorize_with_http_info(client_id, scope, opts)
|
|
132
|
+
nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Initiate a device authorization flow.
|
|
136
|
+
# Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
|
|
137
|
+
# @param client_id [String] The OAuth application client_id.
|
|
138
|
+
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
141
|
+
def oauth_device_authorize_with_http_info(client_id, scope, opts = {})
|
|
142
|
+
if @api_client.config.debugging
|
|
143
|
+
@api_client.config.logger.debug 'Calling API: OauthApi.oauth_device_authorize ...'
|
|
144
|
+
end
|
|
145
|
+
# verify the required parameter 'client_id' is set
|
|
146
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
|
147
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling OauthApi.oauth_device_authorize"
|
|
148
|
+
end
|
|
149
|
+
# verify the required parameter 'scope' is set
|
|
150
|
+
if @api_client.config.client_side_validation && scope.nil?
|
|
151
|
+
fail ArgumentError, "Missing the required parameter 'scope' when calling OauthApi.oauth_device_authorize"
|
|
152
|
+
end
|
|
153
|
+
# resource path
|
|
154
|
+
local_var_path = '/oauth/device/authorize'
|
|
155
|
+
|
|
156
|
+
# query parameters
|
|
157
|
+
query_params = opts[:query_params] || {}
|
|
158
|
+
|
|
159
|
+
# header parameters
|
|
160
|
+
header_params = opts[:header_params] || {}
|
|
161
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
164
|
+
# HTTP header 'Content-Type'
|
|
165
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
166
|
+
if !content_type.nil?
|
|
167
|
+
header_params['Content-Type'] = content_type
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
form_params['client_id'] = client_id
|
|
173
|
+
form_params['scope'] = scope
|
|
174
|
+
|
|
175
|
+
# http body (model)
|
|
176
|
+
post_body = opts[:debug_body]
|
|
177
|
+
|
|
178
|
+
# return_type
|
|
179
|
+
return_type = opts[:debug_return_type]
|
|
180
|
+
|
|
181
|
+
# auth_names
|
|
182
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
183
|
+
|
|
184
|
+
new_options = opts.merge(
|
|
185
|
+
:operation => :"OauthApi.oauth_device_authorize",
|
|
186
|
+
:header_params => header_params,
|
|
187
|
+
:query_params => query_params,
|
|
188
|
+
:form_params => form_params,
|
|
189
|
+
:body => post_body,
|
|
190
|
+
:auth_names => auth_names,
|
|
191
|
+
:return_type => return_type
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug "API called: OauthApi#oauth_device_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
197
|
+
end
|
|
198
|
+
return data, status_code, headers
|
|
199
|
+
end
|
|
200
|
+
|
|
121
201
|
# Revoke this OAuth application.
|
|
122
202
|
# Revokes the OAuth application associated with the specified client_id and token.
|
|
123
203
|
# @param client_id [String] The OAuth application client_id.
|
|
@@ -0,0 +1,270 @@
|
|
|
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 OauthDeviceAuthorizationResponse
|
|
18
|
+
# The device verification code
|
|
19
|
+
attr_accessor :device_code
|
|
20
|
+
|
|
21
|
+
# The lifetime in seconds of the device_code and user_code
|
|
22
|
+
attr_accessor :expires_in
|
|
23
|
+
|
|
24
|
+
# The minimum amount of time in seconds the client should wait between polling requests
|
|
25
|
+
attr_accessor :interval
|
|
26
|
+
|
|
27
|
+
# The end-user verification code
|
|
28
|
+
attr_accessor :user_code
|
|
29
|
+
|
|
30
|
+
# The end-user verification URI on the authorization server
|
|
31
|
+
attr_accessor :verification_uri
|
|
32
|
+
|
|
33
|
+
# The verification URI with the user code pre-filled
|
|
34
|
+
attr_accessor :verification_uri_complete
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
:'device_code' => :'device_code',
|
|
40
|
+
:'expires_in' => :'expires_in',
|
|
41
|
+
:'interval' => :'interval',
|
|
42
|
+
:'user_code' => :'user_code',
|
|
43
|
+
:'verification_uri' => :'verification_uri',
|
|
44
|
+
:'verification_uri_complete' => :'verification_uri_complete'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.openapi_types
|
|
55
|
+
{
|
|
56
|
+
:'device_code' => :'String',
|
|
57
|
+
:'expires_in' => :'Integer',
|
|
58
|
+
:'interval' => :'Integer',
|
|
59
|
+
:'user_code' => :'String',
|
|
60
|
+
:'verification_uri' => :'String',
|
|
61
|
+
:'verification_uri_complete' => :'String'
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# List of attributes with nullable: true
|
|
66
|
+
def self.openapi_nullable
|
|
67
|
+
Set.new([
|
|
68
|
+
])
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Initializes the object
|
|
72
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
73
|
+
def initialize(attributes = {})
|
|
74
|
+
if (!attributes.is_a?(Hash))
|
|
75
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OauthDeviceAuthorizationResponse` initialize method"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
79
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
80
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
81
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OauthDeviceAuthorizationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
82
|
+
end
|
|
83
|
+
h[k.to_sym] = v
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'device_code')
|
|
87
|
+
self.device_code = attributes[:'device_code']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'expires_in')
|
|
91
|
+
self.expires_in = attributes[:'expires_in']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'interval')
|
|
95
|
+
self.interval = attributes[:'interval']
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
if attributes.key?(:'user_code')
|
|
99
|
+
self.user_code = attributes[:'user_code']
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'verification_uri')
|
|
103
|
+
self.verification_uri = attributes[:'verification_uri']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'verification_uri_complete')
|
|
107
|
+
self.verification_uri_complete = attributes[:'verification_uri_complete']
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
112
|
+
# @return Array for valid properties with the reasons
|
|
113
|
+
def list_invalid_properties
|
|
114
|
+
invalid_properties = Array.new
|
|
115
|
+
invalid_properties
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Check to see if the all the properties in the model are valid
|
|
119
|
+
# @return true if the model is valid
|
|
120
|
+
def valid?
|
|
121
|
+
true
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Checks equality by comparing each attribute.
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def ==(o)
|
|
127
|
+
return true if self.equal?(o)
|
|
128
|
+
self.class == o.class &&
|
|
129
|
+
device_code == o.device_code &&
|
|
130
|
+
expires_in == o.expires_in &&
|
|
131
|
+
interval == o.interval &&
|
|
132
|
+
user_code == o.user_code &&
|
|
133
|
+
verification_uri == o.verification_uri &&
|
|
134
|
+
verification_uri_complete == o.verification_uri_complete
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# @see the `==` method
|
|
138
|
+
# @param [Object] Object to be compared
|
|
139
|
+
def eql?(o)
|
|
140
|
+
self == o
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Calculates hash code according to all attributes.
|
|
144
|
+
# @return [Integer] Hash code
|
|
145
|
+
def hash
|
|
146
|
+
[device_code, expires_in, interval, user_code, verification_uri, verification_uri_complete].hash
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def self.build_from_hash(attributes)
|
|
153
|
+
new.build_from_hash(attributes)
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# Builds the object from hash
|
|
157
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
158
|
+
# @return [Object] Returns the model itself
|
|
159
|
+
def build_from_hash(attributes)
|
|
160
|
+
return nil unless attributes.is_a?(Hash)
|
|
161
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
162
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
163
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
164
|
+
self.send("#{key}=", nil)
|
|
165
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
166
|
+
# check to ensure the input is an array given that the attribute
|
|
167
|
+
# is documented as an array but the input is not
|
|
168
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
169
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
170
|
+
end
|
|
171
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
172
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
self
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Deserializes the data based on type
|
|
180
|
+
# @param string type Data type
|
|
181
|
+
# @param string value Value to be deserialized
|
|
182
|
+
# @return [Object] Deserialized data
|
|
183
|
+
def _deserialize(type, value)
|
|
184
|
+
case type.to_sym
|
|
185
|
+
when :Time
|
|
186
|
+
Time.parse(value)
|
|
187
|
+
when :Date
|
|
188
|
+
Date.parse(value)
|
|
189
|
+
when :String
|
|
190
|
+
value.to_s
|
|
191
|
+
when :Integer
|
|
192
|
+
value.to_i
|
|
193
|
+
when :Float
|
|
194
|
+
value.to_f
|
|
195
|
+
when :Boolean
|
|
196
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
197
|
+
true
|
|
198
|
+
else
|
|
199
|
+
false
|
|
200
|
+
end
|
|
201
|
+
when :Object
|
|
202
|
+
# generic object (usually a Hash), return directly
|
|
203
|
+
value
|
|
204
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
205
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
206
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
207
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
208
|
+
k_type = Regexp.last_match[:k_type]
|
|
209
|
+
v_type = Regexp.last_match[:v_type]
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each do |k, v|
|
|
212
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
else # model
|
|
216
|
+
# models (e.g. Pet) or oneOf
|
|
217
|
+
klass = UltracartClient.const_get(type)
|
|
218
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
219
|
+
end
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
# Returns the string representation of the object
|
|
223
|
+
# @return [String] String presentation of the object
|
|
224
|
+
def to_s
|
|
225
|
+
to_hash.to_s
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
229
|
+
# @return [Hash] Returns the object in the form of hash
|
|
230
|
+
def to_body
|
|
231
|
+
to_hash
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the object in the form of hash
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_hash
|
|
237
|
+
hash = {}
|
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
239
|
+
value = self.send(attr)
|
|
240
|
+
if value.nil?
|
|
241
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
242
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
hash[param] = _to_hash(value)
|
|
246
|
+
end
|
|
247
|
+
hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# Outputs non-array value in the form of hash
|
|
251
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
252
|
+
# @param [Object] value Any valid value
|
|
253
|
+
# @return [Hash] Returns the value in the form of hash
|
|
254
|
+
def _to_hash(value)
|
|
255
|
+
if value.is_a?(Array)
|
|
256
|
+
value.compact.map { |v| _to_hash(v) }
|
|
257
|
+
elsif value.is_a?(Hash)
|
|
258
|
+
{}.tap do |hash|
|
|
259
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
260
|
+
end
|
|
261
|
+
elsif value.respond_to? :to_hash
|
|
262
|
+
value.to_hash
|
|
263
|
+
else
|
|
264
|
+
value
|
|
265
|
+
end
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
end
|
|
@@ -45,6 +45,9 @@ module UltracartClient
|
|
|
45
45
|
# State/province
|
|
46
46
|
attr_accessor :state_province
|
|
47
47
|
|
|
48
|
+
# Tax county associated with this address. Need when a self managed tax configuration is being used.
|
|
49
|
+
attr_accessor :tax_county
|
|
50
|
+
|
|
48
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
49
52
|
def self.attribute_map
|
|
50
53
|
{
|
|
@@ -57,7 +60,8 @@ module UltracartClient
|
|
|
57
60
|
:'merchant_id' => :'merchant_id',
|
|
58
61
|
:'pos_location_oid' => :'pos_location_oid',
|
|
59
62
|
:'postal_code' => :'postal_code',
|
|
60
|
-
:'state_province' => :'state_province'
|
|
63
|
+
:'state_province' => :'state_province',
|
|
64
|
+
:'tax_county' => :'tax_county'
|
|
61
65
|
}
|
|
62
66
|
end
|
|
63
67
|
|
|
@@ -78,7 +82,8 @@ module UltracartClient
|
|
|
78
82
|
:'merchant_id' => :'String',
|
|
79
83
|
:'pos_location_oid' => :'Integer',
|
|
80
84
|
:'postal_code' => :'String',
|
|
81
|
-
:'state_province' => :'String'
|
|
85
|
+
:'state_province' => :'String',
|
|
86
|
+
:'tax_county' => :'String'
|
|
82
87
|
}
|
|
83
88
|
end
|
|
84
89
|
|
|
@@ -142,6 +147,10 @@ module UltracartClient
|
|
|
142
147
|
if attributes.key?(:'state_province')
|
|
143
148
|
self.state_province = attributes[:'state_province']
|
|
144
149
|
end
|
|
150
|
+
|
|
151
|
+
if attributes.key?(:'tax_county')
|
|
152
|
+
self.tax_county = attributes[:'tax_county']
|
|
153
|
+
end
|
|
145
154
|
end
|
|
146
155
|
|
|
147
156
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -152,6 +161,10 @@ module UltracartClient
|
|
|
152
161
|
invalid_properties.push('invalid value for "external_id", the character length must be smaller than or equal to 100.')
|
|
153
162
|
end
|
|
154
163
|
|
|
164
|
+
if !@tax_county.nil? && @tax_county.to_s.length > 32
|
|
165
|
+
invalid_properties.push('invalid value for "tax_county", the character length must be smaller than or equal to 32.')
|
|
166
|
+
end
|
|
167
|
+
|
|
155
168
|
invalid_properties
|
|
156
169
|
end
|
|
157
170
|
|
|
@@ -159,6 +172,7 @@ module UltracartClient
|
|
|
159
172
|
# @return true if the model is valid
|
|
160
173
|
def valid?
|
|
161
174
|
return false if !@external_id.nil? && @external_id.to_s.length > 100
|
|
175
|
+
return false if !@tax_county.nil? && @tax_county.to_s.length > 32
|
|
162
176
|
true
|
|
163
177
|
end
|
|
164
178
|
|
|
@@ -172,6 +186,16 @@ module UltracartClient
|
|
|
172
186
|
@external_id = external_id
|
|
173
187
|
end
|
|
174
188
|
|
|
189
|
+
# Custom attribute writer method with validation
|
|
190
|
+
# @param [Object] tax_county Value to be assigned
|
|
191
|
+
def tax_county=(tax_county)
|
|
192
|
+
if !tax_county.nil? && tax_county.to_s.length > 32
|
|
193
|
+
fail ArgumentError, 'invalid value for "tax_county", the character length must be smaller than or equal to 32.'
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
@tax_county = tax_county
|
|
197
|
+
end
|
|
198
|
+
|
|
175
199
|
# Checks equality by comparing each attribute.
|
|
176
200
|
# @param [Object] Object to be compared
|
|
177
201
|
def ==(o)
|
|
@@ -186,7 +210,8 @@ module UltracartClient
|
|
|
186
210
|
merchant_id == o.merchant_id &&
|
|
187
211
|
pos_location_oid == o.pos_location_oid &&
|
|
188
212
|
postal_code == o.postal_code &&
|
|
189
|
-
state_province == o.state_province
|
|
213
|
+
state_province == o.state_province &&
|
|
214
|
+
tax_county == o.tax_county
|
|
190
215
|
end
|
|
191
216
|
|
|
192
217
|
# @see the `==` method
|
|
@@ -198,7 +223,7 @@ module UltracartClient
|
|
|
198
223
|
# Calculates hash code according to all attributes.
|
|
199
224
|
# @return [Integer] Hash code
|
|
200
225
|
def hash
|
|
201
|
-
[adddress2, address1, city, country, distribution_center_code, external_id, merchant_id, pos_location_oid, postal_code, state_province].hash
|
|
226
|
+
[adddress2, address1, city, country, distribution_center_code, external_id, merchant_id, pos_location_oid, postal_code, state_province, tax_county].hash
|
|
202
227
|
end
|
|
203
228
|
|
|
204
229
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -710,6 +710,7 @@ require 'ultracart_api/models/lookup_response'
|
|
|
710
710
|
require 'ultracart_api/models/mailgun'
|
|
711
711
|
require 'ultracart_api/models/metric'
|
|
712
712
|
require 'ultracart_api/models/notification'
|
|
713
|
+
require 'ultracart_api/models/oauth_device_authorization_response'
|
|
713
714
|
require 'ultracart_api/models/oauth_revoke_success_response'
|
|
714
715
|
require 'ultracart_api/models/oauth_token_response'
|
|
715
716
|
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.68
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-03-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -767,6 +767,7 @@ files:
|
|
|
767
767
|
- docs/Metric.md
|
|
768
768
|
- docs/Notification.md
|
|
769
769
|
- docs/OauthApi.md
|
|
770
|
+
- docs/OauthDeviceAuthorizationResponse.md
|
|
770
771
|
- docs/OauthRevokeSuccessResponse.md
|
|
771
772
|
- docs/OauthTokenResponse.md
|
|
772
773
|
- docs/Order.md
|
|
@@ -1747,6 +1748,7 @@ files:
|
|
|
1747
1748
|
- lib/ultracart_api/models/mailgun.rb
|
|
1748
1749
|
- lib/ultracart_api/models/metric.rb
|
|
1749
1750
|
- lib/ultracart_api/models/notification.rb
|
|
1751
|
+
- lib/ultracart_api/models/oauth_device_authorization_response.rb
|
|
1750
1752
|
- lib/ultracart_api/models/oauth_revoke_success_response.rb
|
|
1751
1753
|
- lib/ultracart_api/models/oauth_token_response.rb
|
|
1752
1754
|
- lib/ultracart_api/models/order.rb
|