ultracart_api 3.10.105 → 3.10.107
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/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/conversation_websocket_message.rb +2 -2
- 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: 130268d511ad22379720f02fb133c558aa541ea73e20b48ae2d580c1158aa64e
|
4
|
+
data.tar.gz: 72836a174a56c8ef9821fba0fab3ada259e5d8bc5a81eb86fe21c2a7fb6f7308
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4b24eed59fbe9c7b0d558659586b0e62fa89d2de93d1557ea4da105f44f68a414c2fd0291188b17886cbe6d3e850528397c20135ca22b5365d9a6cd0553e1f2
|
7
|
+
data.tar.gz: 62daec3bb5a02d0ef824e83f9309b5ba3068208dbe80471a1ad223939a5f8755ab2b3856663375ea794180b8da59b1b881d5643f5e943d8fb72d3fe3292a0c00
|
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.107
|
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.107.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.107.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.107'
|
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.107 | 01/25/2023 | convo event for engage customer |
|
1296
|
+
| 3.10.106 | 01/25/2023 | order api method generateInvoice |
|
1293
1297
|
| 3.10.105 | 01/24/2023 | auto order - cancel minimum and change balance options |
|
1294
1298
|
| 3.10.104 | 01/23/2023 | conversation - method to fetch single engagement record |
|
1295
1299
|
| 3.10.103 | 01/19/2023 | added skip_on_rebill field to coupon object |
|
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.
|
@@ -238,7 +238,7 @@ module UltracartClient
|
|
238
238
|
# Check to see if the all the properties in the model are valid
|
239
239
|
# @return true if the model is valid
|
240
240
|
def valid?
|
241
|
-
event_type_validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'participant join', 'participant
|
241
|
+
event_type_validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'participant join', 'participant leave', 'read message', 'typing', 'add coupon', 'add item', 'webchat context', 'engage customer'])
|
242
242
|
return false unless event_type_validator.valid?(@event_type)
|
243
243
|
type_validator = EnumAttributeValidator.new('String', ['message', 'event', 'ping', 'check queue position'])
|
244
244
|
return false unless type_validator.valid?(@type)
|
@@ -248,7 +248,7 @@ module UltracartClient
|
|
248
248
|
# Custom attribute writer method checking allowed values (enum).
|
249
249
|
# @param [Object] event_type Object to be assigned
|
250
250
|
def event_type=(event_type)
|
251
|
-
validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'participant join', 'participant
|
251
|
+
validator = EnumAttributeValidator.new('String', ['queue position', 'webchat start conversation', 'conversation closed', 'new conversation', 'new message', 'updated message', 'queue status update', 'rrweb', 'participant update', 'participant join', 'participant leave', 'read message', 'typing', 'add coupon', 'add item', 'webchat context', 'engage customer'])
|
252
252
|
unless validator.valid?(event_type)
|
253
253
|
fail ArgumentError, 'invalid value for "event_type", must be one of #{validator.allowable_values}.'
|
254
254
|
end
|
@@ -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.107
|
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
|