ultracart_api 3.10.63 → 3.10.65
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/AffiliateClick.md +2 -0
- data/docs/Conversation.md +1 -0
- data/docs/OrderApi.md +51 -0
- data/docs/OrderRefundableResponse.md +12 -0
- data/lib/ultracart_api/api/order_api.rb +55 -0
- data/lib/ultracart_api/models/affiliate_click.rb +24 -4
- data/lib/ultracart_api/models/conversation.rb +11 -1
- data/lib/ultracart_api/models/order_property.rb +5 -5
- data/lib/ultracart_api/models/order_refundable_response.rb +222 -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: c40eeee0e52a4048d5da0be9aa0bf8e3ed8081125900ef7c548e1f3b7f85a76d
|
4
|
+
data.tar.gz: 13968b964e8cbbca5846a9aacda47607c4d2fde6d2b84885686275fb480bdaa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d8a223749f59285baef7781831359d02247c9d29fcf08b66698658c61be51c52da8b66ff8444108c823ee52b0d0aa460d2993c27b0529bfe1eb4fd07ac3ffd
|
7
|
+
data.tar.gz: 347be067a1bab1af80f91b120e5f7c9e569170643458b66e5b8661c629096e772d91676f3d3b9ae574ef6d12b60369d0458cca3e4c3c82c6a48bfff2773b077f
|
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.65
|
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.65.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.65.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.65'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -227,6 +227,7 @@ Class | Method | HTTP request | Description
|
|
227
227
|
*UltracartClient::OrderApi* | [**get_orders_batch**](docs/OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
|
228
228
|
*UltracartClient::OrderApi* | [**get_orders_by_query**](docs/OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
|
229
229
|
*UltracartClient::OrderApi* | [**insert_order**](docs/OrderApi.md#insert_order) | **POST** /order/orders | Insert an order
|
230
|
+
*UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
230
231
|
*UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
231
232
|
*UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
232
233
|
*UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
@@ -1003,6 +1004,7 @@ Class | Method | HTTP request | Description
|
|
1003
1004
|
- [UltracartClient::OrderQuery](docs/OrderQuery.md)
|
1004
1005
|
- [UltracartClient::OrderQueryBatch](docs/OrderQueryBatch.md)
|
1005
1006
|
- [UltracartClient::OrderQuote](docs/OrderQuote.md)
|
1007
|
+
- [UltracartClient::OrderRefundableResponse](docs/OrderRefundableResponse.md)
|
1006
1008
|
- [UltracartClient::OrderReplacement](docs/OrderReplacement.md)
|
1007
1009
|
- [UltracartClient::OrderReplacementItem](docs/OrderReplacementItem.md)
|
1008
1010
|
- [UltracartClient::OrderReplacementResponse](docs/OrderReplacementResponse.md)
|
@@ -1213,6 +1215,8 @@ Not every change is committed to every SDK.
|
|
1213
1215
|
|
1214
1216
|
| Version | Date | Comments |
|
1215
1217
|
| --: | :-: | --- |
|
1218
|
+
| 3.10.65 | 11/15/2022 | order api new method is order refundable |
|
1219
|
+
| 3.10.64 | 11/15/2022 | increase order property length to 10k char |
|
1216
1220
|
| 3.10.63 | 11/14/2022 | conversations - add allowed values for update agent status |
|
1217
1221
|
| 3.10.62 | 11/09/2022 | conversations - add an enum of event typing |
|
1218
1222
|
| 3.10.61 | 11/04/2022 | new coupon type percent based on msrp |
|
data/docs/AffiliateClick.md
CHANGED
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
|
|
13
13
|
**link** | [**AffiliateLink**](AffiliateLink.md) | | [optional]
|
14
14
|
**referrer** | **String** | URL that referred the click (Browser Header Referer) | [optional]
|
15
15
|
**referrer_query_string** | **String** | Query string that was on the referrer URL. | [optional]
|
16
|
+
**screen_recording_uuid** | **String** | Screen recording UUID | [optional]
|
16
17
|
**sub_id** | **String** | Sub ID value passed on the click | [optional]
|
18
|
+
**ucacid** | **String** | UC Analytics Identifier | [optional]
|
17
19
|
|
18
20
|
|
data/docs/Conversation.md
CHANGED
@@ -3,6 +3,7 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
+
**base_language_iso_code** | **String** | The base language iso code for the StoreFront that everything is translated into | [optional]
|
6
7
|
**closed** | **BOOLEAN** | | [optional]
|
7
8
|
**conversation_arn** | **String** | | [optional]
|
8
9
|
**conversation_uuid** | **String** | | [optional]
|
data/docs/OrderApi.md
CHANGED
@@ -20,6 +20,7 @@ Method | HTTP request | Description
|
|
20
20
|
[**get_orders_batch**](OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
|
21
21
|
[**get_orders_by_query**](OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
|
22
22
|
[**insert_order**](OrderApi.md#insert_order) | **POST** /order/orders | Insert an order
|
23
|
+
[**is_refundable_order**](OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
23
24
|
[**process_payment**](OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
24
25
|
[**refund_order**](OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
25
26
|
[**replacement**](OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
@@ -926,6 +927,56 @@ Name | Type | Description | Notes
|
|
926
927
|
|
927
928
|
|
928
929
|
|
930
|
+
# **is_refundable_order**
|
931
|
+
> OrderRefundableResponse is_refundable_order(order_id)
|
932
|
+
|
933
|
+
Determine if an order can be refunded
|
934
|
+
|
935
|
+
Determine if an order can be refunded based upon payment method and age
|
936
|
+
|
937
|
+
### Example
|
938
|
+
```ruby
|
939
|
+
# load the gem
|
940
|
+
require 'ultracart_api'
|
941
|
+
|
942
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
943
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
944
|
+
api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
|
945
|
+
|
946
|
+
|
947
|
+
order_id = 'order_id_example' # String | The order id to check for refundable order.
|
948
|
+
|
949
|
+
|
950
|
+
begin
|
951
|
+
#Determine if an order can be refunded
|
952
|
+
result = api_instance.is_refundable_order(order_id)
|
953
|
+
p result
|
954
|
+
rescue UltracartClient::ApiError => e
|
955
|
+
puts "Exception when calling OrderApi->is_refundable_order: #{e}"
|
956
|
+
end
|
957
|
+
```
|
958
|
+
|
959
|
+
### Parameters
|
960
|
+
|
961
|
+
Name | Type | Description | Notes
|
962
|
+
------------- | ------------- | ------------- | -------------
|
963
|
+
**order_id** | **String**| The order id to check for refundable order. |
|
964
|
+
|
965
|
+
### Return type
|
966
|
+
|
967
|
+
[**OrderRefundableResponse**](OrderRefundableResponse.md)
|
968
|
+
|
969
|
+
### Authorization
|
970
|
+
|
971
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
972
|
+
|
973
|
+
### HTTP request headers
|
974
|
+
|
975
|
+
- **Content-Type**: application/json; charset=UTF-8
|
976
|
+
- **Accept**: application/json
|
977
|
+
|
978
|
+
|
979
|
+
|
929
980
|
# **process_payment**
|
930
981
|
> OrderProcessPaymentResponse process_payment(order_id, process_payment_request)
|
931
982
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::OrderRefundableResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
8
|
+
**refundable** | **BOOLEAN** | Whether the order is refundable or not. | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
@@ -1037,6 +1037,61 @@ module UltracartClient
|
|
1037
1037
|
end
|
1038
1038
|
return data, status_code, headers
|
1039
1039
|
end
|
1040
|
+
# Determine if an order can be refunded
|
1041
|
+
# Determine if an order can be refunded based upon payment method and age
|
1042
|
+
# @param order_id The order id to check for refundable order.
|
1043
|
+
# @param [Hash] opts the optional parameters
|
1044
|
+
# @return [OrderRefundableResponse]
|
1045
|
+
def is_refundable_order(order_id, opts = {})
|
1046
|
+
data, _status_code, _headers = is_refundable_order_with_http_info(order_id, opts)
|
1047
|
+
data
|
1048
|
+
end
|
1049
|
+
|
1050
|
+
# Determine if an order can be refunded
|
1051
|
+
# Determine if an order can be refunded based upon payment method and age
|
1052
|
+
# @param order_id The order id to check for refundable order.
|
1053
|
+
# @param [Hash] opts the optional parameters
|
1054
|
+
# @return [Array<(OrderRefundableResponse, Fixnum, Hash)>] OrderRefundableResponse data, response status code and response headers
|
1055
|
+
def is_refundable_order_with_http_info(order_id, opts = {})
|
1056
|
+
if @api_client.config.debugging
|
1057
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.is_refundable_order ...'
|
1058
|
+
end
|
1059
|
+
# verify the required parameter 'order_id' is set
|
1060
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
1061
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.is_refundable_order"
|
1062
|
+
end
|
1063
|
+
# resource path
|
1064
|
+
local_var_path = '/order/orders/{order_id}/refundable'.sub('{' + 'order_id' + '}', order_id.to_s)
|
1065
|
+
|
1066
|
+
# query parameters
|
1067
|
+
query_params = {}
|
1068
|
+
|
1069
|
+
# header parameters
|
1070
|
+
header_params = {}
|
1071
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1072
|
+
# HTTP header 'Accept' (if needed)
|
1073
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1074
|
+
# HTTP header 'Content-Type'
|
1075
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1076
|
+
|
1077
|
+
# form parameters
|
1078
|
+
form_params = {}
|
1079
|
+
|
1080
|
+
# http body (model)
|
1081
|
+
post_body = nil
|
1082
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1083
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1084
|
+
:header_params => header_params,
|
1085
|
+
:query_params => query_params,
|
1086
|
+
:form_params => form_params,
|
1087
|
+
:body => post_body,
|
1088
|
+
:auth_names => auth_names,
|
1089
|
+
:return_type => 'OrderRefundableResponse')
|
1090
|
+
if @api_client.config.debugging
|
1091
|
+
@api_client.config.logger.debug "API called: OrderApi#is_refundable_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1092
|
+
end
|
1093
|
+
return data, status_code, headers
|
1094
|
+
end
|
1040
1095
|
# Process payment
|
1041
1096
|
# Process payment on order
|
1042
1097
|
# @param order_id The order id to process payment on
|
@@ -43,9 +43,15 @@ module UltracartClient
|
|
43
43
|
# Query string that was on the referrer URL.
|
44
44
|
attr_accessor :referrer_query_string
|
45
45
|
|
46
|
+
# Screen recording UUID
|
47
|
+
attr_accessor :screen_recording_uuid
|
48
|
+
|
46
49
|
# Sub ID value passed on the click
|
47
50
|
attr_accessor :sub_id
|
48
51
|
|
52
|
+
# UC Analytics Identifier
|
53
|
+
attr_accessor :ucacid
|
54
|
+
|
49
55
|
# Attribute mapping from ruby-style variable name to JSON key.
|
50
56
|
def self.attribute_map
|
51
57
|
{
|
@@ -59,7 +65,9 @@ module UltracartClient
|
|
59
65
|
:'link' => :'link',
|
60
66
|
:'referrer' => :'referrer',
|
61
67
|
:'referrer_query_string' => :'referrer_query_string',
|
62
|
-
:'
|
68
|
+
:'screen_recording_uuid' => :'screen_recording_uuid',
|
69
|
+
:'sub_id' => :'sub_id',
|
70
|
+
:'ucacid' => :'ucacid'
|
63
71
|
}
|
64
72
|
end
|
65
73
|
|
@@ -76,7 +84,9 @@ module UltracartClient
|
|
76
84
|
:'link' => :'AffiliateLink',
|
77
85
|
:'referrer' => :'String',
|
78
86
|
:'referrer_query_string' => :'String',
|
79
|
-
:'
|
87
|
+
:'screen_recording_uuid' => :'String',
|
88
|
+
:'sub_id' => :'String',
|
89
|
+
:'ucacid' => :'String'
|
80
90
|
}
|
81
91
|
end
|
82
92
|
|
@@ -128,9 +138,17 @@ module UltracartClient
|
|
128
138
|
self.referrer_query_string = attributes[:'referrer_query_string']
|
129
139
|
end
|
130
140
|
|
141
|
+
if attributes.has_key?(:'screen_recording_uuid')
|
142
|
+
self.screen_recording_uuid = attributes[:'screen_recording_uuid']
|
143
|
+
end
|
144
|
+
|
131
145
|
if attributes.has_key?(:'sub_id')
|
132
146
|
self.sub_id = attributes[:'sub_id']
|
133
147
|
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'ucacid')
|
150
|
+
self.ucacid = attributes[:'ucacid']
|
151
|
+
end
|
134
152
|
end
|
135
153
|
|
136
154
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -161,7 +179,9 @@ module UltracartClient
|
|
161
179
|
link == o.link &&
|
162
180
|
referrer == o.referrer &&
|
163
181
|
referrer_query_string == o.referrer_query_string &&
|
164
|
-
|
182
|
+
screen_recording_uuid == o.screen_recording_uuid &&
|
183
|
+
sub_id == o.sub_id &&
|
184
|
+
ucacid == o.ucacid
|
165
185
|
end
|
166
186
|
|
167
187
|
# @see the `==` method
|
@@ -173,7 +193,7 @@ module UltracartClient
|
|
173
193
|
# Calculates hash code according to all attributes.
|
174
194
|
# @return [Fixnum] Hash code
|
175
195
|
def hash
|
176
|
-
[affiliate_click_oid, affiliate_link_oid, affiliate_oid, click_dts, ip_address, landing_page, landing_page_query_string, link, referrer, referrer_query_string, sub_id].hash
|
196
|
+
[affiliate_click_oid, affiliate_link_oid, affiliate_oid, click_dts, ip_address, landing_page, landing_page_query_string, link, referrer, referrer_query_string, screen_recording_uuid, sub_id, ucacid].hash
|
177
197
|
end
|
178
198
|
|
179
199
|
# Builds the object from hash
|
@@ -14,6 +14,9 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class Conversation
|
17
|
+
# The base language iso code for the StoreFront that everything is translated into
|
18
|
+
attr_accessor :base_language_iso_code
|
19
|
+
|
17
20
|
attr_accessor :closed
|
18
21
|
|
19
22
|
attr_accessor :conversation_arn
|
@@ -75,6 +78,7 @@ module UltracartClient
|
|
75
78
|
# Attribute mapping from ruby-style variable name to JSON key.
|
76
79
|
def self.attribute_map
|
77
80
|
{
|
81
|
+
:'base_language_iso_code' => :'base_language_iso_code',
|
78
82
|
:'closed' => :'closed',
|
79
83
|
:'conversation_arn' => :'conversation_arn',
|
80
84
|
:'conversation_uuid' => :'conversation_uuid',
|
@@ -97,6 +101,7 @@ module UltracartClient
|
|
97
101
|
# Attribute type mapping.
|
98
102
|
def self.swagger_types
|
99
103
|
{
|
104
|
+
:'base_language_iso_code' => :'String',
|
100
105
|
:'closed' => :'BOOLEAN',
|
101
106
|
:'conversation_arn' => :'String',
|
102
107
|
:'conversation_uuid' => :'String',
|
@@ -124,6 +129,10 @@ module UltracartClient
|
|
124
129
|
# convert string to symbol for hash key
|
125
130
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
126
131
|
|
132
|
+
if attributes.has_key?(:'base_language_iso_code')
|
133
|
+
self.base_language_iso_code = attributes[:'base_language_iso_code']
|
134
|
+
end
|
135
|
+
|
127
136
|
if attributes.has_key?(:'closed')
|
128
137
|
self.closed = attributes[:'closed']
|
129
138
|
end
|
@@ -223,6 +232,7 @@ module UltracartClient
|
|
223
232
|
def ==(o)
|
224
233
|
return true if self.equal?(o)
|
225
234
|
self.class == o.class &&
|
235
|
+
base_language_iso_code == o.base_language_iso_code &&
|
226
236
|
closed == o.closed &&
|
227
237
|
conversation_arn == o.conversation_arn &&
|
228
238
|
conversation_uuid == o.conversation_uuid &&
|
@@ -250,7 +260,7 @@ module UltracartClient
|
|
250
260
|
# Calculates hash code according to all attributes.
|
251
261
|
# @return [Fixnum] Hash code
|
252
262
|
def hash
|
253
|
-
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
263
|
+
[base_language_iso_code, closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
254
264
|
end
|
255
265
|
|
256
266
|
# Builds the object from hash
|
@@ -79,8 +79,8 @@ module UltracartClient
|
|
79
79
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
80
80
|
end
|
81
81
|
|
82
|
-
if !@value.nil? && @value.to_s.length >
|
83
|
-
invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to
|
82
|
+
if !@value.nil? && @value.to_s.length > 10000
|
83
|
+
invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 10000.')
|
84
84
|
end
|
85
85
|
|
86
86
|
invalid_properties
|
@@ -90,7 +90,7 @@ module UltracartClient
|
|
90
90
|
# @return true if the model is valid
|
91
91
|
def valid?
|
92
92
|
return false if !@name.nil? && @name.to_s.length > 100
|
93
|
-
return false if !@value.nil? && @value.to_s.length >
|
93
|
+
return false if !@value.nil? && @value.to_s.length > 10000
|
94
94
|
true
|
95
95
|
end
|
96
96
|
|
@@ -107,8 +107,8 @@ module UltracartClient
|
|
107
107
|
# Custom attribute writer method with validation
|
108
108
|
# @param [Object] value Value to be assigned
|
109
109
|
def value=(value)
|
110
|
-
if !value.nil? && value.to_s.length >
|
111
|
-
fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to
|
110
|
+
if !value.nil? && value.to_s.length > 10000
|
111
|
+
fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 10000.'
|
112
112
|
end
|
113
113
|
|
114
114
|
@value = value
|
@@ -0,0 +1,222 @@
|
|
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 OrderRefundableResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# Whether the order is refundable or not.
|
22
|
+
attr_accessor :refundable
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'refundable' => :'refundable',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'refundable' => :'BOOLEAN',
|
46
|
+
:'success' => :'BOOLEAN',
|
47
|
+
:'warning' => :'Warning'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'error')
|
60
|
+
self.error = attributes[:'error']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'metadata')
|
64
|
+
self.metadata = attributes[:'metadata']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'refundable')
|
68
|
+
self.refundable = attributes[:'refundable']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'success')
|
72
|
+
self.success = attributes[:'success']
|
73
|
+
end
|
74
|
+
|
75
|
+
if attributes.has_key?(:'warning')
|
76
|
+
self.warning = attributes[:'warning']
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
81
|
+
# @return Array for valid properties with the reasons
|
82
|
+
def list_invalid_properties
|
83
|
+
invalid_properties = Array.new
|
84
|
+
invalid_properties
|
85
|
+
end
|
86
|
+
|
87
|
+
# Check to see if the all the properties in the model are valid
|
88
|
+
# @return true if the model is valid
|
89
|
+
def valid?
|
90
|
+
true
|
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
|
+
error == o.error &&
|
99
|
+
metadata == o.metadata &&
|
100
|
+
refundable == o.refundable &&
|
101
|
+
success == o.success &&
|
102
|
+
warning == o.warning
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Fixnum] Hash code
|
113
|
+
def hash
|
114
|
+
[error, metadata, refundable, success, warning].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def build_from_hash(attributes)
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
if type =~ /\AArray<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
128
|
+
end
|
129
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
130
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
131
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
132
|
+
end
|
133
|
+
|
134
|
+
self
|
135
|
+
end
|
136
|
+
|
137
|
+
# Deserializes the data based on type
|
138
|
+
# @param string type Data type
|
139
|
+
# @param string value Value to be deserialized
|
140
|
+
# @return [Object] Deserialized data
|
141
|
+
def _deserialize(type, value)
|
142
|
+
case type.to_sym
|
143
|
+
when :DateTime
|
144
|
+
DateTime.parse(value)
|
145
|
+
when :Date
|
146
|
+
Date.parse(value)
|
147
|
+
when :String
|
148
|
+
value.to_s
|
149
|
+
when :Integer
|
150
|
+
value.to_i
|
151
|
+
when :Float
|
152
|
+
value.to_f
|
153
|
+
when :BOOLEAN
|
154
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
155
|
+
true
|
156
|
+
else
|
157
|
+
false
|
158
|
+
end
|
159
|
+
when :Object
|
160
|
+
# generic object (usually a Hash), return directly
|
161
|
+
value
|
162
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
163
|
+
inner_type = Regexp.last_match[:inner_type]
|
164
|
+
value.map { |v| _deserialize(inner_type, v) }
|
165
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
166
|
+
k_type = Regexp.last_match[:k_type]
|
167
|
+
v_type = Regexp.last_match[:v_type]
|
168
|
+
{}.tap do |hash|
|
169
|
+
value.each do |k, v|
|
170
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
171
|
+
end
|
172
|
+
end
|
173
|
+
else # model
|
174
|
+
temp_model = UltracartClient.const_get(type).new
|
175
|
+
temp_model.build_from_hash(value)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
# Returns the string representation of the object
|
180
|
+
# @return [String] String presentation of the object
|
181
|
+
def to_s
|
182
|
+
to_hash.to_s
|
183
|
+
end
|
184
|
+
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
187
|
+
def to_body
|
188
|
+
to_hash
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = self.send(attr)
|
197
|
+
next if value.nil?
|
198
|
+
hash[param] = _to_hash(value)
|
199
|
+
end
|
200
|
+
hash
|
201
|
+
end
|
202
|
+
|
203
|
+
# Outputs non-array value in the form of hash
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
205
|
+
# @param [Object] value Any valid value
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
207
|
+
def _to_hash(value)
|
208
|
+
if value.is_a?(Array)
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
210
|
+
elsif value.is_a?(Hash)
|
211
|
+
{}.tap do |hash|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
213
|
+
end
|
214
|
+
elsif value.respond_to? :to_hash
|
215
|
+
value.to_hash
|
216
|
+
else
|
217
|
+
value
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
end
|
222
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -559,6 +559,7 @@ require 'ultracart_api/models/order_property'
|
|
559
559
|
require 'ultracart_api/models/order_query'
|
560
560
|
require 'ultracart_api/models/order_query_batch'
|
561
561
|
require 'ultracart_api/models/order_quote'
|
562
|
+
require 'ultracart_api/models/order_refundable_response'
|
562
563
|
require 'ultracart_api/models/order_replacement'
|
563
564
|
require 'ultracart_api/models/order_replacement_item'
|
564
565
|
require 'ultracart_api/models/order_replacement_response'
|
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.65
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -777,6 +777,7 @@ files:
|
|
777
777
|
- docs/OrderQuery.md
|
778
778
|
- docs/OrderQueryBatch.md
|
779
779
|
- docs/OrderQuote.md
|
780
|
+
- docs/OrderRefundableResponse.md
|
780
781
|
- docs/OrderReplacement.md
|
781
782
|
- docs/OrderReplacementItem.md
|
782
783
|
- docs/OrderReplacementResponse.md
|
@@ -1488,6 +1489,7 @@ files:
|
|
1488
1489
|
- lib/ultracart_api/models/order_query.rb
|
1489
1490
|
- lib/ultracart_api/models/order_query_batch.rb
|
1490
1491
|
- lib/ultracart_api/models/order_quote.rb
|
1492
|
+
- lib/ultracart_api/models/order_refundable_response.rb
|
1491
1493
|
- lib/ultracart_api/models/order_replacement.rb
|
1492
1494
|
- lib/ultracart_api/models/order_replacement_item.rb
|
1493
1495
|
- lib/ultracart_api/models/order_replacement_response.rb
|