ultracart_api 4.0.80.rc → 4.0.82.rc

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a322a85b349645739ae36e28b3a9743baf0f2a1fddb5be6476aab6e125b274b3
4
- data.tar.gz: 8bf1a3abf38c6f1c5dfff703feb1e88e1e293f44708c3cc1dc65c0f127a20487
3
+ metadata.gz: 4603d18781a538d380b6f59b637aacb9c0e296572050e353fbf2da40a020ea5f
4
+ data.tar.gz: 1e9415dbe9f78ec22cba8719ce07e19818cd430fafe656ea4aa12d2a38bc90d9
5
5
  SHA512:
6
- metadata.gz: 2a8c9ad1b086b094816a581aea317fa49aff3adddf7fa8c52b87bb0e623e57e03c7da234053eddb9cfe5f5d28663e6910fc1d9da991580d8b58ab3ae523484e2
7
- data.tar.gz: fb725fc80d7fa1755cfe30450d3128af41bbc2efa1d9853c9f34a9a65ab05fe01f300f8084bdfc8061381200143642dc06ef82bcf3301493e97e86e81143e7a5
6
+ metadata.gz: a7561e75a1d8b0acf91aa8764efd3992517f30e8c18fce379a7d3e7f454371580c5b087c593c8c43de7bdcf420dfc5141607aa358b5928c19a7213f43f95dc31
7
+ data.tar.gz: 9c5df587e925a0cc15d8a1ecf9ed82116de0f334cb2db761058f9b0d1355b01a0d19d163f885de9229608c8994b995300d6b0c6fb989dd65638ee8aab9ff3658
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.80.rc
10
+ - Package version: 4.0.82.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.80.rc.gem
27
+ gem install ./ultracart_api-4.0.82.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.80.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.82.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.80.rc'
36
+ gem 'ultracart_api', '~> 4.0.82.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -233,6 +233,7 @@ Class | Method | HTTP request | Description
233
233
  *UltracartClient::OrderApi* | [**get_orders_batch**](docs/OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
234
234
  *UltracartClient::OrderApi* | [**get_orders_by_query**](docs/OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
235
235
  *UltracartClient::OrderApi* | [**insert_order**](docs/OrderApi.md#insert_order) | **POST** /order/orders | Insert an order
236
+ *UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
236
237
  *UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
237
238
  *UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
238
239
  *UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
@@ -1009,6 +1010,7 @@ Class | Method | HTTP request | Description
1009
1010
  - [UltracartClient::OrderQuery](docs/OrderQuery.md)
1010
1011
  - [UltracartClient::OrderQueryBatch](docs/OrderQueryBatch.md)
1011
1012
  - [UltracartClient::OrderQuote](docs/OrderQuote.md)
1013
+ - [UltracartClient::OrderRefundableResponse](docs/OrderRefundableResponse.md)
1012
1014
  - [UltracartClient::OrderReplacement](docs/OrderReplacement.md)
1013
1015
  - [UltracartClient::OrderReplacementItem](docs/OrderReplacementItem.md)
1014
1016
  - [UltracartClient::OrderReplacementResponse](docs/OrderReplacementResponse.md)
@@ -1222,6 +1224,8 @@ Not every change is committed to every SDK.
1222
1224
 
1223
1225
  | Version | Date | Comments |
1224
1226
  | --: | :-: | --- |
1227
+ | 4.0.82-RC | 11/15/2022 | order api new method is order refundable |
1228
+ | 4.0.81-RC | 11/15/2022 | increase order property length to 10k char |
1225
1229
  | 4.0.80-RC | 11/14/2022 | conversations - add allowed values for update agent status |
1226
1230
  | 4.0.79-RC | 11/09/2022 | conversations - add an enum of event typing |
1227
1231
  | 4.0.78-RC | 11/04/2022 | new coupon type percent based on msrp |
@@ -14,7 +14,9 @@
14
14
  | **link** | [**AffiliateLink**](AffiliateLink.md) | | [optional] |
15
15
  | **referrer** | **String** | URL that referred the click (Browser Header Referer) | [optional] |
16
16
  | **referrer_query_string** | **String** | Query string that was on the referrer URL. | [optional] |
17
+ | **screen_recording_uuid** | **String** | Screen recording UUID | [optional] |
17
18
  | **sub_id** | **String** | Sub ID value passed on the click | [optional] |
19
+ | **ucacid** | **String** | UC Analytics Identifier | [optional] |
18
20
 
19
21
  ## Example
20
22
 
@@ -32,7 +34,9 @@ instance = UltracartClient::AffiliateClick.new(
32
34
  link: null,
33
35
  referrer: null,
34
36
  referrer_query_string: null,
35
- sub_id: null
37
+ screen_recording_uuid: null,
38
+ sub_id: null,
39
+ ucacid: null
36
40
  )
37
41
  ```
38
42
 
data/docs/Conversation.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  | Name | Type | Description | Notes |
6
6
  | ---- | ---- | ----------- | ----- |
7
+ | **base_language_iso_code** | **String** | The base language iso code for the StoreFront that everything is translated into | [optional] |
7
8
  | **closed** | **Boolean** | | [optional] |
8
9
  | **conversation_arn** | **String** | | [optional] |
9
10
  | **conversation_uuid** | **String** | | [optional] |
@@ -27,6 +28,7 @@
27
28
  require 'ultracart_api'
28
29
 
29
30
  instance = UltracartClient::Conversation.new(
31
+ base_language_iso_code: null,
30
32
  closed: null,
31
33
  conversation_arn: null,
32
34
  conversation_uuid: null,
data/docs/OrderApi.md CHANGED
@@ -20,6 +20,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
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 |
@@ -1263,6 +1264,77 @@ end
1263
1264
  - **Accept**: application/json
1264
1265
 
1265
1266
 
1267
+ ## is_refundable_order
1268
+
1269
+ > <OrderRefundableResponse> is_refundable_order(order_id)
1270
+
1271
+ Determine if an order can be refunded
1272
+
1273
+ Determine if an order can be refunded based upon payment method and age
1274
+
1275
+ ### Examples
1276
+
1277
+ ```ruby
1278
+ require 'time'
1279
+ require 'ultracart_api'
1280
+ require 'json'
1281
+ require 'yaml'
1282
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1283
+
1284
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1285
+ # As such, this might not be the best way to use this object.
1286
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1287
+
1288
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1289
+ order_id = 'order_id_example' # String | The order id to check for refundable order.
1290
+
1291
+ begin
1292
+ # Determine if an order can be refunded
1293
+ result = api_instance.is_refundable_order(order_id)
1294
+ p result
1295
+ rescue UltracartClient::ApiError => e
1296
+ puts "Error when calling OrderApi->is_refundable_order: #{e}"
1297
+ end
1298
+ ```
1299
+
1300
+ #### Using the is_refundable_order_with_http_info variant
1301
+
1302
+ This returns an Array which contains the response data, status code and headers.
1303
+
1304
+ > <Array(<OrderRefundableResponse>, Integer, Hash)> is_refundable_order_with_http_info(order_id)
1305
+
1306
+ ```ruby
1307
+ begin
1308
+ # Determine if an order can be refunded
1309
+ data, status_code, headers = api_instance.is_refundable_order_with_http_info(order_id)
1310
+ p status_code # => 2xx
1311
+ p headers # => { ... }
1312
+ p data # => <OrderRefundableResponse>
1313
+ rescue UltracartClient::ApiError => e
1314
+ puts "Error when calling OrderApi->is_refundable_order_with_http_info: #{e}"
1315
+ end
1316
+ ```
1317
+
1318
+ ### Parameters
1319
+
1320
+ | Name | Type | Description | Notes |
1321
+ | ---- | ---- | ----------- | ----- |
1322
+ | **order_id** | **String** | The order id to check for refundable order. | |
1323
+
1324
+ ### Return type
1325
+
1326
+ [**OrderRefundableResponse**](OrderRefundableResponse.md)
1327
+
1328
+ ### Authorization
1329
+
1330
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1331
+
1332
+ ### HTTP request headers
1333
+
1334
+ - **Content-Type**: Not defined
1335
+ - **Accept**: application/json
1336
+
1337
+
1266
1338
  ## process_payment
1267
1339
 
1268
1340
  > <OrderProcessPaymentResponse> process_payment(order_id, process_payment_request)
@@ -0,0 +1,26 @@
1
+ # UltracartClient::OrderRefundableResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **refundable** | **Boolean** | Whether the order is refundable or not. | [optional] |
10
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
11
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::OrderRefundableResponse.new(
19
+ error: null,
20
+ metadata: null,
21
+ refundable: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -1207,6 +1207,70 @@ module UltracartClient
1207
1207
  return data, status_code, headers
1208
1208
  end
1209
1209
 
1210
+ # Determine if an order can be refunded
1211
+ # Determine if an order can be refunded based upon payment method and age
1212
+ # @param order_id [String] The order id to check for refundable order.
1213
+ # @param [Hash] opts the optional parameters
1214
+ # @return [OrderRefundableResponse]
1215
+ def is_refundable_order(order_id, opts = {})
1216
+ data, _status_code, _headers = is_refundable_order_with_http_info(order_id, opts)
1217
+ data
1218
+ end
1219
+
1220
+ # Determine if an order can be refunded
1221
+ # Determine if an order can be refunded based upon payment method and age
1222
+ # @param order_id [String] The order id to check for refundable order.
1223
+ # @param [Hash] opts the optional parameters
1224
+ # @return [Array<(OrderRefundableResponse, Integer, Hash)>] OrderRefundableResponse data, response status code and response headers
1225
+ def is_refundable_order_with_http_info(order_id, opts = {})
1226
+ if @api_client.config.debugging
1227
+ @api_client.config.logger.debug 'Calling API: OrderApi.is_refundable_order ...'
1228
+ end
1229
+ # verify the required parameter 'order_id' is set
1230
+ if @api_client.config.client_side_validation && order_id.nil?
1231
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.is_refundable_order"
1232
+ end
1233
+ # resource path
1234
+ local_var_path = '/order/orders/{order_id}/refundable'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
1235
+
1236
+ # query parameters
1237
+ query_params = opts[:query_params] || {}
1238
+
1239
+ # header parameters
1240
+ header_params = opts[:header_params] || {}
1241
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1242
+ # HTTP header 'Accept' (if needed)
1243
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1244
+
1245
+ # form parameters
1246
+ form_params = opts[:form_params] || {}
1247
+
1248
+ # http body (model)
1249
+ post_body = opts[:debug_body]
1250
+
1251
+ # return_type
1252
+ return_type = opts[:debug_return_type] || 'OrderRefundableResponse'
1253
+
1254
+ # auth_names
1255
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1256
+
1257
+ new_options = opts.merge(
1258
+ :operation => :"OrderApi.is_refundable_order",
1259
+ :header_params => header_params,
1260
+ :query_params => query_params,
1261
+ :form_params => form_params,
1262
+ :body => post_body,
1263
+ :auth_names => auth_names,
1264
+ :return_type => return_type
1265
+ )
1266
+
1267
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1268
+ if @api_client.config.debugging
1269
+ @api_client.config.logger.debug "API called: OrderApi#is_refundable_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1270
+ end
1271
+ return data, status_code, headers
1272
+ end
1273
+
1210
1274
  # Process payment
1211
1275
  # Process payment on order
1212
1276
  # @param order_id [String] The order id to process payment on
@@ -44,9 +44,15 @@ module UltracartClient
44
44
  # Query string that was on the referrer URL.
45
45
  attr_accessor :referrer_query_string
46
46
 
47
+ # Screen recording UUID
48
+ attr_accessor :screen_recording_uuid
49
+
47
50
  # Sub ID value passed on the click
48
51
  attr_accessor :sub_id
49
52
 
53
+ # UC Analytics Identifier
54
+ attr_accessor :ucacid
55
+
50
56
  # Attribute mapping from ruby-style variable name to JSON key.
51
57
  def self.attribute_map
52
58
  {
@@ -60,7 +66,9 @@ module UltracartClient
60
66
  :'link' => :'link',
61
67
  :'referrer' => :'referrer',
62
68
  :'referrer_query_string' => :'referrer_query_string',
63
- :'sub_id' => :'sub_id'
69
+ :'screen_recording_uuid' => :'screen_recording_uuid',
70
+ :'sub_id' => :'sub_id',
71
+ :'ucacid' => :'ucacid'
64
72
  }
65
73
  end
66
74
 
@@ -82,7 +90,9 @@ module UltracartClient
82
90
  :'link' => :'AffiliateLink',
83
91
  :'referrer' => :'String',
84
92
  :'referrer_query_string' => :'String',
85
- :'sub_id' => :'String'
93
+ :'screen_recording_uuid' => :'String',
94
+ :'sub_id' => :'String',
95
+ :'ucacid' => :'String'
86
96
  }
87
97
  end
88
98
 
@@ -147,9 +157,17 @@ module UltracartClient
147
157
  self.referrer_query_string = attributes[:'referrer_query_string']
148
158
  end
149
159
 
160
+ if attributes.key?(:'screen_recording_uuid')
161
+ self.screen_recording_uuid = attributes[:'screen_recording_uuid']
162
+ end
163
+
150
164
  if attributes.key?(:'sub_id')
151
165
  self.sub_id = attributes[:'sub_id']
152
166
  end
167
+
168
+ if attributes.key?(:'ucacid')
169
+ self.ucacid = attributes[:'ucacid']
170
+ end
153
171
  end
154
172
 
155
173
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -180,7 +198,9 @@ module UltracartClient
180
198
  link == o.link &&
181
199
  referrer == o.referrer &&
182
200
  referrer_query_string == o.referrer_query_string &&
183
- sub_id == o.sub_id
201
+ screen_recording_uuid == o.screen_recording_uuid &&
202
+ sub_id == o.sub_id &&
203
+ ucacid == o.ucacid
184
204
  end
185
205
 
186
206
  # @see the `==` method
@@ -192,7 +212,7 @@ module UltracartClient
192
212
  # Calculates hash code according to all attributes.
193
213
  # @return [Integer] Hash code
194
214
  def hash
195
- [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
215
+ [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
196
216
  end
197
217
 
198
218
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class Conversation
18
+ # The base language iso code for the StoreFront that everything is translated into
19
+ attr_accessor :base_language_iso_code
20
+
18
21
  attr_accessor :closed
19
22
 
20
23
  attr_accessor :conversation_arn
@@ -76,6 +79,7 @@ module UltracartClient
76
79
  # Attribute mapping from ruby-style variable name to JSON key.
77
80
  def self.attribute_map
78
81
  {
82
+ :'base_language_iso_code' => :'base_language_iso_code',
79
83
  :'closed' => :'closed',
80
84
  :'conversation_arn' => :'conversation_arn',
81
85
  :'conversation_uuid' => :'conversation_uuid',
@@ -103,6 +107,7 @@ module UltracartClient
103
107
  # Attribute type mapping.
104
108
  def self.openapi_types
105
109
  {
110
+ :'base_language_iso_code' => :'String',
106
111
  :'closed' => :'Boolean',
107
112
  :'conversation_arn' => :'String',
108
113
  :'conversation_uuid' => :'String',
@@ -143,6 +148,10 @@ module UltracartClient
143
148
  h[k.to_sym] = v
144
149
  }
145
150
 
151
+ if attributes.key?(:'base_language_iso_code')
152
+ self.base_language_iso_code = attributes[:'base_language_iso_code']
153
+ end
154
+
146
155
  if attributes.key?(:'closed')
147
156
  self.closed = attributes[:'closed']
148
157
  end
@@ -242,6 +251,7 @@ module UltracartClient
242
251
  def ==(o)
243
252
  return true if self.equal?(o)
244
253
  self.class == o.class &&
254
+ base_language_iso_code == o.base_language_iso_code &&
245
255
  closed == o.closed &&
246
256
  conversation_arn == o.conversation_arn &&
247
257
  conversation_uuid == o.conversation_uuid &&
@@ -269,7 +279,7 @@ module UltracartClient
269
279
  # Calculates hash code according to all attributes.
270
280
  # @return [Integer] Hash code
271
281
  def hash
272
- [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
282
+ [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
273
283
  end
274
284
 
275
285
  # Builds the object from hash
@@ -98,8 +98,8 @@ module UltracartClient
98
98
  invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
99
99
  end
100
100
 
101
- if !@value.nil? && @value.to_s.length > 3800
102
- invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 3800.')
101
+ if !@value.nil? && @value.to_s.length > 10000
102
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 10000.')
103
103
  end
104
104
 
105
105
  invalid_properties
@@ -109,7 +109,7 @@ module UltracartClient
109
109
  # @return true if the model is valid
110
110
  def valid?
111
111
  return false if !@name.nil? && @name.to_s.length > 100
112
- return false if !@value.nil? && @value.to_s.length > 3800
112
+ return false if !@value.nil? && @value.to_s.length > 10000
113
113
  true
114
114
  end
115
115
 
@@ -126,8 +126,8 @@ module UltracartClient
126
126
  # Custom attribute writer method with validation
127
127
  # @param [Object] value Value to be assigned
128
128
  def value=(value)
129
- if !value.nil? && value.to_s.length > 3800
130
- fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 3800.'
129
+ if !value.nil? && value.to_s.length > 10000
130
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 10000.'
131
131
  end
132
132
 
133
133
  @value = value
@@ -0,0 +1,257 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class OrderRefundableResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Whether the order is refundable or not.
23
+ attr_accessor :refundable
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :warning
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'error' => :'error',
34
+ :'metadata' => :'metadata',
35
+ :'refundable' => :'refundable',
36
+ :'success' => :'success',
37
+ :'warning' => :'warning'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'error' => :'Error',
50
+ :'metadata' => :'ResponseMetadata',
51
+ :'refundable' => :'Boolean',
52
+ :'success' => :'Boolean',
53
+ :'warning' => :'Warning'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderRefundableResponse` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderRefundableResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'error')
79
+ self.error = attributes[:'error']
80
+ end
81
+
82
+ if attributes.key?(:'metadata')
83
+ self.metadata = attributes[:'metadata']
84
+ end
85
+
86
+ if attributes.key?(:'refundable')
87
+ self.refundable = attributes[:'refundable']
88
+ end
89
+
90
+ if attributes.key?(:'success')
91
+ self.success = attributes[:'success']
92
+ end
93
+
94
+ if attributes.key?(:'warning')
95
+ self.warning = attributes[:'warning']
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ error == o.error &&
118
+ metadata == o.metadata &&
119
+ refundable == o.refundable &&
120
+ success == o.success &&
121
+ warning == o.warning
122
+ end
123
+
124
+ # @see the `==` method
125
+ # @param [Object] Object to be compared
126
+ def eql?(o)
127
+ self == o
128
+ end
129
+
130
+ # Calculates hash code according to all attributes.
131
+ # @return [Integer] Hash code
132
+ def hash
133
+ [error, metadata, refundable, success, warning].hash
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def self.build_from_hash(attributes)
140
+ new.build_from_hash(attributes)
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def build_from_hash(attributes)
147
+ return nil unless attributes.is_a?(Hash)
148
+ attributes = attributes.transform_keys(&:to_sym)
149
+ self.class.openapi_types.each_pair do |key, type|
150
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
151
+ self.send("#{key}=", nil)
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
156
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
+ end
158
+ elsif !attributes[self.class.attribute_map[key]].nil?
159
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
+ end
161
+ end
162
+
163
+ self
164
+ end
165
+
166
+ # Deserializes the data based on type
167
+ # @param string type Data type
168
+ # @param string value Value to be deserialized
169
+ # @return [Object] Deserialized data
170
+ def _deserialize(type, value)
171
+ case type.to_sym
172
+ when :Time
173
+ Time.parse(value)
174
+ when :Date
175
+ Date.parse(value)
176
+ when :String
177
+ value.to_s
178
+ when :Integer
179
+ value.to_i
180
+ when :Float
181
+ value.to_f
182
+ when :Boolean
183
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
+ true
185
+ else
186
+ false
187
+ end
188
+ when :Object
189
+ # generic object (usually a Hash), return directly
190
+ value
191
+ when /\AArray<(?<inner_type>.+)>\z/
192
+ inner_type = Regexp.last_match[:inner_type]
193
+ value.map { |v| _deserialize(inner_type, v) }
194
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
+ k_type = Regexp.last_match[:k_type]
196
+ v_type = Regexp.last_match[:v_type]
197
+ {}.tap do |hash|
198
+ value.each do |k, v|
199
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
+ end
201
+ end
202
+ else # model
203
+ # models (e.g. Pet) or oneOf
204
+ klass = UltracartClient.const_get(type)
205
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
206
+ end
207
+ end
208
+
209
+ # Returns the string representation of the object
210
+ # @return [String] String presentation of the object
211
+ def to_s
212
+ to_hash.to_s
213
+ end
214
+
215
+ # to_body is an alias to to_hash (backward compatibility)
216
+ # @return [Hash] Returns the object in the form of hash
217
+ def to_body
218
+ to_hash
219
+ end
220
+
221
+ # Returns the object in the form of hash
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_hash
224
+ hash = {}
225
+ self.class.attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ # Outputs non-array value in the form of hash
238
+ # For object, use to_hash. Otherwise, just return the value
239
+ # @param [Object] value Any valid value
240
+ # @return [Hash] Returns the value in the form of hash
241
+ def _to_hash(value)
242
+ if value.is_a?(Array)
243
+ value.compact.map { |v| _to_hash(v) }
244
+ elsif value.is_a?(Hash)
245
+ {}.tap do |hash|
246
+ value.each { |k, v| hash[k] = _to_hash(v) }
247
+ end
248
+ elsif value.respond_to? :to_hash
249
+ value.to_hash
250
+ else
251
+ value
252
+ end
253
+ end
254
+
255
+ end
256
+
257
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.80.rc'
14
+ VERSION = '4.0.82.rc'
15
15
  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: 4.0.80.rc
4
+ version: 4.0.82.rc
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-14 00:00:00.000000000 Z
11
+ date: 2022-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -617,6 +617,7 @@ files:
617
617
  - docs/OrderQuery.md
618
618
  - docs/OrderQueryBatch.md
619
619
  - docs/OrderQuote.md
620
+ - docs/OrderRefundableResponse.md
620
621
  - docs/OrderReplacement.md
621
622
  - docs/OrderReplacementItem.md
622
623
  - docs/OrderReplacementResponse.md
@@ -1328,6 +1329,7 @@ files:
1328
1329
  - lib/ultracart_api/models/order_query.rb
1329
1330
  - lib/ultracart_api/models/order_query_batch.rb
1330
1331
  - lib/ultracart_api/models/order_quote.rb
1332
+ - lib/ultracart_api/models/order_refundable_response.rb
1331
1333
  - lib/ultracart_api/models/order_replacement.rb
1332
1334
  - lib/ultracart_api/models/order_replacement_item.rb
1333
1335
  - lib/ultracart_api/models/order_replacement_response.rb