ultracart_api 4.0.172 → 4.0.173

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ff43a4bf81d01c001c8d3d65e9f7e808cee00caaa627b360b92f5575201134d0
4
- data.tar.gz: cb51249dced632b59a67dc66b35fe46ea1172a027094905ed94d94499e692411
3
+ metadata.gz: 6ea01f2a6d105ed8719395ff927d2abdf39bfbdd1c7413309309c8bbf4668656
4
+ data.tar.gz: 7446cf6cd1a39aed5ed33412f63bba5a3d5df66f51e2305d76655a02099435e3
5
5
  SHA512:
6
- metadata.gz: ade3fbcaf6f52cfdb44e079ee18668ee9796dc8b07a689a02305869853bed0063f318da0ed2f36d12b0d0fe29e75e83429a64037cb9dc12cd67ecde08f93e153
7
- data.tar.gz: 3c0fc32599ba2eaad8edc2c270d1681517002c15a73f1b6759856bf8206a31106be0ba681f4749191a33ad9f08986b50fa27b353b4c9f8117a5f9c5d28f1f84c
6
+ metadata.gz: 1ff89fec85ef3ffc6067f6660f5764bea6e0c427336ebe51021125ad8a2b4f0db4f9527f00cac812f755aeca18cc4b23b444639a3b64e9a9057dcc571a670662
7
+ data.tar.gz: 50036ca86514a8c7f1d8055c3b2c75306b4c82da140d049a72e0a770210e9e94d36715f35f28b507d322c63e17806a7b76a2aae3df4897fbc906398f07189b75
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.172
10
+ - Package version: 4.0.173
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.172.gem
27
+ gem install ./ultracart_api-4.0.173.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.172.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.173.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.172'
36
+ gem 'ultracart_api', '~> 4.0.173'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -728,6 +728,7 @@ Class | Method | HTTP request | Description
728
728
  - [UltracartClient::CouponExistsResponse](docs/CouponExistsResponse.md)
729
729
  - [UltracartClient::CouponFreeItemAndShippingWithSubtotal](docs/CouponFreeItemAndShippingWithSubtotal.md)
730
730
  - [UltracartClient::CouponFreeItemWithItemPurchase](docs/CouponFreeItemWithItemPurchase.md)
731
+ - [UltracartClient::CouponFreeItemWithItemPurchaseAndFreeShipping](docs/CouponFreeItemWithItemPurchaseAndFreeShipping.md)
731
732
  - [UltracartClient::CouponFreeItemWithSubtotal](docs/CouponFreeItemWithSubtotal.md)
732
733
  - [UltracartClient::CouponFreeItemsWithItemPurchase](docs/CouponFreeItemsWithItemPurchase.md)
733
734
  - [UltracartClient::CouponFreeItemsWithMixMatchPurchase](docs/CouponFreeItemsWithMixMatchPurchase.md)
@@ -791,6 +792,7 @@ Class | Method | HTTP request | Description
791
792
  - [UltracartClient::CustomerOrdersSummary](docs/CustomerOrdersSummary.md)
792
793
  - [UltracartClient::CustomerPricingTier](docs/CustomerPricingTier.md)
793
794
  - [UltracartClient::CustomerPrivacy](docs/CustomerPrivacy.md)
795
+ - [UltracartClient::CustomerProperty](docs/CustomerProperty.md)
794
796
  - [UltracartClient::CustomerQuery](docs/CustomerQuery.md)
795
797
  - [UltracartClient::CustomerQuotesSummary](docs/CustomerQuotesSummary.md)
796
798
  - [UltracartClient::CustomerResponse](docs/CustomerResponse.md)
@@ -1368,6 +1370,7 @@ Not every change is committed to every SDK.
1368
1370
 
1369
1371
  | Version | Date | Comments |
1370
1372
  | --: | :-: | --- |
1373
+ | 4.0.173 | 08/31/2023 | new coupon - free item and free shipping with purchase |
1371
1374
  | 4.0.172 | 08/16/2023 | added validate_original_order query param to auto order update method |
1372
1375
  | 4.0.171 | 08/14/2023 | esp - add require_order_within_last to the settings object |
1373
1376
  | 4.0.170 | 08/14/2023 | esp - expose rate limiter values in settings object |
data/docs/Coupon.md CHANGED
@@ -28,6 +28,7 @@
28
28
  | **expiration_dts** | **String** | Date/time when coupon expires | [optional] |
29
29
  | **free_item_and_shipping_with_subtotal** | [**CouponFreeItemAndShippingWithSubtotal**](CouponFreeItemAndShippingWithSubtotal.md) | | [optional] |
30
30
  | **free_item_with_item_purchase** | [**CouponFreeItemWithItemPurchase**](CouponFreeItemWithItemPurchase.md) | | [optional] |
31
+ | **free_item_with_item_purchase_and_free_shipping** | [**CouponFreeItemWithItemPurchaseAndFreeShipping**](CouponFreeItemWithItemPurchaseAndFreeShipping.md) | | [optional] |
31
32
  | **free_item_with_subtotal** | [**CouponFreeItemWithSubtotal**](CouponFreeItemWithSubtotal.md) | | [optional] |
32
33
  | **free_items_with_item_purchase** | [**CouponFreeItemsWithItemPurchase**](CouponFreeItemsWithItemPurchase.md) | | [optional] |
33
34
  | **free_items_with_mixmatch_purchase** | [**CouponFreeItemsWithMixMatchPurchase**](CouponFreeItemsWithMixMatchPurchase.md) | | [optional] |
@@ -101,6 +102,7 @@ instance = UltracartClient::Coupon.new(
101
102
  expiration_dts: null,
102
103
  free_item_and_shipping_with_subtotal: null,
103
104
  free_item_with_item_purchase: null,
105
+ free_item_with_item_purchase_and_free_shipping: null,
104
106
  free_item_with_subtotal: null,
105
107
  free_items_with_item_purchase: null,
106
108
  free_items_with_mixmatch_purchase: null,
@@ -0,0 +1,24 @@
1
+ # UltracartClient::CouponFreeItemWithItemPurchaseAndFreeShipping
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **items** | **Array<String>** | A list of free items which will receive a discount if one of the required purchase items is purchased. | [optional] |
8
+ | **limit** | **Integer** | The (optional) maximum quantity of discounted items. Free shipping will apply to all units of the free item ids though. | [optional] |
9
+ | **match_required_purchase_item_to_free_item** | **Boolean** | If true then the free item is matched 1:1 with the free item in the list. | [optional] |
10
+ | **required_purchase_items** | **Array<String>** | Required items (at least one from the list) that must be purchased for coupon to be valid | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::CouponFreeItemWithItemPurchaseAndFreeShipping.new(
18
+ items: null,
19
+ limit: null,
20
+ match_required_purchase_item_to_free_item: null,
21
+ required_purchase_items: null
22
+ )
23
+ ```
24
+
data/docs/Customer.md CHANGED
@@ -44,6 +44,7 @@
44
44
  | **password** | **String** | Password (may only be set, never read) | [optional] |
45
45
  | **pricing_tiers** | [**Array<CustomerPricingTier>**](CustomerPricingTier.md) | Pricing tiers for this customer | [optional] |
46
46
  | **privacy** | [**CustomerPrivacy**](CustomerPrivacy.md) | | [optional] |
47
+ | **properties** | [**Array<CustomerProperty>**](CustomerProperty.md) | Properties for this customer | [optional] |
47
48
  | **qb_class** | **String** | QuickBooks class to import this customer as | [optional] |
48
49
  | **qb_code** | **String** | QuickBooks name to import this customer as | [optional] |
49
50
  | **qb_tax_exemption_reason_code** | **Integer** | QuickBooks tax exemption reason code | [optional] |
@@ -113,6 +114,7 @@ instance = UltracartClient::Customer.new(
113
114
  password: null,
114
115
  pricing_tiers: null,
115
116
  privacy: null,
117
+ properties: null,
116
118
  qb_class: null,
117
119
  qb_code: null,
118
120
  qb_tax_exemption_reason_code: null,
@@ -0,0 +1,22 @@
1
+ # UltracartClient::CustomerProperty
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **expiration_dts** | **String** | The date/time that the property expires and is deleted | [optional] |
8
+ | **name** | **String** | Name | [optional] |
9
+ | **value** | **String** | Value | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'ultracart_api'
15
+
16
+ instance = UltracartClient::CustomerProperty.new(
17
+ expiration_dts: null,
18
+ name: null,
19
+ value: null
20
+ )
21
+ ```
22
+
@@ -71,6 +71,8 @@ module UltracartClient
71
71
 
72
72
  attr_accessor :free_item_with_item_purchase
73
73
 
74
+ attr_accessor :free_item_with_item_purchase_and_free_shipping
75
+
74
76
  attr_accessor :free_item_with_subtotal
75
77
 
76
78
  attr_accessor :free_items_with_item_purchase
@@ -215,6 +217,7 @@ module UltracartClient
215
217
  :'expiration_dts' => :'expiration_dts',
216
218
  :'free_item_and_shipping_with_subtotal' => :'free_item_and_shipping_with_subtotal',
217
219
  :'free_item_with_item_purchase' => :'free_item_with_item_purchase',
220
+ :'free_item_with_item_purchase_and_free_shipping' => :'free_item_with_item_purchase_and_free_shipping',
218
221
  :'free_item_with_subtotal' => :'free_item_with_subtotal',
219
222
  :'free_items_with_item_purchase' => :'free_items_with_item_purchase',
220
223
  :'free_items_with_mixmatch_purchase' => :'free_items_with_mixmatch_purchase',
@@ -292,6 +295,7 @@ module UltracartClient
292
295
  :'expiration_dts' => :'String',
293
296
  :'free_item_and_shipping_with_subtotal' => :'CouponFreeItemAndShippingWithSubtotal',
294
297
  :'free_item_with_item_purchase' => :'CouponFreeItemWithItemPurchase',
298
+ :'free_item_with_item_purchase_and_free_shipping' => :'CouponFreeItemWithItemPurchaseAndFreeShipping',
295
299
  :'free_item_with_subtotal' => :'CouponFreeItemWithSubtotal',
296
300
  :'free_items_with_item_purchase' => :'CouponFreeItemsWithItemPurchase',
297
301
  :'free_items_with_mixmatch_purchase' => :'CouponFreeItemsWithMixMatchPurchase',
@@ -454,6 +458,10 @@ module UltracartClient
454
458
  self.free_item_with_item_purchase = attributes[:'free_item_with_item_purchase']
455
459
  end
456
460
 
461
+ if attributes.key?(:'free_item_with_item_purchase_and_free_shipping')
462
+ self.free_item_with_item_purchase_and_free_shipping = attributes[:'free_item_with_item_purchase_and_free_shipping']
463
+ end
464
+
457
465
  if attributes.key?(:'free_item_with_subtotal')
458
466
  self.free_item_with_subtotal = attributes[:'free_item_with_subtotal']
459
467
  end
@@ -763,6 +771,7 @@ module UltracartClient
763
771
  expiration_dts == o.expiration_dts &&
764
772
  free_item_and_shipping_with_subtotal == o.free_item_and_shipping_with_subtotal &&
765
773
  free_item_with_item_purchase == o.free_item_with_item_purchase &&
774
+ free_item_with_item_purchase_and_free_shipping == o.free_item_with_item_purchase_and_free_shipping &&
766
775
  free_item_with_subtotal == o.free_item_with_subtotal &&
767
776
  free_items_with_item_purchase == o.free_items_with_item_purchase &&
768
777
  free_items_with_mixmatch_purchase == o.free_items_with_mixmatch_purchase &&
@@ -816,7 +825,7 @@ module UltracartClient
816
825
  # Calculates hash code according to all attributes.
817
826
  # @return [Integer] Hash code
818
827
  def hash
819
- [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, amount_shipping_with_subtotal, 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, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, 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, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
828
+ [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, amount_shipping_with_subtotal, 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_item_purchase_and_free_shipping, 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, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, 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, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
820
829
  end
821
830
 
822
831
  # Builds the object from hash
@@ -0,0 +1,254 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CouponFreeItemWithItemPurchaseAndFreeShipping
18
+ # A list of free items which will receive a discount if one of the required purchase items is purchased.
19
+ attr_accessor :items
20
+
21
+ # The (optional) maximum quantity of discounted items. Free shipping will apply to all units of the free item ids though.
22
+ attr_accessor :limit
23
+
24
+ # If true then the free item is matched 1:1 with the free item in the list.
25
+ attr_accessor :match_required_purchase_item_to_free_item
26
+
27
+ # Required items (at least one from the list) that must be purchased for coupon to be valid
28
+ attr_accessor :required_purchase_items
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'items' => :'items',
34
+ :'limit' => :'limit',
35
+ :'match_required_purchase_item_to_free_item' => :'match_required_purchase_item_to_free_item',
36
+ :'required_purchase_items' => :'required_purchase_items'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'items' => :'Array<String>',
49
+ :'limit' => :'Integer',
50
+ :'match_required_purchase_item_to_free_item' => :'Boolean',
51
+ :'required_purchase_items' => :'Array<String>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CouponFreeItemWithItemPurchaseAndFreeShipping` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CouponFreeItemWithItemPurchaseAndFreeShipping`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'items')
77
+ if (value = attributes[:'items']).is_a?(Array)
78
+ self.items = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'limit')
83
+ self.limit = attributes[:'limit']
84
+ end
85
+
86
+ if attributes.key?(:'match_required_purchase_item_to_free_item')
87
+ self.match_required_purchase_item_to_free_item = attributes[:'match_required_purchase_item_to_free_item']
88
+ end
89
+
90
+ if attributes.key?(:'required_purchase_items')
91
+ if (value = attributes[:'required_purchase_items']).is_a?(Array)
92
+ self.required_purchase_items = value
93
+ end
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ invalid_properties = Array.new
101
+ invalid_properties
102
+ end
103
+
104
+ # Check to see if the all the properties in the model are valid
105
+ # @return true if the model is valid
106
+ def valid?
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ items == o.items &&
116
+ limit == o.limit &&
117
+ match_required_purchase_item_to_free_item == o.match_required_purchase_item_to_free_item &&
118
+ required_purchase_items == o.required_purchase_items
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [items, limit, match_required_purchase_item_to_free_item, required_purchase_items].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ new.build_from_hash(attributes)
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ attributes = attributes.transform_keys(&:to_sym)
146
+ self.class.openapi_types.each_pair do |key, type|
147
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
148
+ self.send("#{key}=", nil)
149
+ elsif type =~ /\AArray<(.*)>/i
150
+ # check to ensure the input is an array given that the attribute
151
+ # is documented as an array but the input is not
152
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
153
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
154
+ end
155
+ elsif !attributes[self.class.attribute_map[key]].nil?
156
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
157
+ end
158
+ end
159
+
160
+ self
161
+ end
162
+
163
+ # Deserializes the data based on type
164
+ # @param string type Data type
165
+ # @param string value Value to be deserialized
166
+ # @return [Object] Deserialized data
167
+ def _deserialize(type, value)
168
+ case type.to_sym
169
+ when :Time
170
+ Time.parse(value)
171
+ when :Date
172
+ Date.parse(value)
173
+ when :String
174
+ value.to_s
175
+ when :Integer
176
+ value.to_i
177
+ when :Float
178
+ value.to_f
179
+ when :Boolean
180
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
181
+ true
182
+ else
183
+ false
184
+ end
185
+ when :Object
186
+ # generic object (usually a Hash), return directly
187
+ value
188
+ when /\AArray<(?<inner_type>.+)>\z/
189
+ inner_type = Regexp.last_match[:inner_type]
190
+ value.map { |v| _deserialize(inner_type, v) }
191
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
192
+ k_type = Regexp.last_match[:k_type]
193
+ v_type = Regexp.last_match[:v_type]
194
+ {}.tap do |hash|
195
+ value.each do |k, v|
196
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
197
+ end
198
+ end
199
+ else # model
200
+ # models (e.g. Pet) or oneOf
201
+ klass = UltracartClient.const_get(type)
202
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ if value.nil?
225
+ is_nullable = self.class.openapi_nullable.include?(attr)
226
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
227
+ end
228
+
229
+ hash[param] = _to_hash(value)
230
+ end
231
+ hash
232
+ end
233
+
234
+ # Outputs non-array value in the form of hash
235
+ # For object, use to_hash. Otherwise, just return the value
236
+ # @param [Object] value Any valid value
237
+ # @return [Hash] Returns the value in the form of hash
238
+ def _to_hash(value)
239
+ if value.is_a?(Array)
240
+ value.compact.map { |v| _to_hash(v) }
241
+ elsif value.is_a?(Hash)
242
+ {}.tap do |hash|
243
+ value.each { |k, v| hash[k] = _to_hash(v) }
244
+ end
245
+ elsif value.respond_to? :to_hash
246
+ value.to_hash
247
+ else
248
+ value
249
+ end
250
+ end
251
+
252
+ end
253
+
254
+ end
@@ -130,6 +130,9 @@ module UltracartClient
130
130
 
131
131
  attr_accessor :privacy
132
132
 
133
+ # Properties for this customer
134
+ attr_accessor :properties
135
+
133
136
  # QuickBooks class to import this customer as
134
137
  attr_accessor :qb_class
135
138
 
@@ -236,6 +239,7 @@ module UltracartClient
236
239
  :'password' => :'password',
237
240
  :'pricing_tiers' => :'pricing_tiers',
238
241
  :'privacy' => :'privacy',
242
+ :'properties' => :'properties',
239
243
  :'qb_class' => :'qb_class',
240
244
  :'qb_code' => :'qb_code',
241
245
  :'qb_tax_exemption_reason_code' => :'qb_tax_exemption_reason_code',
@@ -309,6 +313,7 @@ module UltracartClient
309
313
  :'password' => :'String',
310
314
  :'pricing_tiers' => :'Array<CustomerPricingTier>',
311
315
  :'privacy' => :'CustomerPrivacy',
316
+ :'properties' => :'Array<CustomerProperty>',
312
317
  :'qb_class' => :'String',
313
318
  :'qb_code' => :'String',
314
319
  :'qb_tax_exemption_reason_code' => :'Integer',
@@ -527,6 +532,12 @@ module UltracartClient
527
532
  self.privacy = attributes[:'privacy']
528
533
  end
529
534
 
535
+ if attributes.key?(:'properties')
536
+ if (value = attributes[:'properties']).is_a?(Array)
537
+ self.properties = value
538
+ end
539
+ end
540
+
530
541
  if attributes.key?(:'qb_class')
531
542
  self.qb_class = attributes[:'qb_class']
532
543
  end
@@ -847,6 +858,7 @@ module UltracartClient
847
858
  password == o.password &&
848
859
  pricing_tiers == o.pricing_tiers &&
849
860
  privacy == o.privacy &&
861
+ properties == o.properties &&
850
862
  qb_class == o.qb_class &&
851
863
  qb_code == o.qb_code &&
852
864
  qb_tax_exemption_reason_code == o.qb_tax_exemption_reason_code &&
@@ -880,7 +892,7 @@ module UltracartClient
880
892
  # Calculates hash code according to all attributes.
881
893
  # @return [Integer] Hash code
882
894
  def hash
883
- [activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, edi, email, exempt_shipping_handling_charge, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, qb_class, qb_code, qb_tax_exemption_reason_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
895
+ [activity, affiliate_oid, allow_3rd_party_billing, allow_cod, allow_drop_shipping, allow_purchase_order, allow_quote_request, allow_selection_of_address_type, attachments, auto_approve_cod, auto_approve_purchase_order, automatic_merchant_notes, billing, business_notes, cards, cc_emails, customer_profile_oid, dhl_account_number, dhl_duty_account_number, edi, email, exempt_shipping_handling_charge, fedex_account_number, free_shipping, free_shipping_minimum, last_modified_by, last_modified_dts, loyalty, maximum_item_count, merchant_id, minimum_item_count, minimum_subtotal, no_coupons, no_free_shipping, no_realtime_charge, orders, orders_summary, password, pricing_tiers, privacy, properties, qb_class, qb_code, qb_tax_exemption_reason_code, quotes, quotes_summary, referral_source, reviewer, sales_rep_code, send_signup_notification, shipping, signup_dts, software_entitlements, suppress_buysafe, tags, tax_codes, tax_exempt, tax_id, terms, track_separately, unapproved, ups_account_number, website_url].hash
884
896
  end
885
897
 
886
898
  # Builds the object from hash
@@ -0,0 +1,270 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class CustomerProperty
18
+ # The date/time that the property expires and is deleted
19
+ attr_accessor :expiration_dts
20
+
21
+ # Name
22
+ attr_accessor :name
23
+
24
+ # Value
25
+ attr_accessor :value
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'expiration_dts' => :'expiration_dts',
31
+ :'name' => :'name',
32
+ :'value' => :'value'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'expiration_dts' => :'String',
45
+ :'name' => :'String',
46
+ :'value' => :'String'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomerProperty` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomerProperty`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'expiration_dts')
72
+ self.expiration_dts = attributes[:'expiration_dts']
73
+ end
74
+
75
+ if attributes.key?(:'name')
76
+ self.name = attributes[:'name']
77
+ end
78
+
79
+ if attributes.key?(:'value')
80
+ self.value = attributes[:'value']
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ if !@name.nil? && @name.to_s.length > 100
89
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
90
+ end
91
+
92
+ if !@value.nil? && @value.to_s.length > 1500
93
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 1500.')
94
+ end
95
+
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ return false if !@name.nil? && @name.to_s.length > 100
103
+ return false if !@value.nil? && @value.to_s.length > 1500
104
+ true
105
+ end
106
+
107
+ # Custom attribute writer method with validation
108
+ # @param [Object] name Value to be assigned
109
+ def name=(name)
110
+ if !name.nil? && name.to_s.length > 100
111
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
112
+ end
113
+
114
+ @name = name
115
+ end
116
+
117
+ # Custom attribute writer method with validation
118
+ # @param [Object] value Value to be assigned
119
+ def value=(value)
120
+ if !value.nil? && value.to_s.length > 1500
121
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 1500.'
122
+ end
123
+
124
+ @value = value
125
+ end
126
+
127
+ # Checks equality by comparing each attribute.
128
+ # @param [Object] Object to be compared
129
+ def ==(o)
130
+ return true if self.equal?(o)
131
+ self.class == o.class &&
132
+ expiration_dts == o.expiration_dts &&
133
+ name == o.name &&
134
+ value == o.value
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [expiration_dts, name, value].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :Time
186
+ Time.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :Boolean
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ # models (e.g. Pet) or oneOf
217
+ klass = UltracartClient.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.172'
14
+ VERSION = '4.0.173'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -228,6 +228,7 @@ require 'ultracart_api/models/coupon_editor_values'
228
228
  require 'ultracart_api/models/coupon_exists_response'
229
229
  require 'ultracart_api/models/coupon_free_item_and_shipping_with_subtotal'
230
230
  require 'ultracart_api/models/coupon_free_item_with_item_purchase'
231
+ require 'ultracart_api/models/coupon_free_item_with_item_purchase_and_free_shipping'
231
232
  require 'ultracart_api/models/coupon_free_item_with_subtotal'
232
233
  require 'ultracart_api/models/coupon_free_items_with_item_purchase'
233
234
  require 'ultracart_api/models/coupon_free_items_with_mix_match_purchase'
@@ -291,6 +292,7 @@ require 'ultracart_api/models/customer_merge_request'
291
292
  require 'ultracart_api/models/customer_orders_summary'
292
293
  require 'ultracart_api/models/customer_pricing_tier'
293
294
  require 'ultracart_api/models/customer_privacy'
295
+ require 'ultracart_api/models/customer_property'
294
296
  require 'ultracart_api/models/customer_query'
295
297
  require 'ultracart_api/models/customer_quotes_summary'
296
298
  require 'ultracart_api/models/customer_response'
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: 4.0.172
4
+ version: 4.0.173
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-16 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -279,6 +279,7 @@ files:
279
279
  - docs/CouponExistsResponse.md
280
280
  - docs/CouponFreeItemAndShippingWithSubtotal.md
281
281
  - docs/CouponFreeItemWithItemPurchase.md
282
+ - docs/CouponFreeItemWithItemPurchaseAndFreeShipping.md
282
283
  - docs/CouponFreeItemWithSubtotal.md
283
284
  - docs/CouponFreeItemsWithItemPurchase.md
284
285
  - docs/CouponFreeItemsWithMixMatchPurchase.md
@@ -343,6 +344,7 @@ files:
343
344
  - docs/CustomerOrdersSummary.md
344
345
  - docs/CustomerPricingTier.md
345
346
  - docs/CustomerPrivacy.md
347
+ - docs/CustomerProperty.md
346
348
  - docs/CustomerQuery.md
347
349
  - docs/CustomerQuotesSummary.md
348
350
  - docs/CustomerResponse.md
@@ -1095,6 +1097,7 @@ files:
1095
1097
  - lib/ultracart_api/models/coupon_exists_response.rb
1096
1098
  - lib/ultracart_api/models/coupon_free_item_and_shipping_with_subtotal.rb
1097
1099
  - lib/ultracart_api/models/coupon_free_item_with_item_purchase.rb
1100
+ - lib/ultracart_api/models/coupon_free_item_with_item_purchase_and_free_shipping.rb
1098
1101
  - lib/ultracart_api/models/coupon_free_item_with_subtotal.rb
1099
1102
  - lib/ultracart_api/models/coupon_free_items_with_item_purchase.rb
1100
1103
  - lib/ultracart_api/models/coupon_free_items_with_mix_match_purchase.rb
@@ -1158,6 +1161,7 @@ files:
1158
1161
  - lib/ultracart_api/models/customer_orders_summary.rb
1159
1162
  - lib/ultracart_api/models/customer_pricing_tier.rb
1160
1163
  - lib/ultracart_api/models/customer_privacy.rb
1164
+ - lib/ultracart_api/models/customer_property.rb
1161
1165
  - lib/ultracart_api/models/customer_query.rb
1162
1166
  - lib/ultracart_api/models/customer_quotes_summary.rb
1163
1167
  - lib/ultracart_api/models/customer_response.rb