ultracart_api 3.1.16 → 3.1.17
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 +6 -4
- data/docs/Coupon.md +1 -0
- data/docs/CouponPercentOffMsrpItems.md +11 -0
- data/lib/ultracart_api.rb +1 -0
- data/lib/ultracart_api/models/coupon.rb +10 -1
- data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +219 -0
- data/lib/ultracart_api/version.rb +1 -1
- 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: 73ab4c834ab8a23e2eed548475b1b8028ce7e88e0fcce48124cbfd182bc653a7
|
|
4
|
+
data.tar.gz: c4ce953a77aae9325c9a80e954810a069e82bd8796d62c29056938392694eb8a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ea1e5422d0aa76786848d12718a0fe99afe9bd0486e2528a64b41346782d284247991551172cc8608bfb0fea5533638fe9f0b098500d6e0fd1b83e6a7054489
|
|
7
|
+
data.tar.gz: f8a0cf76b26e52c1ed87cffa09986ebfa66c7a6e62b17788c908dae65abea1e20138771fb609fb967e1e07458db6e4e6bf6cd4f39a34d17cb442b83f8a1e11b7
|
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.1.
|
|
10
|
+
- Package version: 3.1.17
|
|
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.1.
|
|
27
|
+
gem install ./ultracart_api-3.1.17.gem
|
|
28
28
|
```
|
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.1.
|
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.1.17.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.1.
|
|
35
|
+
gem 'ultracart_api', '~> 3.1.17'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -522,6 +522,7 @@ Class | Method | HTTP request | Description
|
|
|
522
522
|
- [UltracartClient::CouponPercentOffItems](docs/CouponPercentOffItems.md)
|
|
523
523
|
- [UltracartClient::CouponPercentOffItemsAndFreeShipping](docs/CouponPercentOffItemsAndFreeShipping.md)
|
|
524
524
|
- [UltracartClient::CouponPercentOffItemsWithItemsPurchase](docs/CouponPercentOffItemsWithItemsPurchase.md)
|
|
525
|
+
- [UltracartClient::CouponPercentOffMsrpItems](docs/CouponPercentOffMsrpItems.md)
|
|
525
526
|
- [UltracartClient::CouponPercentOffRetailPriceItems](docs/CouponPercentOffRetailPriceItems.md)
|
|
526
527
|
- [UltracartClient::CouponPercentOffShipping](docs/CouponPercentOffShipping.md)
|
|
527
528
|
- [UltracartClient::CouponPercentOffSubtotal](docs/CouponPercentOffSubtotal.md)
|
|
@@ -1007,6 +1008,7 @@ Not every change is committed to every SDK.
|
|
|
1007
1008
|
|
|
1008
1009
|
| Version | Date | Comments |
|
|
1009
1010
|
| --: | :-: | --- |
|
|
1011
|
+
| 3.1.17 | 03/17/2021 | New coupon - percent off MSRP item |
|
|
1010
1012
|
| 3.1.16 | 03/16/2021 | screen recording filter page parameter names |
|
|
1011
1013
|
| 3.1.15 | 03/15/2021 | fix response from deleteScreenRecordingSegment that should have been void |
|
|
1012
1014
|
| 3.1.14 | 03/15/2021 | sort screen recordings by favorite flag |
|
data/docs/Coupon.md
CHANGED
|
@@ -41,6 +41,7 @@ Name | Type | Description | Notes
|
|
|
41
41
|
**percent_off_items** | [**CouponPercentOffItems**](CouponPercentOffItems.md) | | [optional]
|
|
42
42
|
**percent_off_items_and_free_shipping** | [**CouponPercentOffItemsAndFreeShipping**](CouponPercentOffItemsAndFreeShipping.md) | | [optional]
|
|
43
43
|
**percent_off_items_with_items_purchase** | [**CouponPercentOffItemsWithItemsPurchase**](CouponPercentOffItemsWithItemsPurchase.md) | | [optional]
|
|
44
|
+
**percent_off_msrp_items** | [**CouponPercentOffMsrpItems**](CouponPercentOffMsrpItems.md) | | [optional]
|
|
44
45
|
**percent_off_retail_price_items** | [**CouponPercentOffRetailPriceItems**](CouponPercentOffRetailPriceItems.md) | | [optional]
|
|
45
46
|
**percent_off_shipping** | [**CouponPercentOffShipping**](CouponPercentOffShipping.md) | | [optional]
|
|
46
47
|
**percent_off_subtotal** | [**CouponPercentOffSubtotal**](CouponPercentOffSubtotal.md) | | [optional]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# UltracartClient::CouponPercentOffMsrpItems
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**discount_percent** | **Float** | The percentage of subtotal discount | [optional]
|
|
7
|
+
**excluded_items** | **Array<String>** | A list of items which cannot be discounted. | [optional]
|
|
8
|
+
**items** | **Array<String>** | An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items. | [optional]
|
|
9
|
+
**limit** | **Integer** | The (optional) maximum quantity of discounted items. | [optional]
|
|
10
|
+
|
|
11
|
+
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -156,6 +156,7 @@ require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purcha
|
|
|
156
156
|
require 'ultracart_api/models/coupon_percent_off_items'
|
|
157
157
|
require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
|
|
158
158
|
require 'ultracart_api/models/coupon_percent_off_items_with_items_purchase'
|
|
159
|
+
require 'ultracart_api/models/coupon_percent_off_msrp_items'
|
|
159
160
|
require 'ultracart_api/models/coupon_percent_off_retail_price_items'
|
|
160
161
|
require 'ultracart_api/models/coupon_percent_off_shipping'
|
|
161
162
|
require 'ultracart_api/models/coupon_percent_off_subtotal'
|
|
@@ -100,6 +100,8 @@ module UltracartClient
|
|
|
100
100
|
|
|
101
101
|
attr_accessor :percent_off_items_with_items_purchase
|
|
102
102
|
|
|
103
|
+
attr_accessor :percent_off_msrp_items
|
|
104
|
+
|
|
103
105
|
attr_accessor :percent_off_retail_price_items
|
|
104
106
|
|
|
105
107
|
attr_accessor :percent_off_shipping
|
|
@@ -186,6 +188,7 @@ module UltracartClient
|
|
|
186
188
|
:'percent_off_items' => :'percent_off_items',
|
|
187
189
|
:'percent_off_items_and_free_shipping' => :'percent_off_items_and_free_shipping',
|
|
188
190
|
:'percent_off_items_with_items_purchase' => :'percent_off_items_with_items_purchase',
|
|
191
|
+
:'percent_off_msrp_items' => :'percent_off_msrp_items',
|
|
189
192
|
:'percent_off_retail_price_items' => :'percent_off_retail_price_items',
|
|
190
193
|
:'percent_off_shipping' => :'percent_off_shipping',
|
|
191
194
|
:'percent_off_subtotal' => :'percent_off_subtotal',
|
|
@@ -249,6 +252,7 @@ module UltracartClient
|
|
|
249
252
|
:'percent_off_items' => :'CouponPercentOffItems',
|
|
250
253
|
:'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
|
|
251
254
|
:'percent_off_items_with_items_purchase' => :'CouponPercentOffItemsWithItemsPurchase',
|
|
255
|
+
:'percent_off_msrp_items' => :'CouponPercentOffMsrpItems',
|
|
252
256
|
:'percent_off_retail_price_items' => :'CouponPercentOffRetailPriceItems',
|
|
253
257
|
:'percent_off_shipping' => :'CouponPercentOffShipping',
|
|
254
258
|
:'percent_off_subtotal' => :'CouponPercentOffSubtotal',
|
|
@@ -431,6 +435,10 @@ module UltracartClient
|
|
|
431
435
|
self.percent_off_items_with_items_purchase = attributes[:'percent_off_items_with_items_purchase']
|
|
432
436
|
end
|
|
433
437
|
|
|
438
|
+
if attributes.has_key?(:'percent_off_msrp_items')
|
|
439
|
+
self.percent_off_msrp_items = attributes[:'percent_off_msrp_items']
|
|
440
|
+
end
|
|
441
|
+
|
|
434
442
|
if attributes.has_key?(:'percent_off_retail_price_items')
|
|
435
443
|
self.percent_off_retail_price_items = attributes[:'percent_off_retail_price_items']
|
|
436
444
|
end
|
|
@@ -660,6 +668,7 @@ module UltracartClient
|
|
|
660
668
|
percent_off_items == o.percent_off_items &&
|
|
661
669
|
percent_off_items_and_free_shipping == o.percent_off_items_and_free_shipping &&
|
|
662
670
|
percent_off_items_with_items_purchase == o.percent_off_items_with_items_purchase &&
|
|
671
|
+
percent_off_msrp_items == o.percent_off_msrp_items &&
|
|
663
672
|
percent_off_retail_price_items == o.percent_off_retail_price_items &&
|
|
664
673
|
percent_off_shipping == o.percent_off_shipping &&
|
|
665
674
|
percent_off_subtotal == o.percent_off_subtotal &&
|
|
@@ -690,7 +699,7 @@ module UltracartClient
|
|
|
690
699
|
# Calculates hash code according to all attributes.
|
|
691
700
|
# @return [Fixnum] Hash code
|
|
692
701
|
def hash
|
|
693
|
-
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_item, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, usable_by].hash
|
|
702
|
+
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_item, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, usable_by].hash
|
|
694
703
|
end
|
|
695
704
|
|
|
696
705
|
# Builds the object from hash
|
|
@@ -0,0 +1,219 @@
|
|
|
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 CouponPercentOffMsrpItems
|
|
17
|
+
# The percentage of subtotal discount
|
|
18
|
+
attr_accessor :discount_percent
|
|
19
|
+
|
|
20
|
+
# A list of items which cannot be discounted.
|
|
21
|
+
attr_accessor :excluded_items
|
|
22
|
+
|
|
23
|
+
# An optional list of items which will receive a discount. If blank, discount applies to all items except excluded items.
|
|
24
|
+
attr_accessor :items
|
|
25
|
+
|
|
26
|
+
# The (optional) maximum quantity of discounted items.
|
|
27
|
+
attr_accessor :limit
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'discount_percent' => :'discount_percent',
|
|
33
|
+
:'excluded_items' => :'excluded_items',
|
|
34
|
+
:'items' => :'items',
|
|
35
|
+
:'limit' => :'limit'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
:'discount_percent' => :'Float',
|
|
43
|
+
:'excluded_items' => :'Array<String>',
|
|
44
|
+
:'items' => :'Array<String>',
|
|
45
|
+
:'limit' => :'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?(:'discount_percent')
|
|
58
|
+
self.discount_percent = attributes[:'discount_percent']
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
if attributes.has_key?(:'excluded_items')
|
|
62
|
+
if (value = attributes[:'excluded_items']).is_a?(Array)
|
|
63
|
+
self.excluded_items = value
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if attributes.has_key?(:'items')
|
|
68
|
+
if (value = attributes[:'items']).is_a?(Array)
|
|
69
|
+
self.items = value
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
if attributes.has_key?(:'limit')
|
|
74
|
+
self.limit = attributes[:'limit']
|
|
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
|
+
discount_percent == o.discount_percent &&
|
|
97
|
+
excluded_items == o.excluded_items &&
|
|
98
|
+
items == o.items &&
|
|
99
|
+
limit == o.limit
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @see the `==` method
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def eql?(o)
|
|
105
|
+
self == o
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Calculates hash code according to all attributes.
|
|
109
|
+
# @return [Fixnum] Hash code
|
|
110
|
+
def hash
|
|
111
|
+
[discount_percent, excluded_items, items, limit].hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Builds the object from hash
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
# @return [Object] Returns the model itself
|
|
117
|
+
def build_from_hash(attributes)
|
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
|
119
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
120
|
+
if type =~ /\AArray<(.*)>/i
|
|
121
|
+
# check to ensure the input is an array given that the attribute
|
|
122
|
+
# is documented as an array but the input is not
|
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
125
|
+
end
|
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
128
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
self
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Deserializes the data based on type
|
|
135
|
+
# @param string type Data type
|
|
136
|
+
# @param string value Value to be deserialized
|
|
137
|
+
# @return [Object] Deserialized data
|
|
138
|
+
def _deserialize(type, value)
|
|
139
|
+
case type.to_sym
|
|
140
|
+
when :DateTime
|
|
141
|
+
DateTime.parse(value)
|
|
142
|
+
when :Date
|
|
143
|
+
Date.parse(value)
|
|
144
|
+
when :String
|
|
145
|
+
value.to_s
|
|
146
|
+
when :Integer
|
|
147
|
+
value.to_i
|
|
148
|
+
when :Float
|
|
149
|
+
value.to_f
|
|
150
|
+
when :BOOLEAN
|
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
152
|
+
true
|
|
153
|
+
else
|
|
154
|
+
false
|
|
155
|
+
end
|
|
156
|
+
when :Object
|
|
157
|
+
# generic object (usually a Hash), return directly
|
|
158
|
+
value
|
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
|
165
|
+
{}.tap do |hash|
|
|
166
|
+
value.each do |k, v|
|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
else # model
|
|
171
|
+
temp_model = UltracartClient.const_get(type).new
|
|
172
|
+
temp_model.build_from_hash(value)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Returns the string representation of the object
|
|
177
|
+
# @return [String] String presentation of the object
|
|
178
|
+
def to_s
|
|
179
|
+
to_hash.to_s
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
|
184
|
+
def to_body
|
|
185
|
+
to_hash
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# Returns the object in the form of hash
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_hash
|
|
191
|
+
hash = {}
|
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
193
|
+
value = self.send(attr)
|
|
194
|
+
next if value.nil?
|
|
195
|
+
hash[param] = _to_hash(value)
|
|
196
|
+
end
|
|
197
|
+
hash
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# Outputs non-array value in the form of hash
|
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
202
|
+
# @param [Object] value Any valid value
|
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
|
204
|
+
def _to_hash(value)
|
|
205
|
+
if value.is_a?(Array)
|
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
|
207
|
+
elsif value.is_a?(Hash)
|
|
208
|
+
{}.tap do |hash|
|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
210
|
+
end
|
|
211
|
+
elsif value.respond_to? :to_hash
|
|
212
|
+
value.to_hash
|
|
213
|
+
else
|
|
214
|
+
value
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
|
|
218
|
+
end
|
|
219
|
+
end
|
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.1.
|
|
4
|
+
version: 3.1.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-03-
|
|
11
|
+
date: 2021-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -345,6 +345,7 @@ files:
|
|
|
345
345
|
- docs/CouponPercentOffItems.md
|
|
346
346
|
- docs/CouponPercentOffItemsAndFreeShipping.md
|
|
347
347
|
- docs/CouponPercentOffItemsWithItemsPurchase.md
|
|
348
|
+
- docs/CouponPercentOffMsrpItems.md
|
|
348
349
|
- docs/CouponPercentOffRetailPriceItems.md
|
|
349
350
|
- docs/CouponPercentOffShipping.md
|
|
350
351
|
- docs/CouponPercentOffSubtotal.md
|
|
@@ -937,6 +938,7 @@ files:
|
|
|
937
938
|
- lib/ultracart_api/models/coupon_percent_off_items.rb
|
|
938
939
|
- lib/ultracart_api/models/coupon_percent_off_items_and_free_shipping.rb
|
|
939
940
|
- lib/ultracart_api/models/coupon_percent_off_items_with_items_purchase.rb
|
|
941
|
+
- lib/ultracart_api/models/coupon_percent_off_msrp_items.rb
|
|
940
942
|
- lib/ultracart_api/models/coupon_percent_off_retail_price_items.rb
|
|
941
943
|
- lib/ultracart_api/models/coupon_percent_off_shipping.rb
|
|
942
944
|
- lib/ultracart_api/models/coupon_percent_off_subtotal.rb
|