ultracart_api 3.10.117 → 3.10.119
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/ConversationApi.md +50 -0
- data/docs/Order.md +2 -0
- data/docs/OrderItem.md +2 -0
- data/docs/OrderReason.md +10 -0
- data/docs/OrderRefundableResponse.md +6 -0
- data/lib/ultracart_api/api/conversation_api.rb +54 -0
- data/lib/ultracart_api/models/order.rb +21 -1
- data/lib/ultracart_api/models/order_item.rb +21 -1
- data/lib/ultracart_api/models/order_reason.rb +205 -0
- data/lib/ultracart_api/models/order_refundable_response.rb +69 -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: 5b2632cb45c345d2423a388b3b6b937211914e8d4a96be721503d470ff857e0f
|
4
|
+
data.tar.gz: c9fb31bc8611b4774323653157a13bd436e120cf1c69e3c4a72cf156b915ad4b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852716c1539873a1c5fd40ea0c198d81daa3f9d8cc9597645e2e07ca4cc3b1ed700e495079dd80106f8a2b5f65c5820559e86c87b1b097d40d6e84e0f587ef0d
|
7
|
+
data.tar.gz: 7acd76691d0e603839147056319e1805adc9a33ed9d351270e2987c7faf4dfed38ce17237349f501ff2272fd1863e3ddf67ea846721dec89860dbb508f6600ae
|
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.10.
|
10
|
+
- Package version: 3.10.119
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
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.10.
|
27
|
+
gem install ./ultracart_api-3.10.119.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.119.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.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.119'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -159,6 +159,7 @@ Class | Method | HTTP request | Description
|
|
159
159
|
*UltracartClient::ConversationApi* | [**leave_conversation**](docs/ConversationApi.md#leave_conversation) | **DELETE** /conversation/conversations/{conversation_uuid}/leave | Leave a conversation
|
160
160
|
*UltracartClient::ConversationApi* | [**mark_read_conversation**](docs/ConversationApi.md#mark_read_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/markread | Mark a conversation as read
|
161
161
|
*UltracartClient::ConversationApi* | [**search_conversation_canned_messages**](docs/ConversationApi.md#search_conversation_canned_messages) | **POST** /conversation/canned_messages/search | Search for canned messages by short_code
|
162
|
+
*UltracartClient::ConversationApi* | [**sms_unsubscribe_conversation**](docs/ConversationApi.md#sms_unsubscribe_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/sms_unsubscribe | Unsubscribe any SMS participants in this conversation
|
162
163
|
*UltracartClient::ConversationApi* | [**start_conversation**](docs/ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation
|
163
164
|
*UltracartClient::ConversationApi* | [**update_agent_profile**](docs/ConversationApi.md#update_agent_profile) | **PUT** /conversation/agent/profile | Update agent profile
|
164
165
|
*UltracartClient::ConversationApi* | [**update_conversation_canned_message**](docs/ConversationApi.md#update_conversation_canned_message) | **PUT** /conversation/canned_messages/{conversation_canned_message_oid} | Update a canned message
|
@@ -1085,6 +1086,7 @@ Class | Method | HTTP request | Description
|
|
1085
1086
|
- [UltracartClient::OrderQuery](docs/OrderQuery.md)
|
1086
1087
|
- [UltracartClient::OrderQueryBatch](docs/OrderQueryBatch.md)
|
1087
1088
|
- [UltracartClient::OrderQuote](docs/OrderQuote.md)
|
1089
|
+
- [UltracartClient::OrderReason](docs/OrderReason.md)
|
1088
1090
|
- [UltracartClient::OrderRefundableResponse](docs/OrderRefundableResponse.md)
|
1089
1091
|
- [UltracartClient::OrderReplacement](docs/OrderReplacement.md)
|
1090
1092
|
- [UltracartClient::OrderReplacementItem](docs/OrderReplacementItem.md)
|
@@ -1301,6 +1303,8 @@ Not every change is committed to every SDK.
|
|
1301
1303
|
|
1302
1304
|
| Version | Date | Comments |
|
1303
1305
|
| --: | :-: | --- |
|
1306
|
+
| 3.10.119 | 02/20/2023 | refund reasons |
|
1307
|
+
| 3.10.118 | 02/17/2023 | convo api - smsUnsubscribeConversation method |
|
1304
1308
|
| 3.10.117 | 02/15/2023 | added auto order sorting by next_shipment_dts |
|
1305
1309
|
| 3.10.116 | 02/10/2023 | convo - add storefront_host_name to search request |
|
1306
1310
|
| 3.10.115 | 02/07/2023 | convo - new event for when a customer joins a queue |
|
data/docs/ConversationApi.md
CHANGED
@@ -32,6 +32,7 @@ Method | HTTP request | Description
|
|
32
32
|
[**leave_conversation**](ConversationApi.md#leave_conversation) | **DELETE** /conversation/conversations/{conversation_uuid}/leave | Leave a conversation
|
33
33
|
[**mark_read_conversation**](ConversationApi.md#mark_read_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/markread | Mark a conversation as read
|
34
34
|
[**search_conversation_canned_messages**](ConversationApi.md#search_conversation_canned_messages) | **POST** /conversation/canned_messages/search | Search for canned messages by short_code
|
35
|
+
[**sms_unsubscribe_conversation**](ConversationApi.md#sms_unsubscribe_conversation) | **PUT** /conversation/conversations/{conversation_uuid}/sms_unsubscribe | Unsubscribe any SMS participants in this conversation
|
35
36
|
[**start_conversation**](ConversationApi.md#start_conversation) | **PUT** /conversation/conversations | Start a conversation
|
36
37
|
[**update_agent_profile**](ConversationApi.md#update_agent_profile) | **PUT** /conversation/agent/profile | Update agent profile
|
37
38
|
[**update_conversation_canned_message**](ConversationApi.md#update_conversation_canned_message) | **PUT** /conversation/canned_messages/{conversation_canned_message_oid} | Update a canned message
|
@@ -1405,6 +1406,55 @@ Name | Type | Description | Notes
|
|
1405
1406
|
|
1406
1407
|
|
1407
1408
|
|
1409
|
+
# **sms_unsubscribe_conversation**
|
1410
|
+
> sms_unsubscribe_conversation(conversation_uuid)
|
1411
|
+
|
1412
|
+
Unsubscribe any SMS participants in this conversation
|
1413
|
+
|
1414
|
+
Unsubscribe any SMS participants in this conversation
|
1415
|
+
|
1416
|
+
### Example
|
1417
|
+
```ruby
|
1418
|
+
# load the gem
|
1419
|
+
require 'ultracart_api'
|
1420
|
+
|
1421
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
1422
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
1423
|
+
api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
|
1424
|
+
|
1425
|
+
|
1426
|
+
conversation_uuid = 'conversation_uuid_example' # String |
|
1427
|
+
|
1428
|
+
|
1429
|
+
begin
|
1430
|
+
#Unsubscribe any SMS participants in this conversation
|
1431
|
+
api_instance.sms_unsubscribe_conversation(conversation_uuid)
|
1432
|
+
rescue UltracartClient::ApiError => e
|
1433
|
+
puts "Exception when calling ConversationApi->sms_unsubscribe_conversation: #{e}"
|
1434
|
+
end
|
1435
|
+
```
|
1436
|
+
|
1437
|
+
### Parameters
|
1438
|
+
|
1439
|
+
Name | Type | Description | Notes
|
1440
|
+
------------- | ------------- | ------------- | -------------
|
1441
|
+
**conversation_uuid** | **String**| |
|
1442
|
+
|
1443
|
+
### Return type
|
1444
|
+
|
1445
|
+
nil (empty response body)
|
1446
|
+
|
1447
|
+
### Authorization
|
1448
|
+
|
1449
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1450
|
+
|
1451
|
+
### HTTP request headers
|
1452
|
+
|
1453
|
+
- **Content-Type**: application/json
|
1454
|
+
- **Accept**: application/json
|
1455
|
+
|
1456
|
+
|
1457
|
+
|
1408
1458
|
# **start_conversation**
|
1409
1459
|
> ConversationStartResponse start_conversation(start_request)
|
1410
1460
|
|
data/docs/Order.md
CHANGED
@@ -32,7 +32,9 @@ Name | Type | Description | Notes
|
|
32
32
|
**properties** | [**Array<OrderProperty>**](OrderProperty.md) | Properties, available only through update, not through insert due to the nature of how properties are handled internally | [optional]
|
33
33
|
**quote** | [**OrderQuote**](OrderQuote.md) | | [optional]
|
34
34
|
**refund_dts** | **String** | If the order was refunded, the date/time that the last refund occurred | [optional]
|
35
|
+
**refund_reason** | **String** | Refund reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
|
35
36
|
**reject_dts** | **String** | If the order was rejected, the date/time that the rejection occurred | [optional]
|
37
|
+
**reject_reason** | **String** | Reject reason code. This can only be written during a reject operation otherwise this field is read only. | [optional]
|
36
38
|
**salesforce** | [**OrderSalesforce**](OrderSalesforce.md) | | [optional]
|
37
39
|
**shipping** | [**OrderShipping**](OrderShipping.md) | | [optional]
|
38
40
|
**summary** | [**OrderSummary**](OrderSummary.md) | | [optional]
|
data/docs/OrderItem.md
CHANGED
@@ -46,6 +46,8 @@ Name | Type | Description | Notes
|
|
46
46
|
**quantity** | **Float** | Quantity | [optional]
|
47
47
|
**quantity_refunded** | **Float** | Quantity refunded on this item (read only except refund operation) | [optional]
|
48
48
|
**quickbooks_class** | **String** | QuickBooks class | [optional]
|
49
|
+
**refund_reason** | **String** | Refund reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
|
50
|
+
**return_reason** | **String** | Return reason code. This can only be written during a refund operation otherwise this field is read only. | [optional]
|
49
51
|
**ship_separately** | **BOOLEAN** | True if this item ships in a separate box | [optional]
|
50
52
|
**shipped_by_user** | **String** | Shipped by user | [optional]
|
51
53
|
**shipped_dts** | **String** | Date/time that this item was marked shipped | [optional]
|
data/docs/OrderReason.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::OrderReason
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**default_reason** | **BOOLEAN** | Default reason | [optional]
|
7
|
+
**description** | **String** | Reason description. This is the friendly description of the reason that should be displayed to the user. | [optional]
|
8
|
+
**value** | **String** | Reason value. This is what should be submitted with a refund operation. | [optional]
|
9
|
+
|
10
|
+
|
@@ -4,7 +4,13 @@
|
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**item_level_refund_reason_required** | **BOOLEAN** | True if the item level refund reason is required | [optional]
|
8
|
+
**item_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the item level. | [optional]
|
9
|
+
**item_level_return_reasons** | [**Array<OrderReason>**](OrderReason.md) | Return codes available at the item level. | [optional]
|
7
10
|
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
11
|
+
**order_level_refund_reason_required** | **BOOLEAN** | True if the order level refund reason is required | [optional]
|
12
|
+
**order_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the order level. | [optional]
|
13
|
+
**order_level_reject_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reject codes available at the order level. | [optional]
|
8
14
|
**refundable** | **BOOLEAN** | Whether the order is refundable or not. Null should be interpreted as false. | [optional]
|
9
15
|
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
16
|
**warning** | [**Warning**](Warning.md) | | [optional]
|
@@ -1525,6 +1525,60 @@ module UltracartClient
|
|
1525
1525
|
end
|
1526
1526
|
return data, status_code, headers
|
1527
1527
|
end
|
1528
|
+
# Unsubscribe any SMS participants in this conversation
|
1529
|
+
# Unsubscribe any SMS participants in this conversation
|
1530
|
+
# @param conversation_uuid
|
1531
|
+
# @param [Hash] opts the optional parameters
|
1532
|
+
# @return [nil]
|
1533
|
+
def sms_unsubscribe_conversation(conversation_uuid, opts = {})
|
1534
|
+
sms_unsubscribe_conversation_with_http_info(conversation_uuid, opts)
|
1535
|
+
nil
|
1536
|
+
end
|
1537
|
+
|
1538
|
+
# Unsubscribe any SMS participants in this conversation
|
1539
|
+
# Unsubscribe any SMS participants in this conversation
|
1540
|
+
# @param conversation_uuid
|
1541
|
+
# @param [Hash] opts the optional parameters
|
1542
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1543
|
+
def sms_unsubscribe_conversation_with_http_info(conversation_uuid, opts = {})
|
1544
|
+
if @api_client.config.debugging
|
1545
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.sms_unsubscribe_conversation ...'
|
1546
|
+
end
|
1547
|
+
# verify the required parameter 'conversation_uuid' is set
|
1548
|
+
if @api_client.config.client_side_validation && conversation_uuid.nil?
|
1549
|
+
fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.sms_unsubscribe_conversation"
|
1550
|
+
end
|
1551
|
+
# resource path
|
1552
|
+
local_var_path = '/conversation/conversations/{conversation_uuid}/sms_unsubscribe'.sub('{' + 'conversation_uuid' + '}', conversation_uuid.to_s)
|
1553
|
+
|
1554
|
+
# query parameters
|
1555
|
+
query_params = {}
|
1556
|
+
|
1557
|
+
# header parameters
|
1558
|
+
header_params = {}
|
1559
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1560
|
+
# HTTP header 'Accept' (if needed)
|
1561
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1562
|
+
# HTTP header 'Content-Type'
|
1563
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1564
|
+
|
1565
|
+
# form parameters
|
1566
|
+
form_params = {}
|
1567
|
+
|
1568
|
+
# http body (model)
|
1569
|
+
post_body = nil
|
1570
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1571
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1572
|
+
:header_params => header_params,
|
1573
|
+
:query_params => query_params,
|
1574
|
+
:form_params => form_params,
|
1575
|
+
:body => post_body,
|
1576
|
+
:auth_names => auth_names)
|
1577
|
+
if @api_client.config.debugging
|
1578
|
+
@api_client.config.logger.debug "API called: ConversationApi#sms_unsubscribe_conversation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1579
|
+
end
|
1580
|
+
return data, status_code, headers
|
1581
|
+
end
|
1528
1582
|
# Start a conversation
|
1529
1583
|
# Start a new conversation
|
1530
1584
|
# @param start_request Start request
|
@@ -84,9 +84,15 @@ module UltracartClient
|
|
84
84
|
# If the order was refunded, the date/time that the last refund occurred
|
85
85
|
attr_accessor :refund_dts
|
86
86
|
|
87
|
+
# Refund reason code. This can only be written during a refund operation otherwise this field is read only.
|
88
|
+
attr_accessor :refund_reason
|
89
|
+
|
87
90
|
# If the order was rejected, the date/time that the rejection occurred
|
88
91
|
attr_accessor :reject_dts
|
89
92
|
|
93
|
+
# Reject reason code. This can only be written during a reject operation otherwise this field is read only.
|
94
|
+
attr_accessor :reject_reason
|
95
|
+
|
90
96
|
attr_accessor :salesforce
|
91
97
|
|
92
98
|
attr_accessor :shipping
|
@@ -155,7 +161,9 @@ module UltracartClient
|
|
155
161
|
:'properties' => :'properties',
|
156
162
|
:'quote' => :'quote',
|
157
163
|
:'refund_dts' => :'refund_dts',
|
164
|
+
:'refund_reason' => :'refund_reason',
|
158
165
|
:'reject_dts' => :'reject_dts',
|
166
|
+
:'reject_reason' => :'reject_reason',
|
159
167
|
:'salesforce' => :'salesforce',
|
160
168
|
:'shipping' => :'shipping',
|
161
169
|
:'summary' => :'summary',
|
@@ -197,7 +205,9 @@ module UltracartClient
|
|
197
205
|
:'properties' => :'Array<OrderProperty>',
|
198
206
|
:'quote' => :'OrderQuote',
|
199
207
|
:'refund_dts' => :'String',
|
208
|
+
:'refund_reason' => :'String',
|
200
209
|
:'reject_dts' => :'String',
|
210
|
+
:'reject_reason' => :'String',
|
201
211
|
:'salesforce' => :'OrderSalesforce',
|
202
212
|
:'shipping' => :'OrderShipping',
|
203
213
|
:'summary' => :'OrderSummary',
|
@@ -339,10 +349,18 @@ module UltracartClient
|
|
339
349
|
self.refund_dts = attributes[:'refund_dts']
|
340
350
|
end
|
341
351
|
|
352
|
+
if attributes.has_key?(:'refund_reason')
|
353
|
+
self.refund_reason = attributes[:'refund_reason']
|
354
|
+
end
|
355
|
+
|
342
356
|
if attributes.has_key?(:'reject_dts')
|
343
357
|
self.reject_dts = attributes[:'reject_dts']
|
344
358
|
end
|
345
359
|
|
360
|
+
if attributes.has_key?(:'reject_reason')
|
361
|
+
self.reject_reason = attributes[:'reject_reason']
|
362
|
+
end
|
363
|
+
|
346
364
|
if attributes.has_key?(:'salesforce')
|
347
365
|
self.salesforce = attributes[:'salesforce']
|
348
366
|
end
|
@@ -461,7 +479,9 @@ module UltracartClient
|
|
461
479
|
properties == o.properties &&
|
462
480
|
quote == o.quote &&
|
463
481
|
refund_dts == o.refund_dts &&
|
482
|
+
refund_reason == o.refund_reason &&
|
464
483
|
reject_dts == o.reject_dts &&
|
484
|
+
reject_reason == o.reject_reason &&
|
465
485
|
salesforce == o.salesforce &&
|
466
486
|
shipping == o.shipping &&
|
467
487
|
summary == o.summary &&
|
@@ -479,7 +499,7 @@ module UltracartClient
|
|
479
499
|
# Calculates hash code according to all attributes.
|
480
500
|
# @return [Fixnum] Hash code
|
481
501
|
def hash
|
482
|
-
[affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, reject_dts, salesforce, shipping, summary, tags, taxes, utms].hash
|
502
|
+
[affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, refund_reason, reject_dts, reject_reason, salesforce, shipping, summary, tags, taxes, utms].hash
|
483
503
|
end
|
484
504
|
|
485
505
|
# Builds the object from hash
|
@@ -136,6 +136,12 @@ module UltracartClient
|
|
136
136
|
# QuickBooks class
|
137
137
|
attr_accessor :quickbooks_class
|
138
138
|
|
139
|
+
# Refund reason code. This can only be written during a refund operation otherwise this field is read only.
|
140
|
+
attr_accessor :refund_reason
|
141
|
+
|
142
|
+
# Return reason code. This can only be written during a refund operation otherwise this field is read only.
|
143
|
+
attr_accessor :return_reason
|
144
|
+
|
139
145
|
# True if this item ships in a separate box
|
140
146
|
attr_accessor :ship_separately
|
141
147
|
|
@@ -246,6 +252,8 @@ module UltracartClient
|
|
246
252
|
:'quantity' => :'quantity',
|
247
253
|
:'quantity_refunded' => :'quantity_refunded',
|
248
254
|
:'quickbooks_class' => :'quickbooks_class',
|
255
|
+
:'refund_reason' => :'refund_reason',
|
256
|
+
:'return_reason' => :'return_reason',
|
249
257
|
:'ship_separately' => :'ship_separately',
|
250
258
|
:'shipped_by_user' => :'shipped_by_user',
|
251
259
|
:'shipped_dts' => :'shipped_dts',
|
@@ -311,6 +319,8 @@ module UltracartClient
|
|
311
319
|
:'quantity' => :'Float',
|
312
320
|
:'quantity_refunded' => :'Float',
|
313
321
|
:'quickbooks_class' => :'String',
|
322
|
+
:'refund_reason' => :'String',
|
323
|
+
:'return_reason' => :'String',
|
314
324
|
:'ship_separately' => :'BOOLEAN',
|
315
325
|
:'shipped_by_user' => :'String',
|
316
326
|
:'shipped_dts' => :'String',
|
@@ -516,6 +526,14 @@ module UltracartClient
|
|
516
526
|
self.quickbooks_class = attributes[:'quickbooks_class']
|
517
527
|
end
|
518
528
|
|
529
|
+
if attributes.has_key?(:'refund_reason')
|
530
|
+
self.refund_reason = attributes[:'refund_reason']
|
531
|
+
end
|
532
|
+
|
533
|
+
if attributes.has_key?(:'return_reason')
|
534
|
+
self.return_reason = attributes[:'return_reason']
|
535
|
+
end
|
536
|
+
|
519
537
|
if attributes.has_key?(:'ship_separately')
|
520
538
|
self.ship_separately = attributes[:'ship_separately']
|
521
539
|
end
|
@@ -761,6 +779,8 @@ module UltracartClient
|
|
761
779
|
quantity == o.quantity &&
|
762
780
|
quantity_refunded == o.quantity_refunded &&
|
763
781
|
quickbooks_class == o.quickbooks_class &&
|
782
|
+
refund_reason == o.refund_reason &&
|
783
|
+
return_reason == o.return_reason &&
|
764
784
|
ship_separately == o.ship_separately &&
|
765
785
|
shipped_by_user == o.shipped_by_user &&
|
766
786
|
shipped_dts == o.shipped_dts &&
|
@@ -788,7 +808,7 @@ module UltracartClient
|
|
788
808
|
# Calculates hash code according to all attributes.
|
789
809
|
# @return [Fixnum] Hash code
|
790
810
|
def hash
|
791
|
-
[accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
|
811
|
+
[accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, refund_reason, return_reason, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
|
792
812
|
end
|
793
813
|
|
794
814
|
# Builds the object from hash
|
@@ -0,0 +1,205 @@
|
|
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 OrderReason
|
17
|
+
# Default reason
|
18
|
+
attr_accessor :default_reason
|
19
|
+
|
20
|
+
# Reason description. This is the friendly description of the reason that should be displayed to the user.
|
21
|
+
attr_accessor :description
|
22
|
+
|
23
|
+
# Reason value. This is what should be submitted with a refund operation.
|
24
|
+
attr_accessor :value
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'default_reason' => :'default_reason',
|
30
|
+
:'description' => :'description',
|
31
|
+
:'value' => :'value'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.swagger_types
|
37
|
+
{
|
38
|
+
:'default_reason' => :'BOOLEAN',
|
39
|
+
:'description' => :'String',
|
40
|
+
:'value' => :'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?(:'default_reason')
|
53
|
+
self.default_reason = attributes[:'default_reason']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'description')
|
57
|
+
self.description = attributes[:'description']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'value')
|
61
|
+
self.value = attributes[:'value']
|
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
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
default_reason == o.default_reason &&
|
84
|
+
description == o.description &&
|
85
|
+
value == o.value
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[default_reason, description, value].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :BOOLEAN
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
temp_model = UltracartClient.const_get(type).new
|
158
|
+
temp_model.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
next if value.nil?
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
@@ -16,8 +16,26 @@ module UltracartClient
|
|
16
16
|
class OrderRefundableResponse
|
17
17
|
attr_accessor :error
|
18
18
|
|
19
|
+
# True if the item level refund reason is required
|
20
|
+
attr_accessor :item_level_refund_reason_required
|
21
|
+
|
22
|
+
# Reason codes available at the item level.
|
23
|
+
attr_accessor :item_level_refund_reasons
|
24
|
+
|
25
|
+
# Return codes available at the item level.
|
26
|
+
attr_accessor :item_level_return_reasons
|
27
|
+
|
19
28
|
attr_accessor :metadata
|
20
29
|
|
30
|
+
# True if the order level refund reason is required
|
31
|
+
attr_accessor :order_level_refund_reason_required
|
32
|
+
|
33
|
+
# Reason codes available at the order level.
|
34
|
+
attr_accessor :order_level_refund_reasons
|
35
|
+
|
36
|
+
# Reject codes available at the order level.
|
37
|
+
attr_accessor :order_level_reject_reasons
|
38
|
+
|
21
39
|
# Whether the order is refundable or not. Null should be interpreted as false.
|
22
40
|
attr_accessor :refundable
|
23
41
|
|
@@ -30,7 +48,13 @@ module UltracartClient
|
|
30
48
|
def self.attribute_map
|
31
49
|
{
|
32
50
|
:'error' => :'error',
|
51
|
+
:'item_level_refund_reason_required' => :'item_level_refund_reason_required',
|
52
|
+
:'item_level_refund_reasons' => :'item_level_refund_reasons',
|
53
|
+
:'item_level_return_reasons' => :'item_level_return_reasons',
|
33
54
|
:'metadata' => :'metadata',
|
55
|
+
:'order_level_refund_reason_required' => :'order_level_refund_reason_required',
|
56
|
+
:'order_level_refund_reasons' => :'order_level_refund_reasons',
|
57
|
+
:'order_level_reject_reasons' => :'order_level_reject_reasons',
|
34
58
|
:'refundable' => :'refundable',
|
35
59
|
:'success' => :'success',
|
36
60
|
:'warning' => :'warning'
|
@@ -41,7 +65,13 @@ module UltracartClient
|
|
41
65
|
def self.swagger_types
|
42
66
|
{
|
43
67
|
:'error' => :'Error',
|
68
|
+
:'item_level_refund_reason_required' => :'BOOLEAN',
|
69
|
+
:'item_level_refund_reasons' => :'Array<OrderReason>',
|
70
|
+
:'item_level_return_reasons' => :'Array<OrderReason>',
|
44
71
|
:'metadata' => :'ResponseMetadata',
|
72
|
+
:'order_level_refund_reason_required' => :'BOOLEAN',
|
73
|
+
:'order_level_refund_reasons' => :'Array<OrderReason>',
|
74
|
+
:'order_level_reject_reasons' => :'Array<OrderReason>',
|
45
75
|
:'refundable' => :'BOOLEAN',
|
46
76
|
:'success' => :'BOOLEAN',
|
47
77
|
:'warning' => :'Warning'
|
@@ -60,10 +90,42 @@ module UltracartClient
|
|
60
90
|
self.error = attributes[:'error']
|
61
91
|
end
|
62
92
|
|
93
|
+
if attributes.has_key?(:'item_level_refund_reason_required')
|
94
|
+
self.item_level_refund_reason_required = attributes[:'item_level_refund_reason_required']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'item_level_refund_reasons')
|
98
|
+
if (value = attributes[:'item_level_refund_reasons']).is_a?(Array)
|
99
|
+
self.item_level_refund_reasons = value
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'item_level_return_reasons')
|
104
|
+
if (value = attributes[:'item_level_return_reasons']).is_a?(Array)
|
105
|
+
self.item_level_return_reasons = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
63
109
|
if attributes.has_key?(:'metadata')
|
64
110
|
self.metadata = attributes[:'metadata']
|
65
111
|
end
|
66
112
|
|
113
|
+
if attributes.has_key?(:'order_level_refund_reason_required')
|
114
|
+
self.order_level_refund_reason_required = attributes[:'order_level_refund_reason_required']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'order_level_refund_reasons')
|
118
|
+
if (value = attributes[:'order_level_refund_reasons']).is_a?(Array)
|
119
|
+
self.order_level_refund_reasons = value
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'order_level_reject_reasons')
|
124
|
+
if (value = attributes[:'order_level_reject_reasons']).is_a?(Array)
|
125
|
+
self.order_level_reject_reasons = value
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
67
129
|
if attributes.has_key?(:'refundable')
|
68
130
|
self.refundable = attributes[:'refundable']
|
69
131
|
end
|
@@ -96,7 +158,13 @@ module UltracartClient
|
|
96
158
|
return true if self.equal?(o)
|
97
159
|
self.class == o.class &&
|
98
160
|
error == o.error &&
|
161
|
+
item_level_refund_reason_required == o.item_level_refund_reason_required &&
|
162
|
+
item_level_refund_reasons == o.item_level_refund_reasons &&
|
163
|
+
item_level_return_reasons == o.item_level_return_reasons &&
|
99
164
|
metadata == o.metadata &&
|
165
|
+
order_level_refund_reason_required == o.order_level_refund_reason_required &&
|
166
|
+
order_level_refund_reasons == o.order_level_refund_reasons &&
|
167
|
+
order_level_reject_reasons == o.order_level_reject_reasons &&
|
100
168
|
refundable == o.refundable &&
|
101
169
|
success == o.success &&
|
102
170
|
warning == o.warning
|
@@ -111,7 +179,7 @@ module UltracartClient
|
|
111
179
|
# Calculates hash code according to all attributes.
|
112
180
|
# @return [Fixnum] Hash code
|
113
181
|
def hash
|
114
|
-
[error, metadata, refundable, success, warning].hash
|
182
|
+
[error, item_level_refund_reason_required, item_level_refund_reasons, item_level_return_reasons, metadata, order_level_refund_reason_required, order_level_refund_reasons, order_level_reject_reasons, refundable, success, warning].hash
|
115
183
|
end
|
116
184
|
|
117
185
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -610,6 +610,7 @@ require 'ultracart_api/models/order_property'
|
|
610
610
|
require 'ultracart_api/models/order_query'
|
611
611
|
require 'ultracart_api/models/order_query_batch'
|
612
612
|
require 'ultracart_api/models/order_quote'
|
613
|
+
require 'ultracart_api/models/order_reason'
|
613
614
|
require 'ultracart_api/models/order_refundable_response'
|
614
615
|
require 'ultracart_api/models/order_replacement'
|
615
616
|
require 'ultracart_api/models/order_replacement_item'
|
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.10.
|
4
|
+
version: 3.10.119
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -828,6 +828,7 @@ files:
|
|
828
828
|
- docs/OrderQuery.md
|
829
829
|
- docs/OrderQueryBatch.md
|
830
830
|
- docs/OrderQuote.md
|
831
|
+
- docs/OrderReason.md
|
831
832
|
- docs/OrderRefundableResponse.md
|
832
833
|
- docs/OrderReplacement.md
|
833
834
|
- docs/OrderReplacementItem.md
|
@@ -1596,6 +1597,7 @@ files:
|
|
1596
1597
|
- lib/ultracart_api/models/order_query.rb
|
1597
1598
|
- lib/ultracart_api/models/order_query_batch.rb
|
1598
1599
|
- lib/ultracart_api/models/order_quote.rb
|
1600
|
+
- lib/ultracart_api/models/order_reason.rb
|
1599
1601
|
- lib/ultracart_api/models/order_refundable_response.rb
|
1600
1602
|
- lib/ultracart_api/models/order_replacement.rb
|
1601
1603
|
- lib/ultracart_api/models/order_replacement_item.rb
|