ultracart_api 3.10.104 → 3.10.106
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/ItemAutoOrder.md +3 -0
- data/docs/OrderApi.md +51 -0
- data/docs/OrderInvoiceResponse.md +12 -0
- data/lib/ultracart_api/api/order_api.rb +55 -0
- data/lib/ultracart_api/models/item_auto_order.rb +31 -1
- data/lib/ultracart_api/models/order_invoice_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: d3f36076b042b214c4579487347fe265e0c748648ad77e94f80c540fd608ac79
|
4
|
+
data.tar.gz: 283b1c5f6335470a8ffb210cbc2e816dba6953a6d915760e920e98d2db10b0d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 367491fdee95ded52be2a46eafd4dff23c8f583998e4d07ad14425f3d1ce92edf46b7442a29b1a1d41619d61bbbb8d2337bc7ac40bd34f269d61b32e411c690c
|
7
|
+
data.tar.gz: f98dafe4dd4540224ff4705941644fa1b647e7761ea59938bc1d0da9df55d61f088d8394cc1d21ca9fdf3e00f131a9bb62efe913fc6cd4cb358bbf0fb7a59807
|
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.106
|
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.106.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.106.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.106'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -242,6 +242,7 @@ Class | Method | HTTP request | Description
|
|
242
242
|
*UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
243
243
|
*UltracartClient::OrderApi* | [**duplicate_order**](docs/OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
|
244
244
|
*UltracartClient::OrderApi* | [**format**](docs/OrderApi.md#format) | **POST** /order/orders/{order_id}/format | Format order
|
245
|
+
*UltracartClient::OrderApi* | [**generate_invoice**](docs/OrderApi.md#generate_invoice) | **GET** /order/orders/{order_id}/invoice | Generate an invoice for this order.
|
245
246
|
*UltracartClient::OrderApi* | [**generate_order_token**](docs/OrderApi.md#generate_order_token) | **GET** /order/orders/token/{order_id} | Generate an order token for a given order id
|
246
247
|
*UltracartClient::OrderApi* | [**generate_packing_slip_all_dc**](docs/OrderApi.md#generate_packing_slip_all_dc) | **GET** /order/orders/{order_id}/packing_slip | Generate a packing slip for this order across all distribution centers.
|
247
248
|
*UltracartClient::OrderApi* | [**generate_packing_slip_specific_dc**](docs/OrderApi.md#generate_packing_slip_specific_dc) | **GET** /order/orders/{order_id}/packing_slip/{distribution_center_code} | Generate a packing slip for this order for the given distribution center.
|
@@ -1049,6 +1050,7 @@ Class | Method | HTTP request | Description
|
|
1049
1050
|
- [UltracartClient::OrderGift](docs/OrderGift.md)
|
1050
1051
|
- [UltracartClient::OrderGiftCertificate](docs/OrderGiftCertificate.md)
|
1051
1052
|
- [UltracartClient::OrderInternal](docs/OrderInternal.md)
|
1053
|
+
- [UltracartClient::OrderInvoiceResponse](docs/OrderInvoiceResponse.md)
|
1052
1054
|
- [UltracartClient::OrderItem](docs/OrderItem.md)
|
1053
1055
|
- [UltracartClient::OrderItemEdi](docs/OrderItemEdi.md)
|
1054
1056
|
- [UltracartClient::OrderItemEdiIdentification](docs/OrderItemEdiIdentification.md)
|
@@ -1290,6 +1292,8 @@ Not every change is committed to every SDK.
|
|
1290
1292
|
|
1291
1293
|
| Version | Date | Comments |
|
1292
1294
|
| --: | :-: | --- |
|
1295
|
+
| 3.10.106 | 01/25/2023 | order api method generateInvoice |
|
1296
|
+
| 3.10.105 | 01/24/2023 | auto order - cancel minimum and change balance options |
|
1293
1297
|
| 3.10.104 | 01/23/2023 | conversation - method to fetch single engagement record |
|
1294
1298
|
| 3.10.103 | 01/19/2023 | added skip_on_rebill field to coupon object |
|
1295
1299
|
| 3.10.102 | 01/19/2023 | convo - getConversationPermissions added |
|
data/docs/ItemAutoOrder.md
CHANGED
@@ -5,8 +5,11 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**auth_future_amount** | **Float** | Amount to try and authorize for the future rebill | [optional]
|
7
7
|
**auth_test_amount** | **Float** | Amount to try and test authorize | [optional]
|
8
|
+
**auto_order_cancel_charge_minimum_balance** | **BOOLEAN** | If true, the cost of the cancel item will be the remaining balance of the minimum rebill or lifetime value | [optional]
|
8
9
|
**auto_order_cancel_item_id** | **String** | Item id to attempt charging the customer for if they cancel | [optional]
|
9
10
|
**auto_order_cancel_item_oid** | **Integer** | Item object identifier to attempt charging the customer for if they cancel | [optional]
|
11
|
+
**auto_order_cancel_minimum_life_time_value** | **Float** | The minimum life time value that must be paid in order to not be charged the cancellation item. | [optional]
|
12
|
+
**auto_order_cancel_minimum_rebill_value** | **Float** | The minimum rebill value that must be paid in order to not be charged the cancellation item. | [optional]
|
10
13
|
**auto_order_downgrade_items** | **Array<String>** | List of downgrade items presented to customer service representatives | [optional]
|
11
14
|
**auto_order_paused** | **BOOLEAN** | True if the rebill processing of this item is paused | [optional]
|
12
15
|
**auto_order_prohibit_expiring_cards** | **Integer** | Minimum number of months before expiration for the card. Overrides the account level setting if higher. Set to zero to disable. | [optional]
|
data/docs/OrderApi.md
CHANGED
@@ -9,6 +9,7 @@ Method | HTTP request | Description
|
|
9
9
|
[**delete_order**](OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
10
10
|
[**duplicate_order**](OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
|
11
11
|
[**format**](OrderApi.md#format) | **POST** /order/orders/{order_id}/format | Format order
|
12
|
+
[**generate_invoice**](OrderApi.md#generate_invoice) | **GET** /order/orders/{order_id}/invoice | Generate an invoice for this order.
|
12
13
|
[**generate_order_token**](OrderApi.md#generate_order_token) | **GET** /order/orders/token/{order_id} | Generate an order token for a given order id
|
13
14
|
[**generate_packing_slip_all_dc**](OrderApi.md#generate_packing_slip_all_dc) | **GET** /order/orders/{order_id}/packing_slip | Generate a packing slip for this order across all distribution centers.
|
14
15
|
[**generate_packing_slip_specific_dc**](OrderApi.md#generate_packing_slip_specific_dc) | **GET** /order/orders/{order_id}/packing_slip/{distribution_center_code} | Generate a packing slip for this order for the given distribution center.
|
@@ -289,6 +290,56 @@ Name | Type | Description | Notes
|
|
289
290
|
|
290
291
|
|
291
292
|
|
293
|
+
# **generate_invoice**
|
294
|
+
> OrderInvoiceResponse generate_invoice(order_id)
|
295
|
+
|
296
|
+
Generate an invoice for this order.
|
297
|
+
|
298
|
+
The invoice PDF that is returned is base 64 encoded
|
299
|
+
|
300
|
+
### Example
|
301
|
+
```ruby
|
302
|
+
# load the gem
|
303
|
+
require 'ultracart_api'
|
304
|
+
|
305
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
306
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
307
|
+
api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
|
308
|
+
|
309
|
+
|
310
|
+
order_id = 'order_id_example' # String | Order ID
|
311
|
+
|
312
|
+
|
313
|
+
begin
|
314
|
+
#Generate an invoice for this order.
|
315
|
+
result = api_instance.generate_invoice(order_id)
|
316
|
+
p result
|
317
|
+
rescue UltracartClient::ApiError => e
|
318
|
+
puts "Exception when calling OrderApi->generate_invoice: #{e}"
|
319
|
+
end
|
320
|
+
```
|
321
|
+
|
322
|
+
### Parameters
|
323
|
+
|
324
|
+
Name | Type | Description | Notes
|
325
|
+
------------- | ------------- | ------------- | -------------
|
326
|
+
**order_id** | **String**| Order ID |
|
327
|
+
|
328
|
+
### Return type
|
329
|
+
|
330
|
+
[**OrderInvoiceResponse**](OrderInvoiceResponse.md)
|
331
|
+
|
332
|
+
### Authorization
|
333
|
+
|
334
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
335
|
+
|
336
|
+
### HTTP request headers
|
337
|
+
|
338
|
+
- **Content-Type**: application/json
|
339
|
+
- **Accept**: application/json
|
340
|
+
|
341
|
+
|
342
|
+
|
292
343
|
# **generate_order_token**
|
293
344
|
> OrderTokenResponse generate_order_token(order_id)
|
294
345
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::OrderInvoiceResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
8
|
+
**pdf_base64** | **String** | pdf_base64 | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
@@ -321,6 +321,61 @@ module UltracartClient
|
|
321
321
|
end
|
322
322
|
return data, status_code, headers
|
323
323
|
end
|
324
|
+
# Generate an invoice for this order.
|
325
|
+
# The invoice PDF that is returned is base 64 encoded
|
326
|
+
# @param order_id Order ID
|
327
|
+
# @param [Hash] opts the optional parameters
|
328
|
+
# @return [OrderInvoiceResponse]
|
329
|
+
def generate_invoice(order_id, opts = {})
|
330
|
+
data, _status_code, _headers = generate_invoice_with_http_info(order_id, opts)
|
331
|
+
data
|
332
|
+
end
|
333
|
+
|
334
|
+
# Generate an invoice for this order.
|
335
|
+
# The invoice PDF that is returned is base 64 encoded
|
336
|
+
# @param order_id Order ID
|
337
|
+
# @param [Hash] opts the optional parameters
|
338
|
+
# @return [Array<(OrderInvoiceResponse, Fixnum, Hash)>] OrderInvoiceResponse data, response status code and response headers
|
339
|
+
def generate_invoice_with_http_info(order_id, opts = {})
|
340
|
+
if @api_client.config.debugging
|
341
|
+
@api_client.config.logger.debug 'Calling API: OrderApi.generate_invoice ...'
|
342
|
+
end
|
343
|
+
# verify the required parameter 'order_id' is set
|
344
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
345
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.generate_invoice"
|
346
|
+
end
|
347
|
+
# resource path
|
348
|
+
local_var_path = '/order/orders/{order_id}/invoice'.sub('{' + 'order_id' + '}', order_id.to_s)
|
349
|
+
|
350
|
+
# query parameters
|
351
|
+
query_params = {}
|
352
|
+
|
353
|
+
# header parameters
|
354
|
+
header_params = {}
|
355
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
356
|
+
# HTTP header 'Accept' (if needed)
|
357
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
358
|
+
# HTTP header 'Content-Type'
|
359
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
360
|
+
|
361
|
+
# form parameters
|
362
|
+
form_params = {}
|
363
|
+
|
364
|
+
# http body (model)
|
365
|
+
post_body = nil
|
366
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
367
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
368
|
+
:header_params => header_params,
|
369
|
+
:query_params => query_params,
|
370
|
+
:form_params => form_params,
|
371
|
+
:body => post_body,
|
372
|
+
:auth_names => auth_names,
|
373
|
+
:return_type => 'OrderInvoiceResponse')
|
374
|
+
if @api_client.config.debugging
|
375
|
+
@api_client.config.logger.debug "API called: OrderApi#generate_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
376
|
+
end
|
377
|
+
return data, status_code, headers
|
378
|
+
end
|
324
379
|
# Generate an order token for a given order id
|
325
380
|
# Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
326
381
|
# @param order_id The order id to generate a token for.
|
@@ -20,12 +20,21 @@ module UltracartClient
|
|
20
20
|
# Amount to try and test authorize
|
21
21
|
attr_accessor :auth_test_amount
|
22
22
|
|
23
|
+
# If true, the cost of the cancel item will be the remaining balance of the minimum rebill or lifetime value
|
24
|
+
attr_accessor :auto_order_cancel_charge_minimum_balance
|
25
|
+
|
23
26
|
# Item id to attempt charging the customer for if they cancel
|
24
27
|
attr_accessor :auto_order_cancel_item_id
|
25
28
|
|
26
29
|
# Item object identifier to attempt charging the customer for if they cancel
|
27
30
|
attr_accessor :auto_order_cancel_item_oid
|
28
31
|
|
32
|
+
# The minimum life time value that must be paid in order to not be charged the cancellation item.
|
33
|
+
attr_accessor :auto_order_cancel_minimum_life_time_value
|
34
|
+
|
35
|
+
# The minimum rebill value that must be paid in order to not be charged the cancellation item.
|
36
|
+
attr_accessor :auto_order_cancel_minimum_rebill_value
|
37
|
+
|
29
38
|
# List of downgrade items presented to customer service representatives
|
30
39
|
attr_accessor :auto_order_downgrade_items
|
31
40
|
|
@@ -70,8 +79,11 @@ module UltracartClient
|
|
70
79
|
{
|
71
80
|
:'auth_future_amount' => :'auth_future_amount',
|
72
81
|
:'auth_test_amount' => :'auth_test_amount',
|
82
|
+
:'auto_order_cancel_charge_minimum_balance' => :'auto_order_cancel_charge_minimum_balance',
|
73
83
|
:'auto_order_cancel_item_id' => :'auto_order_cancel_item_id',
|
74
84
|
:'auto_order_cancel_item_oid' => :'auto_order_cancel_item_oid',
|
85
|
+
:'auto_order_cancel_minimum_life_time_value' => :'auto_order_cancel_minimum_life_time_value',
|
86
|
+
:'auto_order_cancel_minimum_rebill_value' => :'auto_order_cancel_minimum_rebill_value',
|
75
87
|
:'auto_order_downgrade_items' => :'auto_order_downgrade_items',
|
76
88
|
:'auto_order_paused' => :'auto_order_paused',
|
77
89
|
:'auto_order_prohibit_expiring_cards' => :'auto_order_prohibit_expiring_cards',
|
@@ -93,8 +105,11 @@ module UltracartClient
|
|
93
105
|
{
|
94
106
|
:'auth_future_amount' => :'Float',
|
95
107
|
:'auth_test_amount' => :'Float',
|
108
|
+
:'auto_order_cancel_charge_minimum_balance' => :'BOOLEAN',
|
96
109
|
:'auto_order_cancel_item_id' => :'String',
|
97
110
|
:'auto_order_cancel_item_oid' => :'Integer',
|
111
|
+
:'auto_order_cancel_minimum_life_time_value' => :'Float',
|
112
|
+
:'auto_order_cancel_minimum_rebill_value' => :'Float',
|
98
113
|
:'auto_order_downgrade_items' => :'Array<String>',
|
99
114
|
:'auto_order_paused' => :'BOOLEAN',
|
100
115
|
:'auto_order_prohibit_expiring_cards' => :'Integer',
|
@@ -127,6 +142,10 @@ module UltracartClient
|
|
127
142
|
self.auth_test_amount = attributes[:'auth_test_amount']
|
128
143
|
end
|
129
144
|
|
145
|
+
if attributes.has_key?(:'auto_order_cancel_charge_minimum_balance')
|
146
|
+
self.auto_order_cancel_charge_minimum_balance = attributes[:'auto_order_cancel_charge_minimum_balance']
|
147
|
+
end
|
148
|
+
|
130
149
|
if attributes.has_key?(:'auto_order_cancel_item_id')
|
131
150
|
self.auto_order_cancel_item_id = attributes[:'auto_order_cancel_item_id']
|
132
151
|
end
|
@@ -135,6 +154,14 @@ module UltracartClient
|
|
135
154
|
self.auto_order_cancel_item_oid = attributes[:'auto_order_cancel_item_oid']
|
136
155
|
end
|
137
156
|
|
157
|
+
if attributes.has_key?(:'auto_order_cancel_minimum_life_time_value')
|
158
|
+
self.auto_order_cancel_minimum_life_time_value = attributes[:'auto_order_cancel_minimum_life_time_value']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'auto_order_cancel_minimum_rebill_value')
|
162
|
+
self.auto_order_cancel_minimum_rebill_value = attributes[:'auto_order_cancel_minimum_rebill_value']
|
163
|
+
end
|
164
|
+
|
138
165
|
if attributes.has_key?(:'auto_order_downgrade_items')
|
139
166
|
if (value = attributes[:'auto_order_downgrade_items']).is_a?(Array)
|
140
167
|
self.auto_order_downgrade_items = value
|
@@ -231,8 +258,11 @@ module UltracartClient
|
|
231
258
|
self.class == o.class &&
|
232
259
|
auth_future_amount == o.auth_future_amount &&
|
233
260
|
auth_test_amount == o.auth_test_amount &&
|
261
|
+
auto_order_cancel_charge_minimum_balance == o.auto_order_cancel_charge_minimum_balance &&
|
234
262
|
auto_order_cancel_item_id == o.auto_order_cancel_item_id &&
|
235
263
|
auto_order_cancel_item_oid == o.auto_order_cancel_item_oid &&
|
264
|
+
auto_order_cancel_minimum_life_time_value == o.auto_order_cancel_minimum_life_time_value &&
|
265
|
+
auto_order_cancel_minimum_rebill_value == o.auto_order_cancel_minimum_rebill_value &&
|
236
266
|
auto_order_downgrade_items == o.auto_order_downgrade_items &&
|
237
267
|
auto_order_paused == o.auto_order_paused &&
|
238
268
|
auto_order_prohibit_expiring_cards == o.auto_order_prohibit_expiring_cards &&
|
@@ -257,7 +287,7 @@ module UltracartClient
|
|
257
287
|
# Calculates hash code according to all attributes.
|
258
288
|
# @return [Fixnum] Hash code
|
259
289
|
def hash
|
260
|
-
[auth_future_amount, auth_test_amount, auto_order_cancel_item_id, auto_order_cancel_item_oid, auto_order_downgrade_items, auto_order_paused, auto_order_prohibit_expiring_cards, auto_order_schedules, auto_order_upgrade_items, auto_order_upsell, auto_order_upsell_no_easy_cancel, auto_order_upsell_one_per_customer, auto_orderable, cancel_other_auto_orders, free_shipping_auto_order, refund_other_auto_orders, steps].hash
|
290
|
+
[auth_future_amount, auth_test_amount, auto_order_cancel_charge_minimum_balance, auto_order_cancel_item_id, auto_order_cancel_item_oid, auto_order_cancel_minimum_life_time_value, auto_order_cancel_minimum_rebill_value, auto_order_downgrade_items, auto_order_paused, auto_order_prohibit_expiring_cards, auto_order_schedules, auto_order_upgrade_items, auto_order_upsell, auto_order_upsell_no_easy_cancel, auto_order_upsell_one_per_customer, auto_orderable, cancel_other_auto_orders, free_shipping_auto_order, refund_other_auto_orders, steps].hash
|
261
291
|
end
|
262
292
|
|
263
293
|
# Builds the object from hash
|
@@ -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 OrderInvoiceResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# pdf_base64
|
22
|
+
attr_accessor :pdf_base64
|
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
|
+
:'pdf_base64' => :'pdfBase64',
|
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
|
+
:'pdf_base64' => :'String',
|
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?(:'pdfBase64')
|
68
|
+
self.pdf_base64 = attributes[:'pdfBase64']
|
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
|
+
pdf_base64 == o.pdf_base64 &&
|
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, pdf_base64, 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
@@ -578,6 +578,7 @@ require 'ultracart_api/models/order_fraud_score'
|
|
578
578
|
require 'ultracart_api/models/order_gift'
|
579
579
|
require 'ultracart_api/models/order_gift_certificate'
|
580
580
|
require 'ultracart_api/models/order_internal'
|
581
|
+
require 'ultracart_api/models/order_invoice_response'
|
581
582
|
require 'ultracart_api/models/order_item'
|
582
583
|
require 'ultracart_api/models/order_item_edi'
|
583
584
|
require 'ultracart_api/models/order_item_edi_identification'
|
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.106
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -796,6 +796,7 @@ files:
|
|
796
796
|
- docs/OrderGift.md
|
797
797
|
- docs/OrderGiftCertificate.md
|
798
798
|
- docs/OrderInternal.md
|
799
|
+
- docs/OrderInvoiceResponse.md
|
799
800
|
- docs/OrderItem.md
|
800
801
|
- docs/OrderItemEdi.md
|
801
802
|
- docs/OrderItemEdiIdentification.md
|
@@ -1557,6 +1558,7 @@ files:
|
|
1557
1558
|
- lib/ultracart_api/models/order_gift.rb
|
1558
1559
|
- lib/ultracart_api/models/order_gift_certificate.rb
|
1559
1560
|
- lib/ultracart_api/models/order_internal.rb
|
1561
|
+
- lib/ultracart_api/models/order_invoice_response.rb
|
1560
1562
|
- lib/ultracart_api/models/order_item.rb
|
1561
1563
|
- lib/ultracart_api/models/order_item_edi.rb
|
1562
1564
|
- lib/ultracart_api/models/order_item_edi_identification.rb
|