ultracart_api 3.11.27 → 3.11.29
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 +8 -4
- data/docs/ConversationMessage.md +1 -0
- data/docs/ConversationVirtualAgentCapabilities.md +1 -0
- data/docs/OrderApi.md +58 -0
- data/docs/OrderAssignToAffiliateRequest.md +10 -0
- data/lib/ultracart_api/api/order_api.rb +64 -0
- data/lib/ultracart_api/models/conversation_message.rb +10 -1
- data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +11 -1
- data/lib/ultracart_api/models/order_assign_to_affiliate_request.rb +220 -0
- 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: f15a4bee3ec313c9824b1419c462687d1167a8f6ec4c3b9fb4d256a0f3cb1e0d
|
|
4
|
+
data.tar.gz: bb7f59b2db18ae492701e9f46d9267e841f6ae494f71f423e782253ad896b632
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0ee18dc4801f6372ceecd60a6243a720032206e85c90935aa4907e5156a678490592704cbfbad7e01e7c222e1b01dd0e8fedea0723dee1c57fb29af18b30615a
|
|
7
|
+
data.tar.gz: f3e4ef905dc9a0743c5a71380b119ba115430fde5299a8a794352fb3e6c849dc7eff2b4f544cd52cbbd0907997e5220790b5f292a939a61b7065f21ee49dca94
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 3.11.
|
|
10
|
+
- Package version: 3.11.29
|
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
12
|
For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
|
24
24
|
Then either install the gem locally:
|
|
25
25
|
|
|
26
26
|
```shell
|
|
27
|
-
gem install ./ultracart_api-3.11.
|
|
27
|
+
gem install ./ultracart_api-3.11.29.gem
|
|
28
28
|
```
|
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.11.
|
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.11.29.gem` to install the development dependencies)
|
|
30
30
|
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
32
32
|
|
|
33
33
|
Finally add this to the Gemfile:
|
|
34
34
|
|
|
35
|
-
gem 'ultracart_api', '~> 3.11.
|
|
35
|
+
gem 'ultracart_api', '~> 3.11.29'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -343,6 +343,7 @@ Class | Method | HTTP request | Description
|
|
|
343
343
|
*UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
|
|
344
344
|
*UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
|
|
345
345
|
*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
|
|
346
|
+
*UltracartClient::OrderApi* | [**assign_to_affiliate**](docs/OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
|
|
346
347
|
*UltracartClient::OrderApi* | [**block_refund_on_order**](docs/OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
|
|
347
348
|
*UltracartClient::OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
|
|
348
349
|
*UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
|
@@ -1270,6 +1271,7 @@ Class | Method | HTTP request | Description
|
|
|
1270
1271
|
- [UltracartClient::Order](docs/Order.md)
|
|
1271
1272
|
- [UltracartClient::OrderAffiliate](docs/OrderAffiliate.md)
|
|
1272
1273
|
- [UltracartClient::OrderAffiliateLedger](docs/OrderAffiliateLedger.md)
|
|
1274
|
+
- [UltracartClient::OrderAssignToAffiliateRequest](docs/OrderAssignToAffiliateRequest.md)
|
|
1273
1275
|
- [UltracartClient::OrderAutoOrder](docs/OrderAutoOrder.md)
|
|
1274
1276
|
- [UltracartClient::OrderBilling](docs/OrderBilling.md)
|
|
1275
1277
|
- [UltracartClient::OrderBuysafe](docs/OrderBuysafe.md)
|
|
@@ -1589,6 +1591,8 @@ Not every change is committed to every SDK.
|
|
|
1589
1591
|
|
|
1590
1592
|
| Version | Date | Comments |
|
|
1591
1593
|
| --: | :-: | --- |
|
|
1594
|
+
| 3.11.29 | 11/13/2025 | conversations - AI capabilities flag for generate coupon |
|
|
1595
|
+
| 3.11.28 | 11/07/2025 | OrderApi.assignToAffiliate |
|
|
1592
1596
|
| 3.11.27 | 11/06/2025 | conversation ai knowledge base changes |
|
|
1593
1597
|
| 3.11.26 | 10/20/2025 | conversation api bug fixes |
|
|
1594
1598
|
| 3.11.25 | 10/20/2025 | conversation api bug fix for bad url on agent profile kb upload |
|
data/docs/ConversationMessage.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
|
14
14
|
**merchant_id** | **String** | | [optional]
|
|
15
15
|
**message_dts** | **String** | Message date/time | [optional]
|
|
16
16
|
**message_epoch** | **Integer** | Message epoch milliseconds | [optional]
|
|
17
|
+
**message_type** | **String** | | [optional]
|
|
17
18
|
**translations** | [**Array<ConversationMessageTranslation>**](ConversationMessageTranslation.md) | | [optional]
|
|
18
19
|
**transport_statuses** | [**Array<ConversationMessageTransportStatus>**](ConversationMessageTransportStatus.md) | | [optional]
|
|
19
20
|
**type** | **String** | Message type | [optional]
|
|
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
**access_storefront_and_item** | **BOOLEAN** | Permission flag to allow this Agent access to the storefront and item information. | [optional]
|
|
7
7
|
**cancel_subscription** | **BOOLEAN** | | [optional]
|
|
8
8
|
**delay_subscription** | **BOOLEAN** | | [optional]
|
|
9
|
+
**generate_coupon** | **BOOLEAN** | Permission flag to allow this Agent to generate coupons based upon the agent prompt instructions | [optional]
|
|
9
10
|
**lookup_order_information** | **BOOLEAN** | | [optional]
|
|
10
11
|
**lookup_subscription_information** | **BOOLEAN** | | [optional]
|
|
11
12
|
**open_support_ticket** | **BOOLEAN** | | [optional]
|
data/docs/OrderApi.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
|
[**adjust_order_total**](OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
|
|
8
|
+
[**assign_to_affiliate**](OrderApi.md#assign_to_affiliate) | **POST** /order/orders/{order_id}/assignToAffiliate | Assigns an order to an affiliate
|
|
8
9
|
[**block_refund_on_order**](OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
|
|
9
10
|
[**cancel_order**](OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
|
|
10
11
|
[**delete_order**](OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
|
@@ -89,6 +90,63 @@ Name | Type | Description | Notes
|
|
|
89
90
|
|
|
90
91
|
|
|
91
92
|
|
|
93
|
+
# **assign_to_affiliate**
|
|
94
|
+
> OrderResponse assign_to_affiliate(order_id, assign_to_affiliate_request, opts)
|
|
95
|
+
|
|
96
|
+
Assigns an order to an affiliate
|
|
97
|
+
|
|
98
|
+
Assigns an order to an affiliate.
|
|
99
|
+
|
|
100
|
+
### Example
|
|
101
|
+
```ruby
|
|
102
|
+
# load the gem
|
|
103
|
+
require 'ultracart_api'
|
|
104
|
+
|
|
105
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
106
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
107
|
+
api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
order_id = 'order_id_example' # String | The order id to assign to the affiliate.
|
|
111
|
+
|
|
112
|
+
assign_to_affiliate_request = UltracartClient::OrderAssignToAffiliateRequest.new # OrderAssignToAffiliateRequest | Assign to affiliate request
|
|
113
|
+
|
|
114
|
+
opts = {
|
|
115
|
+
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
begin
|
|
119
|
+
#Assigns an order to an affiliate
|
|
120
|
+
result = api_instance.assign_to_affiliate(order_id, assign_to_affiliate_request, opts)
|
|
121
|
+
p result
|
|
122
|
+
rescue UltracartClient::ApiError => e
|
|
123
|
+
puts "Exception when calling OrderApi->assign_to_affiliate: #{e}"
|
|
124
|
+
end
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Parameters
|
|
128
|
+
|
|
129
|
+
Name | Type | Description | Notes
|
|
130
|
+
------------- | ------------- | ------------- | -------------
|
|
131
|
+
**order_id** | **String**| The order id to assign to the affiliate. |
|
|
132
|
+
**assign_to_affiliate_request** | [**OrderAssignToAffiliateRequest**](OrderAssignToAffiliateRequest.md)| Assign to affiliate request |
|
|
133
|
+
**_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
|
|
134
|
+
|
|
135
|
+
### Return type
|
|
136
|
+
|
|
137
|
+
[**OrderResponse**](OrderResponse.md)
|
|
138
|
+
|
|
139
|
+
### Authorization
|
|
140
|
+
|
|
141
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
142
|
+
|
|
143
|
+
### HTTP request headers
|
|
144
|
+
|
|
145
|
+
- **Content-Type**: application/json
|
|
146
|
+
- **Accept**: application/json
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
92
150
|
# **block_refund_on_order**
|
|
93
151
|
> block_refund_on_order(order_id, opts)
|
|
94
152
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# UltracartClient::OrderAssignToAffiliateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**affiliate_email** | **String** | Affiliate email to associate with the order | [optional]
|
|
7
|
+
**affiliate_id** | **Integer** | Affiliate id to associate with the order | [optional]
|
|
8
|
+
**affiliate_sub_id** | **String** | Affiliate sub id to associate with the order | [optional]
|
|
9
|
+
|
|
10
|
+
|
|
@@ -93,6 +93,70 @@ module UltracartClient
|
|
|
93
93
|
end
|
|
94
94
|
return data, status_code, headers
|
|
95
95
|
end
|
|
96
|
+
# Assigns an order to an affiliate
|
|
97
|
+
# Assigns an order to an affiliate.
|
|
98
|
+
# @param order_id The order id to assign to the affiliate.
|
|
99
|
+
# @param assign_to_affiliate_request Assign to affiliate request
|
|
100
|
+
# @param [Hash] opts the optional parameters
|
|
101
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
102
|
+
# @return [OrderResponse]
|
|
103
|
+
def assign_to_affiliate(order_id, assign_to_affiliate_request, opts = {})
|
|
104
|
+
data, _status_code, _headers = assign_to_affiliate_with_http_info(order_id, assign_to_affiliate_request, opts)
|
|
105
|
+
data
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Assigns an order to an affiliate
|
|
109
|
+
# Assigns an order to an affiliate.
|
|
110
|
+
# @param order_id The order id to assign to the affiliate.
|
|
111
|
+
# @param assign_to_affiliate_request Assign to affiliate request
|
|
112
|
+
# @param [Hash] opts the optional parameters
|
|
113
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
114
|
+
# @return [Array<(OrderResponse, Fixnum, Hash)>] OrderResponse data, response status code and response headers
|
|
115
|
+
def assign_to_affiliate_with_http_info(order_id, assign_to_affiliate_request, opts = {})
|
|
116
|
+
if @api_client.config.debugging
|
|
117
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.assign_to_affiliate ...'
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'order_id' is set
|
|
120
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.assign_to_affiliate"
|
|
122
|
+
end
|
|
123
|
+
# verify the required parameter 'assign_to_affiliate_request' is set
|
|
124
|
+
if @api_client.config.client_side_validation && assign_to_affiliate_request.nil?
|
|
125
|
+
fail ArgumentError, "Missing the required parameter 'assign_to_affiliate_request' when calling OrderApi.assign_to_affiliate"
|
|
126
|
+
end
|
|
127
|
+
# resource path
|
|
128
|
+
local_var_path = '/order/orders/{order_id}/assignToAffiliate'.sub('{' + 'order_id' + '}', order_id.to_s)
|
|
129
|
+
|
|
130
|
+
# query parameters
|
|
131
|
+
query_params = {}
|
|
132
|
+
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
|
133
|
+
|
|
134
|
+
# header parameters
|
|
135
|
+
header_params = {}
|
|
136
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
137
|
+
# HTTP header 'Accept' (if needed)
|
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
139
|
+
# HTTP header 'Content-Type'
|
|
140
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
141
|
+
|
|
142
|
+
# form parameters
|
|
143
|
+
form_params = {}
|
|
144
|
+
|
|
145
|
+
# http body (model)
|
|
146
|
+
post_body = @api_client.object_to_http_body(assign_to_affiliate_request)
|
|
147
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
148
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
149
|
+
:header_params => header_params,
|
|
150
|
+
:query_params => query_params,
|
|
151
|
+
:form_params => form_params,
|
|
152
|
+
:body => post_body,
|
|
153
|
+
:auth_names => auth_names,
|
|
154
|
+
:return_type => 'OrderResponse')
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "API called: OrderApi#assign_to_affiliate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
157
|
+
end
|
|
158
|
+
return data, status_code, headers
|
|
159
|
+
end
|
|
96
160
|
# Set a refund block on an order
|
|
97
161
|
# Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
|
|
98
162
|
# @param order_id The order id to block a refund on.
|
|
@@ -39,6 +39,8 @@ module UltracartClient
|
|
|
39
39
|
# Message epoch milliseconds
|
|
40
40
|
attr_accessor :message_epoch
|
|
41
41
|
|
|
42
|
+
attr_accessor :message_type
|
|
43
|
+
|
|
42
44
|
attr_accessor :translations
|
|
43
45
|
|
|
44
46
|
attr_accessor :transport_statuses
|
|
@@ -84,6 +86,7 @@ module UltracartClient
|
|
|
84
86
|
:'merchant_id' => :'merchant_id',
|
|
85
87
|
:'message_dts' => :'message_dts',
|
|
86
88
|
:'message_epoch' => :'message_epoch',
|
|
89
|
+
:'message_type' => :'message_type',
|
|
87
90
|
:'translations' => :'translations',
|
|
88
91
|
:'transport_statuses' => :'transport_statuses',
|
|
89
92
|
:'type' => :'type',
|
|
@@ -105,6 +108,7 @@ module UltracartClient
|
|
|
105
108
|
:'merchant_id' => :'String',
|
|
106
109
|
:'message_dts' => :'String',
|
|
107
110
|
:'message_epoch' => :'Integer',
|
|
111
|
+
:'message_type' => :'String',
|
|
108
112
|
:'translations' => :'Array<ConversationMessageTranslation>',
|
|
109
113
|
:'transport_statuses' => :'Array<ConversationMessageTransportStatus>',
|
|
110
114
|
:'type' => :'String',
|
|
@@ -166,6 +170,10 @@ module UltracartClient
|
|
|
166
170
|
self.message_epoch = attributes[:'message_epoch']
|
|
167
171
|
end
|
|
168
172
|
|
|
173
|
+
if attributes.has_key?(:'message_type')
|
|
174
|
+
self.message_type = attributes[:'message_type']
|
|
175
|
+
end
|
|
176
|
+
|
|
169
177
|
if attributes.has_key?(:'translations')
|
|
170
178
|
if (value = attributes[:'translations']).is_a?(Array)
|
|
171
179
|
self.translations = value
|
|
@@ -230,6 +238,7 @@ module UltracartClient
|
|
|
230
238
|
merchant_id == o.merchant_id &&
|
|
231
239
|
message_dts == o.message_dts &&
|
|
232
240
|
message_epoch == o.message_epoch &&
|
|
241
|
+
message_type == o.message_type &&
|
|
233
242
|
translations == o.translations &&
|
|
234
243
|
transport_statuses == o.transport_statuses &&
|
|
235
244
|
type == o.type &&
|
|
@@ -245,7 +254,7 @@ module UltracartClient
|
|
|
245
254
|
# Calculates hash code according to all attributes.
|
|
246
255
|
# @return [Fixnum] Hash code
|
|
247
256
|
def hash
|
|
248
|
-
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, delay_until_dts, language_iso_code, media_urls, merchant_id, message_dts, message_epoch, translations, transport_statuses, type, upload_keys].hash
|
|
257
|
+
[author_conversation_participant_arn, author_conversation_participant_name, body, client_message_id, conversation_message_uuid, delay_until_dts, language_iso_code, media_urls, merchant_id, message_dts, message_epoch, message_type, translations, transport_statuses, type, upload_keys].hash
|
|
249
258
|
end
|
|
250
259
|
|
|
251
260
|
# Builds the object from hash
|
|
@@ -21,6 +21,9 @@ module UltracartClient
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :delay_subscription
|
|
23
23
|
|
|
24
|
+
# Permission flag to allow this Agent to generate coupons based upon the agent prompt instructions
|
|
25
|
+
attr_accessor :generate_coupon
|
|
26
|
+
|
|
24
27
|
attr_accessor :lookup_order_information
|
|
25
28
|
|
|
26
29
|
attr_accessor :lookup_subscription_information
|
|
@@ -78,6 +81,7 @@ module UltracartClient
|
|
|
78
81
|
:'access_storefront_and_item' => :'access_storefront_and_item',
|
|
79
82
|
:'cancel_subscription' => :'cancel_subscription',
|
|
80
83
|
:'delay_subscription' => :'delay_subscription',
|
|
84
|
+
:'generate_coupon' => :'generate_coupon',
|
|
81
85
|
:'lookup_order_information' => :'lookup_order_information',
|
|
82
86
|
:'lookup_subscription_information' => :'lookup_subscription_information',
|
|
83
87
|
:'open_support_ticket' => :'open_support_ticket',
|
|
@@ -99,6 +103,7 @@ module UltracartClient
|
|
|
99
103
|
:'access_storefront_and_item' => :'BOOLEAN',
|
|
100
104
|
:'cancel_subscription' => :'BOOLEAN',
|
|
101
105
|
:'delay_subscription' => :'BOOLEAN',
|
|
106
|
+
:'generate_coupon' => :'BOOLEAN',
|
|
102
107
|
:'lookup_order_information' => :'BOOLEAN',
|
|
103
108
|
:'lookup_subscription_information' => :'BOOLEAN',
|
|
104
109
|
:'open_support_ticket' => :'BOOLEAN',
|
|
@@ -134,6 +139,10 @@ module UltracartClient
|
|
|
134
139
|
self.delay_subscription = attributes[:'delay_subscription']
|
|
135
140
|
end
|
|
136
141
|
|
|
142
|
+
if attributes.has_key?(:'generate_coupon')
|
|
143
|
+
self.generate_coupon = attributes[:'generate_coupon']
|
|
144
|
+
end
|
|
145
|
+
|
|
137
146
|
if attributes.has_key?(:'lookup_order_information')
|
|
138
147
|
self.lookup_order_information = attributes[:'lookup_order_information']
|
|
139
148
|
end
|
|
@@ -218,6 +227,7 @@ module UltracartClient
|
|
|
218
227
|
access_storefront_and_item == o.access_storefront_and_item &&
|
|
219
228
|
cancel_subscription == o.cancel_subscription &&
|
|
220
229
|
delay_subscription == o.delay_subscription &&
|
|
230
|
+
generate_coupon == o.generate_coupon &&
|
|
221
231
|
lookup_order_information == o.lookup_order_information &&
|
|
222
232
|
lookup_subscription_information == o.lookup_subscription_information &&
|
|
223
233
|
open_support_ticket == o.open_support_ticket &&
|
|
@@ -241,7 +251,7 @@ module UltracartClient
|
|
|
241
251
|
# Calculates hash code according to all attributes.
|
|
242
252
|
# @return [Fixnum] Hash code
|
|
243
253
|
def hash
|
|
244
|
-
[access_storefront_and_item, cancel_subscription, delay_subscription, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
254
|
+
[access_storefront_and_item, cancel_subscription, delay_subscription, generate_coupon, lookup_order_information, lookup_subscription_information, open_support_ticket, open_support_ticket_channel, open_support_ticket_channel_email, open_support_ticket_zoho_desk_department_id, pause_subscription, resume_subscription, transfer_chat_to_live_agent, update_subscription_credit_card, zoho_desk_available, zoho_desk_departments].hash
|
|
245
255
|
end
|
|
246
256
|
|
|
247
257
|
# Builds the object from hash
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
|
|
15
|
+
module UltracartClient
|
|
16
|
+
class OrderAssignToAffiliateRequest
|
|
17
|
+
# Affiliate email to associate with the order
|
|
18
|
+
attr_accessor :affiliate_email
|
|
19
|
+
|
|
20
|
+
# Affiliate id to associate with the order
|
|
21
|
+
attr_accessor :affiliate_id
|
|
22
|
+
|
|
23
|
+
# Affiliate sub id to associate with the order
|
|
24
|
+
attr_accessor :affiliate_sub_id
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'affiliate_email' => :'affiliate_email',
|
|
30
|
+
:'affiliate_id' => :'affiliate_id',
|
|
31
|
+
:'affiliate_sub_id' => :'affiliate_sub_id'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.swagger_types
|
|
37
|
+
{
|
|
38
|
+
:'affiliate_email' => :'String',
|
|
39
|
+
:'affiliate_id' => :'Integer',
|
|
40
|
+
:'affiliate_sub_id' => :'String'
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Initializes the object
|
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
46
|
+
def initialize(attributes = {})
|
|
47
|
+
return unless attributes.is_a?(Hash)
|
|
48
|
+
|
|
49
|
+
# convert string to symbol for hash key
|
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
51
|
+
|
|
52
|
+
if attributes.has_key?(:'affiliate_email')
|
|
53
|
+
self.affiliate_email = attributes[:'affiliate_email']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
if attributes.has_key?(:'affiliate_id')
|
|
57
|
+
self.affiliate_id = attributes[:'affiliate_id']
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.has_key?(:'affiliate_sub_id')
|
|
61
|
+
self.affiliate_sub_id = attributes[:'affiliate_sub_id']
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
66
|
+
# @return Array for valid properties with the reasons
|
|
67
|
+
def list_invalid_properties
|
|
68
|
+
invalid_properties = Array.new
|
|
69
|
+
if !@affiliate_sub_id.nil? && @affiliate_sub_id.to_s.length > 50
|
|
70
|
+
invalid_properties.push('invalid value for "affiliate_sub_id", the character length must be smaller than or equal to 50.')
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
invalid_properties
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Check to see if the all the properties in the model are valid
|
|
77
|
+
# @return true if the model is valid
|
|
78
|
+
def valid?
|
|
79
|
+
return false if !@affiliate_sub_id.nil? && @affiliate_sub_id.to_s.length > 50
|
|
80
|
+
true
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Custom attribute writer method with validation
|
|
84
|
+
# @param [Object] affiliate_sub_id Value to be assigned
|
|
85
|
+
def affiliate_sub_id=(affiliate_sub_id)
|
|
86
|
+
if !affiliate_sub_id.nil? && affiliate_sub_id.to_s.length > 50
|
|
87
|
+
fail ArgumentError, 'invalid value for "affiliate_sub_id", the character length must be smaller than or equal to 50.'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
@affiliate_sub_id = affiliate_sub_id
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Checks equality by comparing each attribute.
|
|
94
|
+
# @param [Object] Object to be compared
|
|
95
|
+
def ==(o)
|
|
96
|
+
return true if self.equal?(o)
|
|
97
|
+
self.class == o.class &&
|
|
98
|
+
affiliate_email == o.affiliate_email &&
|
|
99
|
+
affiliate_id == o.affiliate_id &&
|
|
100
|
+
affiliate_sub_id == o.affiliate_sub_id
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Fixnum] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[affiliate_email, affiliate_id, affiliate_sub_id].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
121
|
+
if type =~ /\AArray<(.*)>/i
|
|
122
|
+
# check to ensure the input is an array given that the attribute
|
|
123
|
+
# is documented as an array but the input is not
|
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
126
|
+
end
|
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
129
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
self
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Deserializes the data based on type
|
|
136
|
+
# @param string type Data type
|
|
137
|
+
# @param string value Value to be deserialized
|
|
138
|
+
# @return [Object] Deserialized data
|
|
139
|
+
def _deserialize(type, value)
|
|
140
|
+
case type.to_sym
|
|
141
|
+
when :DateTime
|
|
142
|
+
DateTime.parse(value)
|
|
143
|
+
when :Date
|
|
144
|
+
Date.parse(value)
|
|
145
|
+
when :String
|
|
146
|
+
value.to_s
|
|
147
|
+
when :Integer
|
|
148
|
+
value.to_i
|
|
149
|
+
when :Float
|
|
150
|
+
value.to_f
|
|
151
|
+
when :BOOLEAN
|
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
153
|
+
true
|
|
154
|
+
else
|
|
155
|
+
false
|
|
156
|
+
end
|
|
157
|
+
when :Object
|
|
158
|
+
# generic object (usually a Hash), return directly
|
|
159
|
+
value
|
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each do |k, v|
|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
else # model
|
|
172
|
+
temp_model = UltracartClient.const_get(type).new
|
|
173
|
+
temp_model.build_from_hash(value)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_body
|
|
186
|
+
to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the object in the form of hash
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_hash
|
|
192
|
+
hash = {}
|
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
next if value.nil?
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Outputs non-array value in the form of hash
|
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
+
# @param [Object] value Any valid value
|
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
|
205
|
+
def _to_hash(value)
|
|
206
|
+
if value.is_a?(Array)
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
208
|
+
elsif value.is_a?(Hash)
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
+
end
|
|
212
|
+
elsif value.respond_to? :to_hash
|
|
213
|
+
value.to_hash
|
|
214
|
+
else
|
|
215
|
+
value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -669,6 +669,7 @@ require 'ultracart_api/models/oauth_token_response'
|
|
|
669
669
|
require 'ultracart_api/models/order'
|
|
670
670
|
require 'ultracart_api/models/order_affiliate'
|
|
671
671
|
require 'ultracart_api/models/order_affiliate_ledger'
|
|
672
|
+
require 'ultracart_api/models/order_assign_to_affiliate_request'
|
|
672
673
|
require 'ultracart_api/models/order_auto_order'
|
|
673
674
|
require 'ultracart_api/models/order_billing'
|
|
674
675
|
require 'ultracart_api/models/order_buysafe'
|
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: 3.11.
|
|
4
|
+
version: 3.11.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2025-11-
|
|
11
|
+
date: 2025-11-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -887,6 +887,7 @@ files:
|
|
|
887
887
|
- docs/OrderAffiliate.md
|
|
888
888
|
- docs/OrderAffiliateLedger.md
|
|
889
889
|
- docs/OrderApi.md
|
|
890
|
+
- docs/OrderAssignToAffiliateRequest.md
|
|
890
891
|
- docs/OrderAutoOrder.md
|
|
891
892
|
- docs/OrderBilling.md
|
|
892
893
|
- docs/OrderBuysafe.md
|
|
@@ -1817,6 +1818,7 @@ files:
|
|
|
1817
1818
|
- lib/ultracart_api/models/order.rb
|
|
1818
1819
|
- lib/ultracart_api/models/order_affiliate.rb
|
|
1819
1820
|
- lib/ultracart_api/models/order_affiliate_ledger.rb
|
|
1821
|
+
- lib/ultracart_api/models/order_assign_to_affiliate_request.rb
|
|
1820
1822
|
- lib/ultracart_api/models/order_auto_order.rb
|
|
1821
1823
|
- lib/ultracart_api/models/order_billing.rb
|
|
1822
1824
|
- lib/ultracart_api/models/order_buysafe.rb
|