ultracart_api 3.6.15 → 3.6.19
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/Item.md +1 -0
- data/docs/ItemCheckout.md +1 -0
- data/docs/ItemContent.md +1 -0
- data/docs/ItemFulfillmentAddon.md +11 -0
- data/lib/ultracart_api/models/item.rb +13 -1
- data/lib/ultracart_api/models/item_checkout.rb +11 -1
- data/lib/ultracart_api/models/item_content.rb +11 -1
- data/lib/ultracart_api/models/item_fulfillment_addon.rb +215 -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: e780308fdcb7b1900c2c5b51dc4d4562daee3e43110446d9f2558d7a0f9b5fae
|
4
|
+
data.tar.gz: 1d7f977ff69f64aeb769218b5ad1db3d9afb1770c5b53a62561496bcfe9cbb6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19f157ea633b68093336b4f391c92309cd42669c8dc569b9be627e678fd70d8872869851fce24c048c8493e08c20b579393b193ba7aaa5d8e398a8332aa45346
|
7
|
+
data.tar.gz: a90a546f713519ebee3848ab17a23ea308eb6a3e7a7cf8ce029108a657549e6a9270bd1e11a64194967bf663edca2ccb19e75492479d972b585966dac00803a2
|
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.6.
|
10
|
+
- Package version: 3.6.19
|
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.6.
|
27
|
+
gem install ./ultracart_api-3.6.19.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.6.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.6.19.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.6.
|
35
|
+
gem 'ultracart_api', '~> 3.6.19'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -772,6 +772,7 @@ Class | Method | HTTP request | Description
|
|
772
772
|
- [UltracartClient::ItemEbayMarketPlaceAnalysis](docs/ItemEbayMarketPlaceAnalysis.md)
|
773
773
|
- [UltracartClient::ItemEmailNotifications](docs/ItemEmailNotifications.md)
|
774
774
|
- [UltracartClient::ItemEnrollment123](docs/ItemEnrollment123.md)
|
775
|
+
- [UltracartClient::ItemFulfillmentAddon](docs/ItemFulfillmentAddon.md)
|
775
776
|
- [UltracartClient::ItemGiftCertificate](docs/ItemGiftCertificate.md)
|
776
777
|
- [UltracartClient::ItemGoogleProductSearch](docs/ItemGoogleProductSearch.md)
|
777
778
|
- [UltracartClient::ItemIdentifiers](docs/ItemIdentifiers.md)
|
@@ -1118,6 +1119,9 @@ Not every change is committed to every SDK.
|
|
1118
1119
|
|
1119
1120
|
| Version | Date | Comments |
|
1120
1121
|
| --: | :-: | --- |
|
1122
|
+
| 3.6.19 | 10/05/2021 | item fulfillment add ons |
|
1123
|
+
| 3.6.18 | 09/30/2021 | terms if auto order flag added |
|
1124
|
+
| 3.6.16 | 09/30/2021 | item exclude from sitemap field |
|
1121
1125
|
| 3.6.15 | 09/28/2021 | added refund_claim_id to insurance object |
|
1122
1126
|
| 3.6.14 | 09/21/2021 | configuration api fix. the echeck test methods were attached to the paper check object |
|
1123
1127
|
| 3.6.13 | 09/20/2021 | expose EasyPost tracker id if available on shipment tracking details |
|
data/docs/Item.md
CHANGED
@@ -18,6 +18,7 @@ Name | Type | Description | Notes
|
|
18
18
|
**ebay** | [**ItemEbay**](ItemEbay.md) | | [optional]
|
19
19
|
**email_notifications** | [**ItemEmailNotifications**](ItemEmailNotifications.md) | | [optional]
|
20
20
|
**enrollment123** | [**ItemEnrollment123**](ItemEnrollment123.md) | | [optional]
|
21
|
+
**fulfillment_addons** | [**Array<ItemFulfillmentAddon>**](ItemFulfillmentAddon.md) | Fulfillment Add-ons | [optional]
|
21
22
|
**gift_certificate** | [**ItemGiftCertificate**](ItemGiftCertificate.md) | | [optional]
|
22
23
|
**google_product_search** | [**ItemGoogleProductSearch**](ItemGoogleProductSearch.md) | | [optional]
|
23
24
|
**identifiers** | [**ItemIdentifiers**](ItemIdentifiers.md) | | [optional]
|
data/docs/ItemCheckout.md
CHANGED
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**suppress_buysafe** | **BOOLEAN** | True to suppress buySAFE (deprecated) | [optional]
|
7
7
|
**terms** | **String** | Terms for purchasing this item | [optional]
|
8
|
+
**terms_if_auto_order** | **BOOLEAN** | Terms only apply if the item is on auto order | [optional]
|
8
9
|
**terms_translated_text_instance_oid** | **Integer** | Terms translated text instance identifier | [optional]
|
9
10
|
|
10
11
|
|
data/docs/ItemContent.md
CHANGED
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
|
|
7
7
|
**attributes** | [**Array<ItemContentAttribute>**](ItemContentAttribute.md) | StoreFront attributes | [optional]
|
8
8
|
**custom_thank_you_url** | **String** | Custom Thank You URL | [optional]
|
9
9
|
**exclude_from_search** | **BOOLEAN** | Exclude from search | [optional]
|
10
|
+
**exclude_from_sitemap** | **BOOLEAN** | Exclude from the sitemap for the StoreFront | [optional]
|
10
11
|
**exclude_from_top_sellers** | **BOOLEAN** | Exclude from the top sellers list in the StoreFront | [optional]
|
11
12
|
**extended_description** | **String** | Extended description (max 10000 characters) | [optional]
|
12
13
|
**extended_description_translated_text_instance_oid** | **Integer** | Extneded description text translation instance identifier | [optional]
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# UltracartClient::ItemFulfillmentAddon
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**add_item_id** | **String** | Add Item Id | [optional]
|
7
|
+
**add_item_oid** | **Integer** | Add Item object identifier | [optional]
|
8
|
+
**once_per_order** | **BOOLEAN** | Quantity | [optional]
|
9
|
+
**quantity** | **Integer** | Quantity | [optional]
|
10
|
+
|
11
|
+
|
@@ -48,6 +48,9 @@ module UltracartClient
|
|
48
48
|
|
49
49
|
attr_accessor :enrollment123
|
50
50
|
|
51
|
+
# Fulfillment Add-ons
|
52
|
+
attr_accessor :fulfillment_addons
|
53
|
+
|
51
54
|
attr_accessor :gift_certificate
|
52
55
|
|
53
56
|
attr_accessor :google_product_search
|
@@ -151,6 +154,7 @@ module UltracartClient
|
|
151
154
|
:'ebay' => :'ebay',
|
152
155
|
:'email_notifications' => :'email_notifications',
|
153
156
|
:'enrollment123' => :'enrollment123',
|
157
|
+
:'fulfillment_addons' => :'fulfillment_addons',
|
154
158
|
:'gift_certificate' => :'gift_certificate',
|
155
159
|
:'google_product_search' => :'google_product_search',
|
156
160
|
:'identifiers' => :'identifiers',
|
@@ -207,6 +211,7 @@ module UltracartClient
|
|
207
211
|
:'ebay' => :'ItemEbay',
|
208
212
|
:'email_notifications' => :'ItemEmailNotifications',
|
209
213
|
:'enrollment123' => :'ItemEnrollment123',
|
214
|
+
:'fulfillment_addons' => :'Array<ItemFulfillmentAddon>',
|
210
215
|
:'gift_certificate' => :'ItemGiftCertificate',
|
211
216
|
:'google_product_search' => :'ItemGoogleProductSearch',
|
212
217
|
:'identifiers' => :'ItemIdentifiers',
|
@@ -315,6 +320,12 @@ module UltracartClient
|
|
315
320
|
self.enrollment123 = attributes[:'enrollment123']
|
316
321
|
end
|
317
322
|
|
323
|
+
if attributes.has_key?(:'fulfillment_addons')
|
324
|
+
if (value = attributes[:'fulfillment_addons']).is_a?(Array)
|
325
|
+
self.fulfillment_addons = value
|
326
|
+
end
|
327
|
+
end
|
328
|
+
|
318
329
|
if attributes.has_key?(:'gift_certificate')
|
319
330
|
self.gift_certificate = attributes[:'gift_certificate']
|
320
331
|
end
|
@@ -544,6 +555,7 @@ module UltracartClient
|
|
544
555
|
ebay == o.ebay &&
|
545
556
|
email_notifications == o.email_notifications &&
|
546
557
|
enrollment123 == o.enrollment123 &&
|
558
|
+
fulfillment_addons == o.fulfillment_addons &&
|
547
559
|
gift_certificate == o.gift_certificate &&
|
548
560
|
google_product_search == o.google_product_search &&
|
549
561
|
identifiers == o.identifiers &&
|
@@ -590,7 +602,7 @@ module UltracartClient
|
|
590
602
|
# Calculates hash code according to all attributes.
|
591
603
|
# @return [Fixnum] Hash code
|
592
604
|
def hash
|
593
|
-
[accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
|
605
|
+
[accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, fulfillment_addons, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
|
594
606
|
end
|
595
607
|
|
596
608
|
# Builds the object from hash
|
@@ -20,6 +20,9 @@ module UltracartClient
|
|
20
20
|
# Terms for purchasing this item
|
21
21
|
attr_accessor :terms
|
22
22
|
|
23
|
+
# Terms only apply if the item is on auto order
|
24
|
+
attr_accessor :terms_if_auto_order
|
25
|
+
|
23
26
|
# Terms translated text instance identifier
|
24
27
|
attr_accessor :terms_translated_text_instance_oid
|
25
28
|
|
@@ -28,6 +31,7 @@ module UltracartClient
|
|
28
31
|
{
|
29
32
|
:'suppress_buysafe' => :'suppress_buysafe',
|
30
33
|
:'terms' => :'terms',
|
34
|
+
:'terms_if_auto_order' => :'terms_if_auto_order',
|
31
35
|
:'terms_translated_text_instance_oid' => :'terms_translated_text_instance_oid'
|
32
36
|
}
|
33
37
|
end
|
@@ -37,6 +41,7 @@ module UltracartClient
|
|
37
41
|
{
|
38
42
|
:'suppress_buysafe' => :'BOOLEAN',
|
39
43
|
:'terms' => :'String',
|
44
|
+
:'terms_if_auto_order' => :'BOOLEAN',
|
40
45
|
:'terms_translated_text_instance_oid' => :'Integer'
|
41
46
|
}
|
42
47
|
end
|
@@ -57,6 +62,10 @@ module UltracartClient
|
|
57
62
|
self.terms = attributes[:'terms']
|
58
63
|
end
|
59
64
|
|
65
|
+
if attributes.has_key?(:'terms_if_auto_order')
|
66
|
+
self.terms_if_auto_order = attributes[:'terms_if_auto_order']
|
67
|
+
end
|
68
|
+
|
60
69
|
if attributes.has_key?(:'terms_translated_text_instance_oid')
|
61
70
|
self.terms_translated_text_instance_oid = attributes[:'terms_translated_text_instance_oid']
|
62
71
|
end
|
@@ -97,6 +106,7 @@ module UltracartClient
|
|
97
106
|
self.class == o.class &&
|
98
107
|
suppress_buysafe == o.suppress_buysafe &&
|
99
108
|
terms == o.terms &&
|
109
|
+
terms_if_auto_order == o.terms_if_auto_order &&
|
100
110
|
terms_translated_text_instance_oid == o.terms_translated_text_instance_oid
|
101
111
|
end
|
102
112
|
|
@@ -109,7 +119,7 @@ module UltracartClient
|
|
109
119
|
# Calculates hash code according to all attributes.
|
110
120
|
# @return [Fixnum] Hash code
|
111
121
|
def hash
|
112
|
-
[suppress_buysafe, terms, terms_translated_text_instance_oid].hash
|
122
|
+
[suppress_buysafe, terms, terms_if_auto_order, terms_translated_text_instance_oid].hash
|
113
123
|
end
|
114
124
|
|
115
125
|
# Builds the object from hash
|
@@ -26,6 +26,9 @@ module UltracartClient
|
|
26
26
|
# Exclude from search
|
27
27
|
attr_accessor :exclude_from_search
|
28
28
|
|
29
|
+
# Exclude from the sitemap for the StoreFront
|
30
|
+
attr_accessor :exclude_from_sitemap
|
31
|
+
|
29
32
|
# Exclude from the top sellers list in the StoreFront
|
30
33
|
attr_accessor :exclude_from_top_sellers
|
31
34
|
|
@@ -57,6 +60,7 @@ module UltracartClient
|
|
57
60
|
:'attributes' => :'attributes',
|
58
61
|
:'custom_thank_you_url' => :'custom_thank_you_url',
|
59
62
|
:'exclude_from_search' => :'exclude_from_search',
|
63
|
+
:'exclude_from_sitemap' => :'exclude_from_sitemap',
|
60
64
|
:'exclude_from_top_sellers' => :'exclude_from_top_sellers',
|
61
65
|
:'extended_description' => :'extended_description',
|
62
66
|
:'extended_description_translated_text_instance_oid' => :'extended_description_translated_text_instance_oid',
|
@@ -75,6 +79,7 @@ module UltracartClient
|
|
75
79
|
:'attributes' => :'Array<ItemContentAttribute>',
|
76
80
|
:'custom_thank_you_url' => :'String',
|
77
81
|
:'exclude_from_search' => :'BOOLEAN',
|
82
|
+
:'exclude_from_sitemap' => :'BOOLEAN',
|
78
83
|
:'exclude_from_top_sellers' => :'BOOLEAN',
|
79
84
|
:'extended_description' => :'String',
|
80
85
|
:'extended_description_translated_text_instance_oid' => :'Integer',
|
@@ -114,6 +119,10 @@ module UltracartClient
|
|
114
119
|
self.exclude_from_search = attributes[:'exclude_from_search']
|
115
120
|
end
|
116
121
|
|
122
|
+
if attributes.has_key?(:'exclude_from_sitemap')
|
123
|
+
self.exclude_from_sitemap = attributes[:'exclude_from_sitemap']
|
124
|
+
end
|
125
|
+
|
117
126
|
if attributes.has_key?(:'exclude_from_top_sellers')
|
118
127
|
self.exclude_from_top_sellers = attributes[:'exclude_from_top_sellers']
|
119
128
|
end
|
@@ -186,6 +195,7 @@ module UltracartClient
|
|
186
195
|
attributes == o.attributes &&
|
187
196
|
custom_thank_you_url == o.custom_thank_you_url &&
|
188
197
|
exclude_from_search == o.exclude_from_search &&
|
198
|
+
exclude_from_sitemap == o.exclude_from_sitemap &&
|
189
199
|
exclude_from_top_sellers == o.exclude_from_top_sellers &&
|
190
200
|
extended_description == o.extended_description &&
|
191
201
|
extended_description_translated_text_instance_oid == o.extended_description_translated_text_instance_oid &&
|
@@ -205,7 +215,7 @@ module UltracartClient
|
|
205
215
|
# Calculates hash code according to all attributes.
|
206
216
|
# @return [Fixnum] Hash code
|
207
217
|
def hash
|
208
|
-
[assignments, attributes, custom_thank_you_url, exclude_from_search, exclude_from_top_sellers, extended_description, extended_description_translated_text_instance_oid, multimedia, new_item, new_item_end, new_item_start, view_url].hash
|
218
|
+
[assignments, attributes, custom_thank_you_url, exclude_from_search, exclude_from_sitemap, exclude_from_top_sellers, extended_description, extended_description_translated_text_instance_oid, multimedia, new_item, new_item_end, new_item_start, view_url].hash
|
209
219
|
end
|
210
220
|
|
211
221
|
# Builds the object from hash
|
@@ -0,0 +1,215 @@
|
|
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 ItemFulfillmentAddon
|
17
|
+
# Add Item Id
|
18
|
+
attr_accessor :add_item_id
|
19
|
+
|
20
|
+
# Add Item object identifier
|
21
|
+
attr_accessor :add_item_oid
|
22
|
+
|
23
|
+
# Quantity
|
24
|
+
attr_accessor :once_per_order
|
25
|
+
|
26
|
+
# Quantity
|
27
|
+
attr_accessor :quantity
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'add_item_id' => :'add_item_id',
|
33
|
+
:'add_item_oid' => :'add_item_oid',
|
34
|
+
:'once_per_order' => :'once_per_order',
|
35
|
+
:'quantity' => :'quantity'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'add_item_id' => :'String',
|
43
|
+
:'add_item_oid' => :'Integer',
|
44
|
+
:'once_per_order' => :'BOOLEAN',
|
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?(:'add_item_id')
|
58
|
+
self.add_item_id = attributes[:'add_item_id']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'add_item_oid')
|
62
|
+
self.add_item_oid = attributes[:'add_item_oid']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.has_key?(:'once_per_order')
|
66
|
+
self.once_per_order = attributes[:'once_per_order']
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.has_key?(:'quantity')
|
70
|
+
self.quantity = attributes[:'quantity']
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
75
|
+
# @return Array for valid properties with the reasons
|
76
|
+
def list_invalid_properties
|
77
|
+
invalid_properties = Array.new
|
78
|
+
invalid_properties
|
79
|
+
end
|
80
|
+
|
81
|
+
# Check to see if the all the properties in the model are valid
|
82
|
+
# @return true if the model is valid
|
83
|
+
def valid?
|
84
|
+
true
|
85
|
+
end
|
86
|
+
|
87
|
+
# Checks equality by comparing each attribute.
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def ==(o)
|
90
|
+
return true if self.equal?(o)
|
91
|
+
self.class == o.class &&
|
92
|
+
add_item_id == o.add_item_id &&
|
93
|
+
add_item_oid == o.add_item_oid &&
|
94
|
+
once_per_order == o.once_per_order &&
|
95
|
+
quantity == o.quantity
|
96
|
+
end
|
97
|
+
|
98
|
+
# @see the `==` method
|
99
|
+
# @param [Object] Object to be compared
|
100
|
+
def eql?(o)
|
101
|
+
self == o
|
102
|
+
end
|
103
|
+
|
104
|
+
# Calculates hash code according to all attributes.
|
105
|
+
# @return [Fixnum] Hash code
|
106
|
+
def hash
|
107
|
+
[add_item_id, add_item_oid, once_per_order, quantity].hash
|
108
|
+
end
|
109
|
+
|
110
|
+
# Builds the object from hash
|
111
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
112
|
+
# @return [Object] Returns the model itself
|
113
|
+
def build_from_hash(attributes)
|
114
|
+
return nil unless attributes.is_a?(Hash)
|
115
|
+
self.class.swagger_types.each_pair do |key, type|
|
116
|
+
if type =~ /\AArray<(.*)>/i
|
117
|
+
# check to ensure the input is an array given that the attribute
|
118
|
+
# is documented as an array but the input is not
|
119
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
120
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
121
|
+
end
|
122
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
123
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
124
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
125
|
+
end
|
126
|
+
|
127
|
+
self
|
128
|
+
end
|
129
|
+
|
130
|
+
# Deserializes the data based on type
|
131
|
+
# @param string type Data type
|
132
|
+
# @param string value Value to be deserialized
|
133
|
+
# @return [Object] Deserialized data
|
134
|
+
def _deserialize(type, value)
|
135
|
+
case type.to_sym
|
136
|
+
when :DateTime
|
137
|
+
DateTime.parse(value)
|
138
|
+
when :Date
|
139
|
+
Date.parse(value)
|
140
|
+
when :String
|
141
|
+
value.to_s
|
142
|
+
when :Integer
|
143
|
+
value.to_i
|
144
|
+
when :Float
|
145
|
+
value.to_f
|
146
|
+
when :BOOLEAN
|
147
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
148
|
+
true
|
149
|
+
else
|
150
|
+
false
|
151
|
+
end
|
152
|
+
when :Object
|
153
|
+
# generic object (usually a Hash), return directly
|
154
|
+
value
|
155
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
156
|
+
inner_type = Regexp.last_match[:inner_type]
|
157
|
+
value.map { |v| _deserialize(inner_type, v) }
|
158
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
159
|
+
k_type = Regexp.last_match[:k_type]
|
160
|
+
v_type = Regexp.last_match[:v_type]
|
161
|
+
{}.tap do |hash|
|
162
|
+
value.each do |k, v|
|
163
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
164
|
+
end
|
165
|
+
end
|
166
|
+
else # model
|
167
|
+
temp_model = UltracartClient.const_get(type).new
|
168
|
+
temp_model.build_from_hash(value)
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
# Returns the string representation of the object
|
173
|
+
# @return [String] String presentation of the object
|
174
|
+
def to_s
|
175
|
+
to_hash.to_s
|
176
|
+
end
|
177
|
+
|
178
|
+
# to_body is an alias to to_hash (backward compatibility)
|
179
|
+
# @return [Hash] Returns the object in the form of hash
|
180
|
+
def to_body
|
181
|
+
to_hash
|
182
|
+
end
|
183
|
+
|
184
|
+
# Returns the object in the form of hash
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
186
|
+
def to_hash
|
187
|
+
hash = {}
|
188
|
+
self.class.attribute_map.each_pair do |attr, param|
|
189
|
+
value = self.send(attr)
|
190
|
+
next if value.nil?
|
191
|
+
hash[param] = _to_hash(value)
|
192
|
+
end
|
193
|
+
hash
|
194
|
+
end
|
195
|
+
|
196
|
+
# Outputs non-array value in the form of hash
|
197
|
+
# For object, use to_hash. Otherwise, just return the value
|
198
|
+
# @param [Object] value Any valid value
|
199
|
+
# @return [Hash] Returns the value in the form of hash
|
200
|
+
def _to_hash(value)
|
201
|
+
if value.is_a?(Array)
|
202
|
+
value.compact.map { |v| _to_hash(v) }
|
203
|
+
elsif value.is_a?(Hash)
|
204
|
+
{}.tap do |hash|
|
205
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
206
|
+
end
|
207
|
+
elsif value.respond_to? :to_hash
|
208
|
+
value.to_hash
|
209
|
+
else
|
210
|
+
value
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
end
|
215
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -369,6 +369,7 @@ require 'ultracart_api/models/item_ebay_market_listing'
|
|
369
369
|
require 'ultracart_api/models/item_ebay_market_place_analysis'
|
370
370
|
require 'ultracart_api/models/item_email_notifications'
|
371
371
|
require 'ultracart_api/models/item_enrollment123'
|
372
|
+
require 'ultracart_api/models/item_fulfillment_addon'
|
372
373
|
require 'ultracart_api/models/item_gift_certificate'
|
373
374
|
require 'ultracart_api/models/item_google_product_search'
|
374
375
|
require 'ultracart_api/models/item_identifiers'
|
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.6.
|
4
|
+
version: 3.6.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -563,6 +563,7 @@ files:
|
|
563
563
|
- docs/ItemEbayMarketPlaceAnalysis.md
|
564
564
|
- docs/ItemEmailNotifications.md
|
565
565
|
- docs/ItemEnrollment123.md
|
566
|
+
- docs/ItemFulfillmentAddon.md
|
566
567
|
- docs/ItemGiftCertificate.md
|
567
568
|
- docs/ItemGoogleProductSearch.md
|
568
569
|
- docs/ItemIdentifiers.md
|
@@ -1226,6 +1227,7 @@ files:
|
|
1226
1227
|
- lib/ultracart_api/models/item_ebay_market_place_analysis.rb
|
1227
1228
|
- lib/ultracart_api/models/item_email_notifications.rb
|
1228
1229
|
- lib/ultracart_api/models/item_enrollment123.rb
|
1230
|
+
- lib/ultracart_api/models/item_fulfillment_addon.rb
|
1229
1231
|
- lib/ultracart_api/models/item_gift_certificate.rb
|
1230
1232
|
- lib/ultracart_api/models/item_google_product_search.rb
|
1231
1233
|
- lib/ultracart_api/models/item_identifiers.rb
|