ultracart_api 3.10.208 → 3.10.209
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 +4 -4
- data/README.md +9 -4
- data/docs/ItemApi.md +46 -0
- data/docs/ItemInventorySnapshot.md +13 -0
- data/docs/ItemInventorySnapshotDistributionCenter.md +12 -0
- data/docs/ItemInventorySnapshotResponse.md +12 -0
- data/lib/ultracart_api/api/item_api.rb +49 -0
- data/lib/ultracart_api/models/item_inventory_snapshot.rb +231 -0
- data/lib/ultracart_api/models/item_inventory_snapshot_distribution_center.rb +220 -0
- data/lib/ultracart_api/models/item_inventory_snapshot_response.rb +224 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b76ad044aa117136b30964f557b3889005e269a45cc74c4a1372d062fead6e0
|
|
4
|
+
data.tar.gz: e24086efc12d2d4fef8af3e1cf3e52ef943b5d68247998eedf6c877ab508fc14
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a58cc26d10dd5e7fccd70bb9d82a408d35e1c65472c7d36499b2dd2596d0d31bb3a85a9721361db4794423099b9e8580aed0178271c4933070673b97f349d64b
|
|
7
|
+
data.tar.gz: 122063075f26f23f477ac114d8b6c5109126fccf13aa7f92629b4a91d1285ff5680163add16465acf1b2a1bd6bb3ce636c88bf45bbef87a5515ed024ef3e65d1
|
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.209
|
|
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.209.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.209.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.209'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -305,6 +305,7 @@ Class | Method | HTTP request | Description
|
|
|
305
305
|
*UltracartClient::ItemApi* | [**insert_item**](docs/ItemApi.md#insert_item) | **POST** /item/items | Create an item
|
|
306
306
|
*UltracartClient::ItemApi* | [**insert_review**](docs/ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review
|
|
307
307
|
*UltracartClient::ItemApi* | [**insert_update_item_content_attribute**](docs/ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute
|
|
308
|
+
*UltracartClient::ItemApi* | [**rest_item_inventory_snapshot_response**](docs/ItemApi.md#rest_item_inventory_snapshot_response) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories
|
|
308
309
|
*UltracartClient::ItemApi* | [**update_digital_item**](docs/ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library
|
|
309
310
|
*UltracartClient::ItemApi* | [**update_item**](docs/ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item
|
|
310
311
|
*UltracartClient::ItemApi* | [**update_items**](docs/ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items
|
|
@@ -1120,6 +1121,9 @@ Class | Method | HTTP request | Description
|
|
|
1120
1121
|
- [UltracartClient::ItemInstantPaymentNotification](docs/ItemInstantPaymentNotification.md)
|
|
1121
1122
|
- [UltracartClient::ItemInstantPaymentNotifications](docs/ItemInstantPaymentNotifications.md)
|
|
1122
1123
|
- [UltracartClient::ItemInternal](docs/ItemInternal.md)
|
|
1124
|
+
- [UltracartClient::ItemInventorySnapshot](docs/ItemInventorySnapshot.md)
|
|
1125
|
+
- [UltracartClient::ItemInventorySnapshotDistributionCenter](docs/ItemInventorySnapshotDistributionCenter.md)
|
|
1126
|
+
- [UltracartClient::ItemInventorySnapshotResponse](docs/ItemInventorySnapshotResponse.md)
|
|
1123
1127
|
- [UltracartClient::ItemKitComponent](docs/ItemKitComponent.md)
|
|
1124
1128
|
- [UltracartClient::ItemKitDefinition](docs/ItemKitDefinition.md)
|
|
1125
1129
|
- [UltracartClient::ItemOption](docs/ItemOption.md)
|
|
@@ -1505,6 +1509,7 @@ Not every change is committed to every SDK.
|
|
|
1505
1509
|
|
|
1506
1510
|
| Version | Date | Comments |
|
|
1507
1511
|
| --: | :-: | --- |
|
|
1512
|
+
| 3.10.209 | 05/31/2024 | ItemApi.getInventorySnapshot method |
|
|
1508
1513
|
| 3.10.208 | 05/30/2024 | add adult sig req. to the merchant item destination markup for items |
|
|
1509
1514
|
| 3.10.207 | 05/29/2024 | added methods getEmailCommseqRateLimiters, resetEmailCommseqRateLimiters |
|
|
1510
1515
|
| 3.10.206 | 05/28/2024 | added property to OrderQuery object to allow querying from cache |
|
data/docs/ItemApi.md
CHANGED
|
@@ -21,6 +21,7 @@ Method | HTTP request | Description
|
|
|
21
21
|
[**insert_item**](ItemApi.md#insert_item) | **POST** /item/items | Create an item
|
|
22
22
|
[**insert_review**](ItemApi.md#insert_review) | **POST** /item/items/{merchant_item_oid}/reviews | Insert a review
|
|
23
23
|
[**insert_update_item_content_attribute**](ItemApi.md#insert_update_item_content_attribute) | **POST** /item/items/{merchant_item_oid}/content/attributes | Upsert an item content attribute
|
|
24
|
+
[**rest_item_inventory_snapshot_response**](ItemApi.md#rest_item_inventory_snapshot_response) | **GET** /item/items/inventory_snapshot | Retrieve a list of item inventories
|
|
24
25
|
[**update_digital_item**](ItemApi.md#update_digital_item) | **PUT** /item/digital_library/{digital_item_oid} | Updates a file within the digital library
|
|
25
26
|
[**update_item**](ItemApi.md#update_item) | **PUT** /item/items/{merchant_item_oid} | Update an item
|
|
26
27
|
[**update_items**](ItemApi.md#update_items) | **PUT** /item/items/batch | Update multiple items
|
|
@@ -942,6 +943,51 @@ nil (empty response body)
|
|
|
942
943
|
|
|
943
944
|
|
|
944
945
|
|
|
946
|
+
# **rest_item_inventory_snapshot_response**
|
|
947
|
+
> ItemInventorySnapshotResponse rest_item_inventory_snapshot_response
|
|
948
|
+
|
|
949
|
+
Retrieve a list of item inventories
|
|
950
|
+
|
|
951
|
+
Retrieves a list of item inventories.
|
|
952
|
+
|
|
953
|
+
### Example
|
|
954
|
+
```ruby
|
|
955
|
+
# load the gem
|
|
956
|
+
require 'ultracart_api'
|
|
957
|
+
|
|
958
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
959
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
960
|
+
api_instance = UltracartClient::ItemApi.new_using_api_key(simple_key, false, false)
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
|
|
964
|
+
begin
|
|
965
|
+
#Retrieve a list of item inventories
|
|
966
|
+
result = api_instance.rest_item_inventory_snapshot_response
|
|
967
|
+
p result
|
|
968
|
+
rescue UltracartClient::ApiError => e
|
|
969
|
+
puts "Exception when calling ItemApi->rest_item_inventory_snapshot_response: #{e}"
|
|
970
|
+
end
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
### Parameters
|
|
974
|
+
This endpoint does not need any parameter.
|
|
975
|
+
|
|
976
|
+
### Return type
|
|
977
|
+
|
|
978
|
+
[**ItemInventorySnapshotResponse**](ItemInventorySnapshotResponse.md)
|
|
979
|
+
|
|
980
|
+
### Authorization
|
|
981
|
+
|
|
982
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
983
|
+
|
|
984
|
+
### HTTP request headers
|
|
985
|
+
|
|
986
|
+
- **Content-Type**: application/json
|
|
987
|
+
- **Accept**: application/json
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
|
|
945
991
|
# **update_digital_item**
|
|
946
992
|
> ItemDigitalItemResponse update_digital_item(digital_item_oid, digital_item)
|
|
947
993
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# UltracartClient::ItemInventorySnapshot
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**allocated_to_placed_orders** | **Integer** | | [optional]
|
|
7
|
+
**allocated_to_shopping_carts** | **Integer** | | [optional]
|
|
8
|
+
**available_to_allocate** | **Integer** | | [optional]
|
|
9
|
+
**distribution_centers** | [**Array<ItemInventorySnapshotDistributionCenter>**](ItemInventorySnapshotDistributionCenter.md) | | [optional]
|
|
10
|
+
**merchant_item_id** | **String** | | [optional]
|
|
11
|
+
**quantity** | **Integer** | | [optional]
|
|
12
|
+
|
|
13
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ItemInventorySnapshotDistributionCenter
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**allocated_to_placed_orders** | **Integer** | | [optional]
|
|
7
|
+
**allocated_to_shopping_carts** | **Integer** | | [optional]
|
|
8
|
+
**available_to_allocate** | **Integer** | | [optional]
|
|
9
|
+
**code** | **String** | | [optional]
|
|
10
|
+
**quantity** | **Integer** | | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ItemInventorySnapshotResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
|
7
|
+
**inventories** | [**Array<ItemInventorySnapshot>**](ItemInventorySnapshot.md) | inventories | [optional]
|
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
|
|
@@ -1044,6 +1044,55 @@ module UltracartClient
|
|
|
1044
1044
|
end
|
|
1045
1045
|
return data, status_code, headers
|
|
1046
1046
|
end
|
|
1047
|
+
# Retrieve a list of item inventories
|
|
1048
|
+
# Retrieves a list of item inventories.
|
|
1049
|
+
# @param [Hash] opts the optional parameters
|
|
1050
|
+
# @return [ItemInventorySnapshotResponse]
|
|
1051
|
+
def rest_item_inventory_snapshot_response(opts = {})
|
|
1052
|
+
data, _status_code, _headers = rest_item_inventory_snapshot_response_with_http_info(opts)
|
|
1053
|
+
data
|
|
1054
|
+
end
|
|
1055
|
+
|
|
1056
|
+
# Retrieve a list of item inventories
|
|
1057
|
+
# Retrieves a list of item inventories.
|
|
1058
|
+
# @param [Hash] opts the optional parameters
|
|
1059
|
+
# @return [Array<(ItemInventorySnapshotResponse, Fixnum, Hash)>] ItemInventorySnapshotResponse data, response status code and response headers
|
|
1060
|
+
def rest_item_inventory_snapshot_response_with_http_info(opts = {})
|
|
1061
|
+
if @api_client.config.debugging
|
|
1062
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.rest_item_inventory_snapshot_response ...'
|
|
1063
|
+
end
|
|
1064
|
+
# resource path
|
|
1065
|
+
local_var_path = '/item/items/inventory_snapshot'
|
|
1066
|
+
|
|
1067
|
+
# query parameters
|
|
1068
|
+
query_params = {}
|
|
1069
|
+
|
|
1070
|
+
# header parameters
|
|
1071
|
+
header_params = {}
|
|
1072
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1073
|
+
# HTTP header 'Accept' (if needed)
|
|
1074
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1075
|
+
# HTTP header 'Content-Type'
|
|
1076
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
1077
|
+
|
|
1078
|
+
# form parameters
|
|
1079
|
+
form_params = {}
|
|
1080
|
+
|
|
1081
|
+
# http body (model)
|
|
1082
|
+
post_body = nil
|
|
1083
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1084
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
1085
|
+
:header_params => header_params,
|
|
1086
|
+
:query_params => query_params,
|
|
1087
|
+
:form_params => form_params,
|
|
1088
|
+
:body => post_body,
|
|
1089
|
+
:auth_names => auth_names,
|
|
1090
|
+
:return_type => 'ItemInventorySnapshotResponse')
|
|
1091
|
+
if @api_client.config.debugging
|
|
1092
|
+
@api_client.config.logger.debug "API called: ItemApi#rest_item_inventory_snapshot_response\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1093
|
+
end
|
|
1094
|
+
return data, status_code, headers
|
|
1095
|
+
end
|
|
1047
1096
|
# Updates a file within the digital library
|
|
1048
1097
|
# Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
|
1049
1098
|
# @param digital_item_oid The digital item oid to update.
|
|
@@ -0,0 +1,231 @@
|
|
|
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 ItemInventorySnapshot
|
|
17
|
+
attr_accessor :allocated_to_placed_orders
|
|
18
|
+
|
|
19
|
+
attr_accessor :allocated_to_shopping_carts
|
|
20
|
+
|
|
21
|
+
attr_accessor :available_to_allocate
|
|
22
|
+
|
|
23
|
+
attr_accessor :distribution_centers
|
|
24
|
+
|
|
25
|
+
attr_accessor :merchant_item_id
|
|
26
|
+
|
|
27
|
+
attr_accessor :quantity
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'allocated_to_placed_orders' => :'allocated_to_placed_orders',
|
|
33
|
+
:'allocated_to_shopping_carts' => :'allocated_to_shopping_carts',
|
|
34
|
+
:'available_to_allocate' => :'available_to_allocate',
|
|
35
|
+
:'distribution_centers' => :'distribution_centers',
|
|
36
|
+
:'merchant_item_id' => :'merchant_item_id',
|
|
37
|
+
:'quantity' => :'quantity'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.swagger_types
|
|
43
|
+
{
|
|
44
|
+
:'allocated_to_placed_orders' => :'Integer',
|
|
45
|
+
:'allocated_to_shopping_carts' => :'Integer',
|
|
46
|
+
:'available_to_allocate' => :'Integer',
|
|
47
|
+
:'distribution_centers' => :'Array<ItemInventorySnapshotDistributionCenter>',
|
|
48
|
+
:'merchant_item_id' => :'String',
|
|
49
|
+
:'quantity' => :'Integer'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
return unless attributes.is_a?(Hash)
|
|
57
|
+
|
|
58
|
+
# convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
60
|
+
|
|
61
|
+
if attributes.has_key?(:'allocated_to_placed_orders')
|
|
62
|
+
self.allocated_to_placed_orders = attributes[:'allocated_to_placed_orders']
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
if attributes.has_key?(:'allocated_to_shopping_carts')
|
|
66
|
+
self.allocated_to_shopping_carts = attributes[:'allocated_to_shopping_carts']
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.has_key?(:'available_to_allocate')
|
|
70
|
+
self.available_to_allocate = attributes[:'available_to_allocate']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.has_key?(:'distribution_centers')
|
|
74
|
+
if (value = attributes[:'distribution_centers']).is_a?(Array)
|
|
75
|
+
self.distribution_centers = value
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.has_key?(:'merchant_item_id')
|
|
80
|
+
self.merchant_item_id = attributes[:'merchant_item_id']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.has_key?(:'quantity')
|
|
84
|
+
self.quantity = attributes[:'quantity']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
invalid_properties = Array.new
|
|
92
|
+
invalid_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Check to see if the all the properties in the model are valid
|
|
96
|
+
# @return true if the model is valid
|
|
97
|
+
def valid?
|
|
98
|
+
true
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Checks equality by comparing each attribute.
|
|
102
|
+
# @param [Object] Object to be compared
|
|
103
|
+
def ==(o)
|
|
104
|
+
return true if self.equal?(o)
|
|
105
|
+
self.class == o.class &&
|
|
106
|
+
allocated_to_placed_orders == o.allocated_to_placed_orders &&
|
|
107
|
+
allocated_to_shopping_carts == o.allocated_to_shopping_carts &&
|
|
108
|
+
available_to_allocate == o.available_to_allocate &&
|
|
109
|
+
distribution_centers == o.distribution_centers &&
|
|
110
|
+
merchant_item_id == o.merchant_item_id &&
|
|
111
|
+
quantity == o.quantity
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# @see the `==` method
|
|
115
|
+
# @param [Object] Object to be compared
|
|
116
|
+
def eql?(o)
|
|
117
|
+
self == o
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
# Calculates hash code according to all attributes.
|
|
121
|
+
# @return [Fixnum] Hash code
|
|
122
|
+
def hash
|
|
123
|
+
[allocated_to_placed_orders, allocated_to_shopping_carts, available_to_allocate, distribution_centers, merchant_item_id, quantity].hash
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
140
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
self
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def _deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :DateTime
|
|
153
|
+
DateTime.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :BOOLEAN
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
temp_model = UltracartClient.const_get(type).new
|
|
184
|
+
temp_model.build_from_hash(value)
|
|
185
|
+
end
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the string representation of the object
|
|
189
|
+
# @return [String] String presentation of the object
|
|
190
|
+
def to_s
|
|
191
|
+
to_hash.to_s
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_body
|
|
197
|
+
to_hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Returns the object in the form of hash
|
|
201
|
+
# @return [Hash] Returns the object in the form of hash
|
|
202
|
+
def to_hash
|
|
203
|
+
hash = {}
|
|
204
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
205
|
+
value = self.send(attr)
|
|
206
|
+
next if value.nil?
|
|
207
|
+
hash[param] = _to_hash(value)
|
|
208
|
+
end
|
|
209
|
+
hash
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Outputs non-array value in the form of hash
|
|
213
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
214
|
+
# @param [Object] value Any valid value
|
|
215
|
+
# @return [Hash] Returns the value in the form of hash
|
|
216
|
+
def _to_hash(value)
|
|
217
|
+
if value.is_a?(Array)
|
|
218
|
+
value.compact.map { |v| _to_hash(v) }
|
|
219
|
+
elsif value.is_a?(Hash)
|
|
220
|
+
{}.tap do |hash|
|
|
221
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
222
|
+
end
|
|
223
|
+
elsif value.respond_to? :to_hash
|
|
224
|
+
value.to_hash
|
|
225
|
+
else
|
|
226
|
+
value
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
231
|
+
end
|
|
@@ -0,0 +1,220 @@
|
|
|
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 ItemInventorySnapshotDistributionCenter
|
|
17
|
+
attr_accessor :allocated_to_placed_orders
|
|
18
|
+
|
|
19
|
+
attr_accessor :allocated_to_shopping_carts
|
|
20
|
+
|
|
21
|
+
attr_accessor :available_to_allocate
|
|
22
|
+
|
|
23
|
+
attr_accessor :code
|
|
24
|
+
|
|
25
|
+
attr_accessor :quantity
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'allocated_to_placed_orders' => :'allocated_to_placed_orders',
|
|
31
|
+
:'allocated_to_shopping_carts' => :'allocated_to_shopping_carts',
|
|
32
|
+
:'available_to_allocate' => :'available_to_allocate',
|
|
33
|
+
:'code' => :'code',
|
|
34
|
+
:'quantity' => :'quantity'
|
|
35
|
+
}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.swagger_types
|
|
40
|
+
{
|
|
41
|
+
:'allocated_to_placed_orders' => :'Integer',
|
|
42
|
+
:'allocated_to_shopping_carts' => :'Integer',
|
|
43
|
+
:'available_to_allocate' => :'Integer',
|
|
44
|
+
:'code' => :'String',
|
|
45
|
+
:'quantity' => :'Integer'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Initializes the object
|
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
51
|
+
def initialize(attributes = {})
|
|
52
|
+
return unless attributes.is_a?(Hash)
|
|
53
|
+
|
|
54
|
+
# convert string to symbol for hash key
|
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
56
|
+
|
|
57
|
+
if attributes.has_key?(:'allocated_to_placed_orders')
|
|
58
|
+
self.allocated_to_placed_orders = attributes[:'allocated_to_placed_orders']
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if attributes.has_key?(:'allocated_to_shopping_carts')
|
|
62
|
+
self.allocated_to_shopping_carts = attributes[:'allocated_to_shopping_carts']
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
if attributes.has_key?(:'available_to_allocate')
|
|
66
|
+
self.available_to_allocate = attributes[:'available_to_allocate']
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.has_key?(:'code')
|
|
70
|
+
self.code = attributes[:'code']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.has_key?(:'quantity')
|
|
74
|
+
self.quantity = attributes[:'quantity']
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
79
|
+
# @return Array for valid properties with the reasons
|
|
80
|
+
def list_invalid_properties
|
|
81
|
+
invalid_properties = Array.new
|
|
82
|
+
invalid_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Check to see if the all the properties in the model are valid
|
|
86
|
+
# @return true if the model is valid
|
|
87
|
+
def valid?
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Checks equality by comparing each attribute.
|
|
92
|
+
# @param [Object] Object to be compared
|
|
93
|
+
def ==(o)
|
|
94
|
+
return true if self.equal?(o)
|
|
95
|
+
self.class == o.class &&
|
|
96
|
+
allocated_to_placed_orders == o.allocated_to_placed_orders &&
|
|
97
|
+
allocated_to_shopping_carts == o.allocated_to_shopping_carts &&
|
|
98
|
+
available_to_allocate == o.available_to_allocate &&
|
|
99
|
+
code == o.code &&
|
|
100
|
+
quantity == o.quantity
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Fixnum] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[allocated_to_placed_orders, allocated_to_shopping_carts, available_to_allocate, code, quantity].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
121
|
+
if type =~ /\AArray<(.*)>/i
|
|
122
|
+
# check to ensure the input is an array given that the attribute
|
|
123
|
+
# is documented as an array but the input is not
|
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
126
|
+
end
|
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
129
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
self
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Deserializes the data based on type
|
|
136
|
+
# @param string type Data type
|
|
137
|
+
# @param string value Value to be deserialized
|
|
138
|
+
# @return [Object] Deserialized data
|
|
139
|
+
def _deserialize(type, value)
|
|
140
|
+
case type.to_sym
|
|
141
|
+
when :DateTime
|
|
142
|
+
DateTime.parse(value)
|
|
143
|
+
when :Date
|
|
144
|
+
Date.parse(value)
|
|
145
|
+
when :String
|
|
146
|
+
value.to_s
|
|
147
|
+
when :Integer
|
|
148
|
+
value.to_i
|
|
149
|
+
when :Float
|
|
150
|
+
value.to_f
|
|
151
|
+
when :BOOLEAN
|
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
153
|
+
true
|
|
154
|
+
else
|
|
155
|
+
false
|
|
156
|
+
end
|
|
157
|
+
when :Object
|
|
158
|
+
# generic object (usually a Hash), return directly
|
|
159
|
+
value
|
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each do |k, v|
|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
else # model
|
|
172
|
+
temp_model = UltracartClient.const_get(type).new
|
|
173
|
+
temp_model.build_from_hash(value)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_body
|
|
186
|
+
to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the object in the form of hash
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_hash
|
|
192
|
+
hash = {}
|
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
next if value.nil?
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Outputs non-array value in the form of hash
|
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
+
# @param [Object] value Any valid value
|
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
|
205
|
+
def _to_hash(value)
|
|
206
|
+
if value.is_a?(Array)
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
208
|
+
elsif value.is_a?(Hash)
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
+
end
|
|
212
|
+
elsif value.respond_to? :to_hash
|
|
213
|
+
value.to_hash
|
|
214
|
+
else
|
|
215
|
+
value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
end
|
|
@@ -0,0 +1,224 @@
|
|
|
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 ItemInventorySnapshotResponse
|
|
17
|
+
attr_accessor :error
|
|
18
|
+
|
|
19
|
+
# inventories
|
|
20
|
+
attr_accessor :inventories
|
|
21
|
+
|
|
22
|
+
attr_accessor :metadata
|
|
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
|
+
:'inventories' => :'inventories',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'success' => :'success',
|
|
36
|
+
:'warning' => :'warning'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.swagger_types
|
|
42
|
+
{
|
|
43
|
+
:'error' => :'Error',
|
|
44
|
+
:'inventories' => :'Array<ItemInventorySnapshot>',
|
|
45
|
+
:'metadata' => :'ResponseMetadata',
|
|
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?(:'inventories')
|
|
64
|
+
if (value = attributes[:'inventories']).is_a?(Array)
|
|
65
|
+
self.inventories = value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
if attributes.has_key?(:'metadata')
|
|
70
|
+
self.metadata = attributes[:'metadata']
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.has_key?(:'success')
|
|
74
|
+
self.success = attributes[:'success']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.has_key?(:'warning')
|
|
78
|
+
self.warning = attributes[:'warning']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
invalid_properties = Array.new
|
|
86
|
+
invalid_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Check to see if the all the properties in the model are valid
|
|
90
|
+
# @return true if the model is valid
|
|
91
|
+
def valid?
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
error == o.error &&
|
|
101
|
+
inventories == o.inventories &&
|
|
102
|
+
metadata == o.metadata &&
|
|
103
|
+
success == o.success &&
|
|
104
|
+
warning == o.warning
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Fixnum] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[error, inventories, metadata, success, warning].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def build_from_hash(attributes)
|
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
|
124
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :DateTime
|
|
146
|
+
DateTime.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :BOOLEAN
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
temp_model = UltracartClient.const_get(type).new
|
|
177
|
+
temp_model.build_from_hash(value)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
# Returns the string representation of the object
|
|
182
|
+
# @return [String] String presentation of the object
|
|
183
|
+
def to_s
|
|
184
|
+
to_hash.to_s
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
|
189
|
+
def to_body
|
|
190
|
+
to_hash
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# Returns the object in the form of hash
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_hash
|
|
196
|
+
hash = {}
|
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
198
|
+
value = self.send(attr)
|
|
199
|
+
next if value.nil?
|
|
200
|
+
hash[param] = _to_hash(value)
|
|
201
|
+
end
|
|
202
|
+
hash
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Outputs non-array value in the form of hash
|
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
207
|
+
# @param [Object] value Any valid value
|
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
|
209
|
+
def _to_hash(value)
|
|
210
|
+
if value.is_a?(Array)
|
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
|
212
|
+
elsif value.is_a?(Hash)
|
|
213
|
+
{}.tap do |hash|
|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
215
|
+
end
|
|
216
|
+
elsif value.respond_to? :to_hash
|
|
217
|
+
value.to_hash
|
|
218
|
+
else
|
|
219
|
+
value
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
end
|
|
224
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -555,6 +555,9 @@ require 'ultracart_api/models/item_identifiers'
|
|
|
555
555
|
require 'ultracart_api/models/item_instant_payment_notification'
|
|
556
556
|
require 'ultracart_api/models/item_instant_payment_notifications'
|
|
557
557
|
require 'ultracart_api/models/item_internal'
|
|
558
|
+
require 'ultracart_api/models/item_inventory_snapshot'
|
|
559
|
+
require 'ultracart_api/models/item_inventory_snapshot_distribution_center'
|
|
560
|
+
require 'ultracart_api/models/item_inventory_snapshot_response'
|
|
558
561
|
require 'ultracart_api/models/item_kit_component'
|
|
559
562
|
require 'ultracart_api/models/item_kit_definition'
|
|
560
563
|
require 'ultracart_api/models/item_option'
|
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.209
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-05-
|
|
11
|
+
date: 2024-05-31 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -772,6 +772,9 @@ files:
|
|
|
772
772
|
- docs/ItemInstantPaymentNotification.md
|
|
773
773
|
- docs/ItemInstantPaymentNotifications.md
|
|
774
774
|
- docs/ItemInternal.md
|
|
775
|
+
- docs/ItemInventorySnapshot.md
|
|
776
|
+
- docs/ItemInventorySnapshotDistributionCenter.md
|
|
777
|
+
- docs/ItemInventorySnapshotResponse.md
|
|
775
778
|
- docs/ItemKitComponent.md
|
|
776
779
|
- docs/ItemKitDefinition.md
|
|
777
780
|
- docs/ItemOption.md
|
|
@@ -1657,6 +1660,9 @@ files:
|
|
|
1657
1660
|
- lib/ultracart_api/models/item_instant_payment_notification.rb
|
|
1658
1661
|
- lib/ultracart_api/models/item_instant_payment_notifications.rb
|
|
1659
1662
|
- lib/ultracart_api/models/item_internal.rb
|
|
1663
|
+
- lib/ultracart_api/models/item_inventory_snapshot.rb
|
|
1664
|
+
- lib/ultracart_api/models/item_inventory_snapshot_distribution_center.rb
|
|
1665
|
+
- lib/ultracart_api/models/item_inventory_snapshot_response.rb
|
|
1660
1666
|
- lib/ultracart_api/models/item_kit_component.rb
|
|
1661
1667
|
- lib/ultracart_api/models/item_kit_definition.rb
|
|
1662
1668
|
- lib/ultracart_api/models/item_option.rb
|