ultracart_api 3.10.139 → 3.10.140

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f39f057114d1c099357f2927ffee958761d7f6f9335ce6df585ff9ca66400632
4
- data.tar.gz: 429ef818aad66171ca553172d9512379cc5e3aee6f610dff7b911125284da26a
3
+ metadata.gz: 8f3a252b45bbed343b4f7df084cfeab2a4e50d5e5ede14ca77a24199b15fa2db
4
+ data.tar.gz: 9b414a8dd8cb51b6e3e816c51735363a516c275ea18ebf53f6883449775f2a4a
5
5
  SHA512:
6
- metadata.gz: 72b47aee14efcacaeb10047b0baf3f80a9a88ba9e1e3446a7f727b8518437ea67289ec09a3457b8f11dbf4d00283f784bc294c253aa280a9a0853be7c3450580
7
- data.tar.gz: 5500e449fea9ac31fe1dce13ca81f63e1ee5c80b02d94470b1cb630be53862da79cb507eef1f5f9d9e23b4ea831dc06a0711e088ee321e5a488830baacb7f191
6
+ metadata.gz: 186affa3270d340e684fd5cc2ca999af06bc128e2d9edf9e2452e45df386dfad5d77d4074161a974eb0a2cfc6dd5945e37d24fd171bc2fe0e30c324900a81f42
7
+ data.tar.gz: f2508c3dfaab568564f0fa6ae327d45801d98505ba83f2bbce76c449824431481660ce51318b6750685d6cdbaa80f3e970c295040c6b6cc71fcd92d4ef50e680
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.139
10
+ - Package version: 3.10.140
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.139.gem
27
+ gem install ./ultracart_api-3.10.140.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.139.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.140.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.139'
35
+ gem 'ultracart_api', '~> 3.10.140'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -532,6 +532,8 @@ Class | Method | HTTP request | Description
532
532
  - [UltracartClient::ApplyLibraryItemRequest](docs/ApplyLibraryItemRequest.md)
533
533
  - [UltracartClient::ApplyLibraryItemResponse](docs/ApplyLibraryItemResponse.md)
534
534
  - [UltracartClient::AutoOrder](docs/AutoOrder.md)
535
+ - [UltracartClient::AutoOrderAddonItem](docs/AutoOrderAddonItem.md)
536
+ - [UltracartClient::AutoOrderAddonItemOption](docs/AutoOrderAddonItemOption.md)
535
537
  - [UltracartClient::AutoOrderItem](docs/AutoOrderItem.md)
536
538
  - [UltracartClient::AutoOrderItemFutureSchedule](docs/AutoOrderItemFutureSchedule.md)
537
539
  - [UltracartClient::AutoOrderItemOption](docs/AutoOrderItemOption.md)
@@ -1354,6 +1356,7 @@ Not every change is committed to every SDK.
1354
1356
 
1355
1357
  | Version | Date | Comments |
1356
1358
  | --: | :-: | --- |
1359
+ | 3.10.140 | 06/06/2023 | auto order add_ons |
1357
1360
  | 3.10.139 | 05/25/2023 | added venmo constants for payment type |
1358
1361
  | 3.10.138 | 05/18/2023 | dw bi - send back the executed SQL |
1359
1362
  | 3.10.137 | 05/04/2023 | item api added methods for items reviews |
data/docs/AutoOrder.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **add_ons** | [**Array<AutoOrderAddonItem>**](AutoOrderAddonItem.md) | Array of addon objects instructing which items to add to auto order and how many times they should be added. | [optional]
6
7
  **auto_order_code** | **String** | Unique code assigned to this auto order | [optional]
7
8
  **auto_order_oid** | **Integer** | Auto order object identifier | [optional]
8
9
  **cancel_after_next_x_orders** | **Integer** | Cancel this auto order after X additional rebills | [optional]
@@ -0,0 +1,13 @@
1
+ # UltracartClient::AutoOrderAddonItem
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **arbitrary_unit_cost** | **Float** | | [optional]
7
+ **free_shipping** | **BOOLEAN** | | [optional]
8
+ **item_id** | **String** | | [optional]
9
+ **next_x_orders** | **Integer** | | [optional]
10
+ **options** | [**Array<AutoOrderAddonItemOption>**](AutoOrderAddonItemOption.md) | Options associated with this item | [optional]
11
+ **quantity** | **Integer** | | [optional]
12
+
13
+
@@ -0,0 +1,9 @@
1
+ # UltracartClient::AutoOrderAddonItemOption
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **label** | **String** | Label | [optional]
7
+ **value** | **String** | Value | [optional]
8
+
9
+
@@ -8,7 +8,9 @@ Name | Type | Description | Notes
8
8
  **auto_order_cancel_charge_minimum_balance** | **BOOLEAN** | If true, the cost of the cancel item will be the remaining balance of the minimum rebill or lifetime value | [optional]
9
9
  **auto_order_cancel_item_id** | **String** | Item id to attempt charging the customer for if they cancel | [optional]
10
10
  **auto_order_cancel_item_oid** | **Integer** | Item object identifier to attempt charging the customer for if they cancel | [optional]
11
+ **auto_order_cancel_minimum_life_time_count** | **Integer** | The minimum life time count that must be billed in order to not be charged the cancellation item. | [optional]
11
12
  **auto_order_cancel_minimum_life_time_value** | **Float** | The minimum life time value that must be paid in order to not be charged the cancellation item. | [optional]
13
+ **auto_order_cancel_minimum_rebill_count** | **Integer** | The minimum rebill count that must be billed in order to not be charged the cancellation item. | [optional]
12
14
  **auto_order_cancel_minimum_rebill_value** | **Float** | The minimum rebill value that must be paid in order to not be charged the cancellation item. | [optional]
13
15
  **auto_order_downgrade_items** | **Array<String>** | List of downgrade items presented to customer service representatives | [optional]
14
16
  **auto_order_paused** | **BOOLEAN** | True if the rebill processing of this item is paused | [optional]
@@ -14,6 +14,9 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class AutoOrder
17
+ # Array of addon objects instructing which items to add to auto order and how many times they should be added.
18
+ attr_accessor :add_ons
19
+
17
20
  # Unique code assigned to this auto order
18
21
  attr_accessor :auto_order_code
19
22
 
@@ -106,6 +109,7 @@ module UltracartClient
106
109
  # Attribute mapping from ruby-style variable name to JSON key.
107
110
  def self.attribute_map
108
111
  {
112
+ :'add_ons' => :'add_ons',
109
113
  :'auto_order_code' => :'auto_order_code',
110
114
  :'auto_order_oid' => :'auto_order_oid',
111
115
  :'cancel_after_next_x_orders' => :'cancel_after_next_x_orders',
@@ -135,6 +139,7 @@ module UltracartClient
135
139
  # Attribute type mapping.
136
140
  def self.swagger_types
137
141
  {
142
+ :'add_ons' => :'Array<AutoOrderAddonItem>',
138
143
  :'auto_order_code' => :'String',
139
144
  :'auto_order_oid' => :'Integer',
140
145
  :'cancel_after_next_x_orders' => :'Integer',
@@ -169,6 +174,12 @@ module UltracartClient
169
174
  # convert string to symbol for hash key
170
175
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
171
176
 
177
+ if attributes.has_key?(:'add_ons')
178
+ if (value = attributes[:'add_ons']).is_a?(Array)
179
+ self.add_ons = value
180
+ end
181
+ end
182
+
172
183
  if attributes.has_key?(:'auto_order_code')
173
184
  self.auto_order_code = attributes[:'auto_order_code']
174
185
  end
@@ -298,6 +309,7 @@ module UltracartClient
298
309
  def ==(o)
299
310
  return true if self.equal?(o)
300
311
  self.class == o.class &&
312
+ add_ons == o.add_ons &&
301
313
  auto_order_code == o.auto_order_code &&
302
314
  auto_order_oid == o.auto_order_oid &&
303
315
  cancel_after_next_x_orders == o.cancel_after_next_x_orders &&
@@ -332,7 +344,7 @@ module UltracartClient
332
344
  # Calculates hash code according to all attributes.
333
345
  # @return [Fixnum] Hash code
334
346
  def hash
335
- [auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, management, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
347
+ [add_ons, auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, management, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
336
348
  end
337
349
 
338
350
  # Builds the object from hash
@@ -0,0 +1,232 @@
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 AutoOrderAddonItem
17
+ attr_accessor :arbitrary_unit_cost
18
+
19
+ attr_accessor :free_shipping
20
+
21
+ attr_accessor :item_id
22
+
23
+ attr_accessor :next_x_orders
24
+
25
+ # Options associated with this item
26
+ attr_accessor :options
27
+
28
+ attr_accessor :quantity
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'arbitrary_unit_cost' => :'arbitrary_unit_cost',
34
+ :'free_shipping' => :'free_shipping',
35
+ :'item_id' => :'item_id',
36
+ :'next_x_orders' => :'next_x_orders',
37
+ :'options' => :'options',
38
+ :'quantity' => :'quantity'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'arbitrary_unit_cost' => :'Float',
46
+ :'free_shipping' => :'BOOLEAN',
47
+ :'item_id' => :'String',
48
+ :'next_x_orders' => :'Integer',
49
+ :'options' => :'Array<AutoOrderAddonItemOption>',
50
+ :'quantity' => :'Integer'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'arbitrary_unit_cost')
63
+ self.arbitrary_unit_cost = attributes[:'arbitrary_unit_cost']
64
+ end
65
+
66
+ if attributes.has_key?(:'free_shipping')
67
+ self.free_shipping = attributes[:'free_shipping']
68
+ end
69
+
70
+ if attributes.has_key?(:'item_id')
71
+ self.item_id = attributes[:'item_id']
72
+ end
73
+
74
+ if attributes.has_key?(:'next_x_orders')
75
+ self.next_x_orders = attributes[:'next_x_orders']
76
+ end
77
+
78
+ if attributes.has_key?(:'options')
79
+ if (value = attributes[:'options']).is_a?(Array)
80
+ self.options = value
81
+ end
82
+ end
83
+
84
+ if attributes.has_key?(:'quantity')
85
+ self.quantity = attributes[:'quantity']
86
+ end
87
+ end
88
+
89
+ # Show invalid properties with the reasons. Usually used together with valid?
90
+ # @return Array for valid properties with the reasons
91
+ def list_invalid_properties
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ true
100
+ end
101
+
102
+ # Checks equality by comparing each attribute.
103
+ # @param [Object] Object to be compared
104
+ def ==(o)
105
+ return true if self.equal?(o)
106
+ self.class == o.class &&
107
+ arbitrary_unit_cost == o.arbitrary_unit_cost &&
108
+ free_shipping == o.free_shipping &&
109
+ item_id == o.item_id &&
110
+ next_x_orders == o.next_x_orders &&
111
+ options == o.options &&
112
+ quantity == o.quantity
113
+ end
114
+
115
+ # @see the `==` method
116
+ # @param [Object] Object to be compared
117
+ def eql?(o)
118
+ self == o
119
+ end
120
+
121
+ # Calculates hash code according to all attributes.
122
+ # @return [Fixnum] Hash code
123
+ def hash
124
+ [arbitrary_unit_cost, free_shipping, item_id, next_x_orders, options, quantity].hash
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.swagger_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :BOOLEAN
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ temp_model = UltracartClient.const_get(type).new
185
+ temp_model.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ next if value.nil?
208
+ hash[param] = _to_hash(value)
209
+ end
210
+ hash
211
+ end
212
+
213
+ # Outputs non-array value in the form of hash
214
+ # For object, use to_hash. Otherwise, just return the value
215
+ # @param [Object] value Any valid value
216
+ # @return [Hash] Returns the value in the form of hash
217
+ def _to_hash(value)
218
+ if value.is_a?(Array)
219
+ value.compact.map { |v| _to_hash(v) }
220
+ elsif value.is_a?(Hash)
221
+ {}.tap do |hash|
222
+ value.each { |k, v| hash[k] = _to_hash(v) }
223
+ end
224
+ elsif value.respond_to? :to_hash
225
+ value.to_hash
226
+ else
227
+ value
228
+ end
229
+ end
230
+
231
+ end
232
+ end
@@ -0,0 +1,225 @@
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 AutoOrderAddonItemOption
17
+ # Label
18
+ attr_accessor :label
19
+
20
+ # Value
21
+ attr_accessor :value
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'label' => :'label',
27
+ :'value' => :'value'
28
+ }
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.swagger_types
33
+ {
34
+ :'label' => :'String',
35
+ :'value' => :'String'
36
+ }
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ return unless attributes.is_a?(Hash)
43
+
44
+ # convert string to symbol for hash key
45
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
+
47
+ if attributes.has_key?(:'label')
48
+ self.label = attributes[:'label']
49
+ end
50
+
51
+ if attributes.has_key?(:'value')
52
+ self.value = attributes[:'value']
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ if !@label.nil? && @label.to_s.length > 50
61
+ invalid_properties.push('invalid value for "label", the character length must be smaller than or equal to 50.')
62
+ end
63
+
64
+ if !@value.nil? && @value.to_s.length > 1024
65
+ invalid_properties.push('invalid value for "value", the character length must be smaller than or equal to 1024.')
66
+ end
67
+
68
+ invalid_properties
69
+ end
70
+
71
+ # Check to see if the all the properties in the model are valid
72
+ # @return true if the model is valid
73
+ def valid?
74
+ return false if !@label.nil? && @label.to_s.length > 50
75
+ return false if !@value.nil? && @value.to_s.length > 1024
76
+ true
77
+ end
78
+
79
+ # Custom attribute writer method with validation
80
+ # @param [Object] label Value to be assigned
81
+ def label=(label)
82
+ if !label.nil? && label.to_s.length > 50
83
+ fail ArgumentError, 'invalid value for "label", the character length must be smaller than or equal to 50.'
84
+ end
85
+
86
+ @label = label
87
+ end
88
+
89
+ # Custom attribute writer method with validation
90
+ # @param [Object] value Value to be assigned
91
+ def value=(value)
92
+ if !value.nil? && value.to_s.length > 1024
93
+ fail ArgumentError, 'invalid value for "value", the character length must be smaller than or equal to 1024.'
94
+ end
95
+
96
+ @value = value
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ label == o.label &&
105
+ value == o.value
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Fixnum] Hash code
116
+ def hash
117
+ [label, value].hash
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ self.class.swagger_types.each_pair do |key, type|
126
+ if type =~ /\AArray<(.*)>/i
127
+ # check to ensure the input is an array given that the attribute
128
+ # is documented as an array but the input is not
129
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
130
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
131
+ end
132
+ elsif !attributes[self.class.attribute_map[key]].nil?
133
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
134
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
135
+ end
136
+
137
+ self
138
+ end
139
+
140
+ # Deserializes the data based on type
141
+ # @param string type Data type
142
+ # @param string value Value to be deserialized
143
+ # @return [Object] Deserialized data
144
+ def _deserialize(type, value)
145
+ case type.to_sym
146
+ when :DateTime
147
+ DateTime.parse(value)
148
+ when :Date
149
+ Date.parse(value)
150
+ when :String
151
+ value.to_s
152
+ when :Integer
153
+ value.to_i
154
+ when :Float
155
+ value.to_f
156
+ when :BOOLEAN
157
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
158
+ true
159
+ else
160
+ false
161
+ end
162
+ when :Object
163
+ # generic object (usually a Hash), return directly
164
+ value
165
+ when /\AArray<(?<inner_type>.+)>\z/
166
+ inner_type = Regexp.last_match[:inner_type]
167
+ value.map { |v| _deserialize(inner_type, v) }
168
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
169
+ k_type = Regexp.last_match[:k_type]
170
+ v_type = Regexp.last_match[:v_type]
171
+ {}.tap do |hash|
172
+ value.each do |k, v|
173
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
174
+ end
175
+ end
176
+ else # model
177
+ temp_model = UltracartClient.const_get(type).new
178
+ temp_model.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ next if value.nil?
201
+ hash[param] = _to_hash(value)
202
+ end
203
+ hash
204
+ end
205
+
206
+ # Outputs non-array value in the form of hash
207
+ # For object, use to_hash. Otherwise, just return the value
208
+ # @param [Object] value Any valid value
209
+ # @return [Hash] Returns the value in the form of hash
210
+ def _to_hash(value)
211
+ if value.is_a?(Array)
212
+ value.compact.map { |v| _to_hash(v) }
213
+ elsif value.is_a?(Hash)
214
+ {}.tap do |hash|
215
+ value.each { |k, v| hash[k] = _to_hash(v) }
216
+ end
217
+ elsif value.respond_to? :to_hash
218
+ value.to_hash
219
+ else
220
+ value
221
+ end
222
+ end
223
+
224
+ end
225
+ end
@@ -29,9 +29,15 @@ module UltracartClient
29
29
  # Item object identifier to attempt charging the customer for if they cancel
30
30
  attr_accessor :auto_order_cancel_item_oid
31
31
 
32
+ # The minimum life time count that must be billed in order to not be charged the cancellation item.
33
+ attr_accessor :auto_order_cancel_minimum_life_time_count
34
+
32
35
  # The minimum life time value that must be paid in order to not be charged the cancellation item.
33
36
  attr_accessor :auto_order_cancel_minimum_life_time_value
34
37
 
38
+ # The minimum rebill count that must be billed in order to not be charged the cancellation item.
39
+ attr_accessor :auto_order_cancel_minimum_rebill_count
40
+
35
41
  # The minimum rebill value that must be paid in order to not be charged the cancellation item.
36
42
  attr_accessor :auto_order_cancel_minimum_rebill_value
37
43
 
@@ -82,7 +88,9 @@ module UltracartClient
82
88
  :'auto_order_cancel_charge_minimum_balance' => :'auto_order_cancel_charge_minimum_balance',
83
89
  :'auto_order_cancel_item_id' => :'auto_order_cancel_item_id',
84
90
  :'auto_order_cancel_item_oid' => :'auto_order_cancel_item_oid',
91
+ :'auto_order_cancel_minimum_life_time_count' => :'auto_order_cancel_minimum_life_time_count',
85
92
  :'auto_order_cancel_minimum_life_time_value' => :'auto_order_cancel_minimum_life_time_value',
93
+ :'auto_order_cancel_minimum_rebill_count' => :'auto_order_cancel_minimum_rebill_count',
86
94
  :'auto_order_cancel_minimum_rebill_value' => :'auto_order_cancel_minimum_rebill_value',
87
95
  :'auto_order_downgrade_items' => :'auto_order_downgrade_items',
88
96
  :'auto_order_paused' => :'auto_order_paused',
@@ -108,7 +116,9 @@ module UltracartClient
108
116
  :'auto_order_cancel_charge_minimum_balance' => :'BOOLEAN',
109
117
  :'auto_order_cancel_item_id' => :'String',
110
118
  :'auto_order_cancel_item_oid' => :'Integer',
119
+ :'auto_order_cancel_minimum_life_time_count' => :'Integer',
111
120
  :'auto_order_cancel_minimum_life_time_value' => :'Float',
121
+ :'auto_order_cancel_minimum_rebill_count' => :'Integer',
112
122
  :'auto_order_cancel_minimum_rebill_value' => :'Float',
113
123
  :'auto_order_downgrade_items' => :'Array<String>',
114
124
  :'auto_order_paused' => :'BOOLEAN',
@@ -154,10 +164,18 @@ module UltracartClient
154
164
  self.auto_order_cancel_item_oid = attributes[:'auto_order_cancel_item_oid']
155
165
  end
156
166
 
167
+ if attributes.has_key?(:'auto_order_cancel_minimum_life_time_count')
168
+ self.auto_order_cancel_minimum_life_time_count = attributes[:'auto_order_cancel_minimum_life_time_count']
169
+ end
170
+
157
171
  if attributes.has_key?(:'auto_order_cancel_minimum_life_time_value')
158
172
  self.auto_order_cancel_minimum_life_time_value = attributes[:'auto_order_cancel_minimum_life_time_value']
159
173
  end
160
174
 
175
+ if attributes.has_key?(:'auto_order_cancel_minimum_rebill_count')
176
+ self.auto_order_cancel_minimum_rebill_count = attributes[:'auto_order_cancel_minimum_rebill_count']
177
+ end
178
+
161
179
  if attributes.has_key?(:'auto_order_cancel_minimum_rebill_value')
162
180
  self.auto_order_cancel_minimum_rebill_value = attributes[:'auto_order_cancel_minimum_rebill_value']
163
181
  end
@@ -261,7 +279,9 @@ module UltracartClient
261
279
  auto_order_cancel_charge_minimum_balance == o.auto_order_cancel_charge_minimum_balance &&
262
280
  auto_order_cancel_item_id == o.auto_order_cancel_item_id &&
263
281
  auto_order_cancel_item_oid == o.auto_order_cancel_item_oid &&
282
+ auto_order_cancel_minimum_life_time_count == o.auto_order_cancel_minimum_life_time_count &&
264
283
  auto_order_cancel_minimum_life_time_value == o.auto_order_cancel_minimum_life_time_value &&
284
+ auto_order_cancel_minimum_rebill_count == o.auto_order_cancel_minimum_rebill_count &&
265
285
  auto_order_cancel_minimum_rebill_value == o.auto_order_cancel_minimum_rebill_value &&
266
286
  auto_order_downgrade_items == o.auto_order_downgrade_items &&
267
287
  auto_order_paused == o.auto_order_paused &&
@@ -287,7 +307,7 @@ module UltracartClient
287
307
  # Calculates hash code according to all attributes.
288
308
  # @return [Fixnum] Hash code
289
309
  def hash
290
- [auth_future_amount, auth_test_amount, auto_order_cancel_charge_minimum_balance, auto_order_cancel_item_id, auto_order_cancel_item_oid, auto_order_cancel_minimum_life_time_value, auto_order_cancel_minimum_rebill_value, auto_order_downgrade_items, auto_order_paused, auto_order_prohibit_expiring_cards, auto_order_schedules, auto_order_upgrade_items, auto_order_upsell, auto_order_upsell_no_easy_cancel, auto_order_upsell_one_per_customer, auto_orderable, cancel_other_auto_orders, free_shipping_auto_order, refund_other_auto_orders, steps].hash
310
+ [auth_future_amount, auth_test_amount, auto_order_cancel_charge_minimum_balance, auto_order_cancel_item_id, auto_order_cancel_item_oid, auto_order_cancel_minimum_life_time_count, auto_order_cancel_minimum_life_time_value, auto_order_cancel_minimum_rebill_count, auto_order_cancel_minimum_rebill_value, auto_order_downgrade_items, auto_order_paused, auto_order_prohibit_expiring_cards, auto_order_schedules, auto_order_upgrade_items, auto_order_upsell, auto_order_upsell_no_easy_cancel, auto_order_upsell_one_per_customer, auto_orderable, cancel_other_auto_orders, free_shipping_auto_order, refund_other_auto_orders, steps].hash
291
311
  end
292
312
 
293
313
  # Builds the object from hash
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.139'
14
+ VERSION = '3.10.140'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -40,6 +40,8 @@ require 'ultracart_api/models/api_user_application_profile'
40
40
  require 'ultracart_api/models/apply_library_item_request'
41
41
  require 'ultracart_api/models/apply_library_item_response'
42
42
  require 'ultracart_api/models/auto_order'
43
+ require 'ultracart_api/models/auto_order_addon_item'
44
+ require 'ultracart_api/models/auto_order_addon_item_option'
43
45
  require 'ultracart_api/models/auto_order_item'
44
46
  require 'ultracart_api/models/auto_order_item_future_schedule'
45
47
  require 'ultracart_api/models/auto_order_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.139
4
+ version: 3.10.140
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -245,6 +245,8 @@ files:
245
245
  - docs/ApplyLibraryItemRequest.md
246
246
  - docs/ApplyLibraryItemResponse.md
247
247
  - docs/AutoOrder.md
248
+ - docs/AutoOrderAddonItem.md
249
+ - docs/AutoOrderAddonItemOption.md
248
250
  - docs/AutoOrderApi.md
249
251
  - docs/AutoOrderItem.md
250
252
  - docs/AutoOrderItemFutureSchedule.md
@@ -1064,6 +1066,8 @@ files:
1064
1066
  - lib/ultracart_api/models/apply_library_item_request.rb
1065
1067
  - lib/ultracart_api/models/apply_library_item_response.rb
1066
1068
  - lib/ultracart_api/models/auto_order.rb
1069
+ - lib/ultracart_api/models/auto_order_addon_item.rb
1070
+ - lib/ultracart_api/models/auto_order_addon_item_option.rb
1067
1071
  - lib/ultracart_api/models/auto_order_item.rb
1068
1072
  - lib/ultracart_api/models/auto_order_item_future_schedule.rb
1069
1073
  - lib/ultracart_api/models/auto_order_item_option.rb