ultracart_api 4.0.240 → 4.0.242

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.
@@ -24,6 +24,9 @@ module UltracartClient
24
24
 
25
25
  attr_accessor :helpful_yes_votes
26
26
 
27
+ # Merchant Reply (set to an empty string to remove)
28
+ attr_accessor :merchant_reply
29
+
27
30
  attr_accessor :order_id
28
31
 
29
32
  attr_accessor :overall
@@ -137,6 +140,7 @@ module UltracartClient
137
140
  :'featured' => :'featured',
138
141
  :'helperful_no_votes' => :'helperful_no_votes',
139
142
  :'helpful_yes_votes' => :'helpful_yes_votes',
143
+ :'merchant_reply' => :'merchant_reply',
140
144
  :'order_id' => :'order_id',
141
145
  :'overall' => :'overall',
142
146
  :'rating_name1' => :'rating_name1',
@@ -185,6 +189,7 @@ module UltracartClient
185
189
  :'featured' => :'Boolean',
186
190
  :'helperful_no_votes' => :'Integer',
187
191
  :'helpful_yes_votes' => :'Integer',
192
+ :'merchant_reply' => :'String',
188
193
  :'order_id' => :'String',
189
194
  :'overall' => :'Float',
190
195
  :'rating_name1' => :'String',
@@ -258,6 +263,10 @@ module UltracartClient
258
263
  self.helpful_yes_votes = attributes[:'helpful_yes_votes']
259
264
  end
260
265
 
266
+ if attributes.key?(:'merchant_reply')
267
+ self.merchant_reply = attributes[:'merchant_reply']
268
+ end
269
+
261
270
  if attributes.key?(:'order_id')
262
271
  self.order_id = attributes[:'order_id']
263
272
  end
@@ -395,6 +404,10 @@ module UltracartClient
395
404
  # @return Array for valid properties with the reasons
396
405
  def list_invalid_properties
397
406
  invalid_properties = Array.new
407
+ if !@merchant_reply.nil? && @merchant_reply.to_s.length > 10000
408
+ invalid_properties.push('invalid value for "merchant_reply", the character length must be smaller than or equal to 10000.')
409
+ end
410
+
398
411
  if !@rating_name1.nil? && @rating_name1.to_s.length > 100
399
412
  invalid_properties.push('invalid value for "rating_name1", the character length must be smaller than or equal to 100.')
400
413
  end
@@ -465,6 +478,7 @@ module UltracartClient
465
478
  # Check to see if the all the properties in the model are valid
466
479
  # @return true if the model is valid
467
480
  def valid?
481
+ return false if !@merchant_reply.nil? && @merchant_reply.to_s.length > 10000
468
482
  return false if !@rating_name1.nil? && @rating_name1.to_s.length > 100
469
483
  return false if !@rating_name10.nil? && @rating_name10.to_s.length > 100
470
484
  return false if !@rating_name2.nil? && @rating_name2.to_s.length > 100
@@ -486,6 +500,16 @@ module UltracartClient
486
500
  true
487
501
  end
488
502
 
503
+ # Custom attribute writer method with validation
504
+ # @param [Object] merchant_reply Value to be assigned
505
+ def merchant_reply=(merchant_reply)
506
+ if !merchant_reply.nil? && merchant_reply.to_s.length > 10000
507
+ fail ArgumentError, 'invalid value for "merchant_reply", the character length must be smaller than or equal to 10000.'
508
+ end
509
+
510
+ @merchant_reply = merchant_reply
511
+ end
512
+
489
513
  # Custom attribute writer method with validation
490
514
  # @param [Object] rating_name1 Value to be assigned
491
515
  def rating_name1=(rating_name1)
@@ -665,6 +689,7 @@ module UltracartClient
665
689
  featured == o.featured &&
666
690
  helperful_no_votes == o.helperful_no_votes &&
667
691
  helpful_yes_votes == o.helpful_yes_votes &&
692
+ merchant_reply == o.merchant_reply &&
668
693
  order_id == o.order_id &&
669
694
  overall == o.overall &&
670
695
  rating_name1 == o.rating_name1 &&
@@ -709,7 +734,7 @@ module UltracartClient
709
734
  # Calculates hash code according to all attributes.
710
735
  # @return [Integer] Hash code
711
736
  def hash
712
- [customer_profile_oid, featured, helperful_no_votes, helpful_yes_votes, order_id, overall, rating_name1, rating_name10, rating_name2, rating_name3, rating_name4, rating_name5, rating_name6, rating_name7, rating_name8, rating_name9, rating_score1, rating_score10, rating_score2, rating_score3, rating_score4, rating_score5, rating_score6, rating_score7, rating_score8, rating_score9, recommend_store_to_friend, recommend_to_friend, review, review_oid, reviewed_nickname, reviewer_email, reviewer_location, status, store_feedback, submitted_dts, title].hash
737
+ [customer_profile_oid, featured, helperful_no_votes, helpful_yes_votes, merchant_reply, order_id, overall, rating_name1, rating_name10, rating_name2, rating_name3, rating_name4, rating_name5, rating_name6, rating_name7, rating_name8, rating_name9, rating_score1, rating_score10, rating_score2, rating_score3, rating_score4, rating_score5, rating_score6, rating_score7, rating_score8, rating_score9, recommend_store_to_friend, recommend_to_friend, review, review_oid, reviewed_nickname, reviewer_email, reviewer_location, status, store_feedback, submitted_dts, title].hash
713
738
  end
714
739
 
715
740
  # Builds the object from hash
@@ -40,6 +40,9 @@ module UltracartClient
40
40
  # Current stage that the order is in.
41
41
  attr_accessor :current_stage
42
42
 
43
+ # History of the changes to the current_stage field
44
+ attr_accessor :current_stage_histories
45
+
43
46
  attr_accessor :customer_profile
44
47
 
45
48
  attr_accessor :digital_order
@@ -143,6 +146,7 @@ module UltracartClient
143
146
  :'creation_dts' => :'creation_dts',
144
147
  :'currency_code' => :'currency_code',
145
148
  :'current_stage' => :'current_stage',
149
+ :'current_stage_histories' => :'current_stage_histories',
146
150
  :'customer_profile' => :'customer_profile',
147
151
  :'digital_order' => :'digital_order',
148
152
  :'edi' => :'edi',
@@ -192,6 +196,7 @@ module UltracartClient
192
196
  :'creation_dts' => :'String',
193
197
  :'currency_code' => :'String',
194
198
  :'current_stage' => :'String',
199
+ :'current_stage_histories' => :'Array<OrderCurrentStageHistory>',
195
200
  :'customer_profile' => :'Customer',
196
201
  :'digital_order' => :'OrderDigitalOrder',
197
202
  :'edi' => :'OrderEdi',
@@ -288,6 +293,12 @@ module UltracartClient
288
293
  self.current_stage = attributes[:'current_stage']
289
294
  end
290
295
 
296
+ if attributes.key?(:'current_stage_histories')
297
+ if (value = attributes[:'current_stage_histories']).is_a?(Array)
298
+ self.current_stage_histories = value
299
+ end
300
+ end
301
+
291
302
  if attributes.key?(:'customer_profile')
292
303
  self.customer_profile = attributes[:'customer_profile']
293
304
  end
@@ -479,6 +490,7 @@ module UltracartClient
479
490
  creation_dts == o.creation_dts &&
480
491
  currency_code == o.currency_code &&
481
492
  current_stage == o.current_stage &&
493
+ current_stage_histories == o.current_stage_histories &&
482
494
  customer_profile == o.customer_profile &&
483
495
  digital_order == o.digital_order &&
484
496
  edi == o.edi &&
@@ -518,7 +530,7 @@ module UltracartClient
518
530
  # Calculates hash code according to all attributes.
519
531
  # @return [Integer] Hash code
520
532
  def hash
521
- [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, refund_reason, reject_dts, reject_reason, salesforce, shipping, summary, tags, taxes, utms].hash
533
+ [affiliates, auto_order, billing, buysafe, channel_partner, checkout, coupons, creation_dts, currency_code, current_stage, current_stage_histories, customer_profile, digital_order, edi, exchange_rate, fraud_score, gift, gift_certificate, internal, items, language_iso_code, linked_shipment, marketing, merchant_id, order_id, payment, point_of_sale, properties, quote, refund_dts, refund_reason, reject_dts, reject_reason, salesforce, shipping, summary, tags, taxes, utms].hash
522
534
  end
523
535
 
524
536
  # Builds the object from hash
@@ -0,0 +1,286 @@
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 OrderCurrentStageHistory
18
+ # New stage that the order is in.
19
+ attr_accessor :after_stage
20
+
21
+ # Previous stage that the order was in.
22
+ attr_accessor :before_stage
23
+
24
+ # Date/time that the stage transitioned
25
+ attr_accessor :transition_dts
26
+
27
+ class EnumAttributeValidator
28
+ attr_reader :datatype
29
+ attr_reader :allowable_values
30
+
31
+ def initialize(datatype, allowable_values)
32
+ @allowable_values = allowable_values.map do |value|
33
+ case datatype.to_s
34
+ when /Integer/i
35
+ value.to_i
36
+ when /Float/i
37
+ value.to_f
38
+ else
39
+ value
40
+ end
41
+ end
42
+ end
43
+
44
+ def valid?(value)
45
+ !value || allowable_values.include?(value)
46
+ end
47
+ end
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'after_stage' => :'after_stage',
53
+ :'before_stage' => :'before_stage',
54
+ :'transition_dts' => :'transition_dts'
55
+ }
56
+ end
57
+
58
+ # Returns all the JSON keys this model knows about
59
+ def self.acceptable_attributes
60
+ attribute_map.values
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'after_stage' => :'String',
67
+ :'before_stage' => :'String',
68
+ :'transition_dts' => :'String'
69
+ }
70
+ end
71
+
72
+ # List of attributes with nullable: true
73
+ def self.openapi_nullable
74
+ Set.new([
75
+ ])
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ if (!attributes.is_a?(Hash))
82
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderCurrentStageHistory` initialize method"
83
+ end
84
+
85
+ # check to see if the attribute exists and convert string to symbol for hash key
86
+ attributes = attributes.each_with_object({}) { |(k, v), h|
87
+ if (!self.class.attribute_map.key?(k.to_sym))
88
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderCurrentStageHistory`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
89
+ end
90
+ h[k.to_sym] = v
91
+ }
92
+
93
+ if attributes.key?(:'after_stage')
94
+ self.after_stage = attributes[:'after_stage']
95
+ end
96
+
97
+ if attributes.key?(:'before_stage')
98
+ self.before_stage = attributes[:'before_stage']
99
+ end
100
+
101
+ if attributes.key?(:'transition_dts')
102
+ self.transition_dts = attributes[:'transition_dts']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ after_stage_validator = EnumAttributeValidator.new('String', ["Accounts Receivable", "Pending Clearance", "Fraud Review", "Rejected", "Shipping Department", "Completed Order", "Quote Request", "Quote Sent", "Least Cost Routing", "Unknown", "Pre-ordered", "Advanced Order Routing", "Hold"])
117
+ return false unless after_stage_validator.valid?(@after_stage)
118
+ before_stage_validator = EnumAttributeValidator.new('String', ["Accounts Receivable", "Pending Clearance", "Fraud Review", "Rejected", "Shipping Department", "Completed Order", "Quote Request", "Quote Sent", "Least Cost Routing", "Unknown", "Pre-ordered", "Advanced Order Routing", "Hold"])
119
+ return false unless before_stage_validator.valid?(@before_stage)
120
+ true
121
+ end
122
+
123
+ # Custom attribute writer method checking allowed values (enum).
124
+ # @param [Object] after_stage Object to be assigned
125
+ def after_stage=(after_stage)
126
+ validator = EnumAttributeValidator.new('String', ["Accounts Receivable", "Pending Clearance", "Fraud Review", "Rejected", "Shipping Department", "Completed Order", "Quote Request", "Quote Sent", "Least Cost Routing", "Unknown", "Pre-ordered", "Advanced Order Routing", "Hold"])
127
+ unless validator.valid?(after_stage)
128
+ fail ArgumentError, "invalid value for \"after_stage\", must be one of #{validator.allowable_values}."
129
+ end
130
+ @after_stage = after_stage
131
+ end
132
+
133
+ # Custom attribute writer method checking allowed values (enum).
134
+ # @param [Object] before_stage Object to be assigned
135
+ def before_stage=(before_stage)
136
+ validator = EnumAttributeValidator.new('String', ["Accounts Receivable", "Pending Clearance", "Fraud Review", "Rejected", "Shipping Department", "Completed Order", "Quote Request", "Quote Sent", "Least Cost Routing", "Unknown", "Pre-ordered", "Advanced Order Routing", "Hold"])
137
+ unless validator.valid?(before_stage)
138
+ fail ArgumentError, "invalid value for \"before_stage\", must be one of #{validator.allowable_values}."
139
+ end
140
+ @before_stage = before_stage
141
+ end
142
+
143
+ # Checks equality by comparing each attribute.
144
+ # @param [Object] Object to be compared
145
+ def ==(o)
146
+ return true if self.equal?(o)
147
+ self.class == o.class &&
148
+ after_stage == o.after_stage &&
149
+ before_stage == o.before_stage &&
150
+ transition_dts == o.transition_dts
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [after_stage, before_stage, transition_dts].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ attributes = attributes.transform_keys(&:to_sym)
178
+ self.class.openapi_types.each_pair do |key, type|
179
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
180
+ self.send("#{key}=", nil)
181
+ elsif type =~ /\AArray<(.*)>/i
182
+ # check to ensure the input is an array given that the attribute
183
+ # is documented as an array but the input is not
184
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
185
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ end
187
+ elsif !attributes[self.class.attribute_map[key]].nil?
188
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
189
+ end
190
+ end
191
+
192
+ self
193
+ end
194
+
195
+ # Deserializes the data based on type
196
+ # @param string type Data type
197
+ # @param string value Value to be deserialized
198
+ # @return [Object] Deserialized data
199
+ def _deserialize(type, value)
200
+ case type.to_sym
201
+ when :Time
202
+ Time.parse(value)
203
+ when :Date
204
+ Date.parse(value)
205
+ when :String
206
+ value.to_s
207
+ when :Integer
208
+ value.to_i
209
+ when :Float
210
+ value.to_f
211
+ when :Boolean
212
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
213
+ true
214
+ else
215
+ false
216
+ end
217
+ when :Object
218
+ # generic object (usually a Hash), return directly
219
+ value
220
+ when /\AArray<(?<inner_type>.+)>\z/
221
+ inner_type = Regexp.last_match[:inner_type]
222
+ value.map { |v| _deserialize(inner_type, v) }
223
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
224
+ k_type = Regexp.last_match[:k_type]
225
+ v_type = Regexp.last_match[:v_type]
226
+ {}.tap do |hash|
227
+ value.each do |k, v|
228
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
229
+ end
230
+ end
231
+ else # model
232
+ # models (e.g. Pet) or oneOf
233
+ klass = UltracartClient.const_get(type)
234
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
235
+ end
236
+ end
237
+
238
+ # Returns the string representation of the object
239
+ # @return [String] String presentation of the object
240
+ def to_s
241
+ to_hash.to_s
242
+ end
243
+
244
+ # to_body is an alias to to_hash (backward compatibility)
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_body
247
+ to_hash
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ if value.nil?
257
+ is_nullable = self.class.openapi_nullable.include?(attr)
258
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
259
+ end
260
+
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ # Outputs non-array value in the form of hash
267
+ # For object, use to_hash. Otherwise, just return the value
268
+ # @param [Object] value Any valid value
269
+ # @return [Hash] Returns the value in the form of hash
270
+ def _to_hash(value)
271
+ if value.is_a?(Array)
272
+ value.compact.map { |v| _to_hash(v) }
273
+ elsif value.is_a?(Hash)
274
+ {}.tap do |hash|
275
+ value.each { |k, v| hash[k] = _to_hash(v) }
276
+ end
277
+ elsif value.respond_to? :to_hash
278
+ value.to_hash
279
+ else
280
+ value
281
+ end
282
+ end
283
+
284
+ end
285
+
286
+ end
@@ -21,6 +21,8 @@ module UltracartClient
21
21
  # Activation codes assigned to this item
22
22
  attr_accessor :activation_codes
23
23
 
24
+ attr_accessor :actual_cogs
25
+
24
26
  attr_accessor :arbitrary_unit_cost
25
27
 
26
28
  # Date/time of the last rebill, used only during order insert to help project future rebills
@@ -224,6 +226,7 @@ module UltracartClient
224
226
  {
225
227
  :'accounting_code' => :'accounting_code',
226
228
  :'activation_codes' => :'activation_codes',
229
+ :'actual_cogs' => :'actual_cogs',
227
230
  :'arbitrary_unit_cost' => :'arbitrary_unit_cost',
228
231
  :'auto_order_last_rebill_dts' => :'auto_order_last_rebill_dts',
229
232
  :'auto_order_schedule' => :'auto_order_schedule',
@@ -300,6 +303,7 @@ module UltracartClient
300
303
  {
301
304
  :'accounting_code' => :'String',
302
305
  :'activation_codes' => :'Array<String>',
306
+ :'actual_cogs' => :'Currency',
303
307
  :'arbitrary_unit_cost' => :'Currency',
304
308
  :'auto_order_last_rebill_dts' => :'String',
305
309
  :'auto_order_schedule' => :'String',
@@ -397,6 +401,10 @@ module UltracartClient
397
401
  end
398
402
  end
399
403
 
404
+ if attributes.key?(:'actual_cogs')
405
+ self.actual_cogs = attributes[:'actual_cogs']
406
+ end
407
+
400
408
  if attributes.key?(:'arbitrary_unit_cost')
401
409
  self.arbitrary_unit_cost = attributes[:'arbitrary_unit_cost']
402
410
  end
@@ -853,6 +861,7 @@ module UltracartClient
853
861
  self.class == o.class &&
854
862
  accounting_code == o.accounting_code &&
855
863
  activation_codes == o.activation_codes &&
864
+ actual_cogs == o.actual_cogs &&
856
865
  arbitrary_unit_cost == o.arbitrary_unit_cost &&
857
866
  auto_order_last_rebill_dts == o.auto_order_last_rebill_dts &&
858
867
  auto_order_schedule == o.auto_order_schedule &&
@@ -927,7 +936,7 @@ module UltracartClient
927
936
  # Calculates hash code according to all attributes.
928
937
  # @return [Integer] Hash code
929
938
  def hash
930
- [accounting_code, activation_codes, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, barcode_gtin12, barcode_gtin14, barcode_upc11, barcode_upc12, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, refund_reason, return_reason, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
939
+ [accounting_code, activation_codes, actual_cogs, arbitrary_unit_cost, auto_order_last_rebill_dts, auto_order_schedule, barcode, barcode_gtin12, barcode_gtin14, barcode_upc11, barcode_upc12, channel_partner_item_id, cogs, component_unit_value, cost, country_code_of_origin, customs_description, description, discount, discount_quantity, discount_shipping_weight, distribution_center_code, edi, exclude_coupon, free_shipping, hazmat, height, item_index, item_reference_oid, kit, kit_component, length, manufacturer_sku, max_days_time_in_transit, merchant_item_id, mix_and_match_group_name, mix_and_match_group_oid, no_shipping_discount, options, packed_by_user, parent_item_index, parent_merchant_item_id, perishable_class, pricing_tier_name, properties, quantity, quantity_refunded, quickbooks_class, refund_reason, return_reason, ship_separately, shipped_by_user, shipped_dts, shipping_status, special_product_type, tags, tax_free, tax_product_type, taxable_cost, total_cost_with_discount, total_refunded, transmitted_to_distribution_center_dts, unit_cost_with_discount, upsell, weight, width].hash
931
940
  end
932
941
 
933
942
  # Builds the object from hash
@@ -17,8 +17,18 @@ module UltracartClient
17
17
  class OrderSummary
18
18
  attr_accessor :actual_fulfillment
19
19
 
20
+ attr_accessor :actual_other_cost
21
+
20
22
  attr_accessor :actual_payment_processing
21
23
 
24
+ attr_accessor :actual_profit
25
+
26
+ # Actual profit has been analyzed
27
+ attr_accessor :actual_profit_analyzed
28
+
29
+ # Actual profit needs review
30
+ attr_accessor :actual_profit_review
31
+
22
32
  attr_accessor :actual_shipping
23
33
 
24
34
  attr_accessor :arbitrary_shipping_handling_total
@@ -63,7 +73,11 @@ module UltracartClient
63
73
  def self.attribute_map
64
74
  {
65
75
  :'actual_fulfillment' => :'actual_fulfillment',
76
+ :'actual_other_cost' => :'actual_other_cost',
66
77
  :'actual_payment_processing' => :'actual_payment_processing',
78
+ :'actual_profit' => :'actual_profit',
79
+ :'actual_profit_analyzed' => :'actual_profit_analyzed',
80
+ :'actual_profit_review' => :'actual_profit_review',
67
81
  :'actual_shipping' => :'actual_shipping',
68
82
  :'arbitrary_shipping_handling_total' => :'arbitrary_shipping_handling_total',
69
83
  :'health_benefit_card_amount' => :'health_benefit_card_amount',
@@ -96,7 +110,11 @@ module UltracartClient
96
110
  def self.openapi_types
97
111
  {
98
112
  :'actual_fulfillment' => :'Currency',
113
+ :'actual_other_cost' => :'Currency',
99
114
  :'actual_payment_processing' => :'Currency',
115
+ :'actual_profit' => :'Currency',
116
+ :'actual_profit_analyzed' => :'Boolean',
117
+ :'actual_profit_review' => :'Boolean',
100
118
  :'actual_shipping' => :'Currency',
101
119
  :'arbitrary_shipping_handling_total' => :'Currency',
102
120
  :'health_benefit_card_amount' => :'Currency',
@@ -145,10 +163,26 @@ module UltracartClient
145
163
  self.actual_fulfillment = attributes[:'actual_fulfillment']
146
164
  end
147
165
 
166
+ if attributes.key?(:'actual_other_cost')
167
+ self.actual_other_cost = attributes[:'actual_other_cost']
168
+ end
169
+
148
170
  if attributes.key?(:'actual_payment_processing')
149
171
  self.actual_payment_processing = attributes[:'actual_payment_processing']
150
172
  end
151
173
 
174
+ if attributes.key?(:'actual_profit')
175
+ self.actual_profit = attributes[:'actual_profit']
176
+ end
177
+
178
+ if attributes.key?(:'actual_profit_analyzed')
179
+ self.actual_profit_analyzed = attributes[:'actual_profit_analyzed']
180
+ end
181
+
182
+ if attributes.key?(:'actual_profit_review')
183
+ self.actual_profit_review = attributes[:'actual_profit_review']
184
+ end
185
+
152
186
  if attributes.key?(:'actual_shipping')
153
187
  self.actual_shipping = attributes[:'actual_shipping']
154
188
  end
@@ -249,7 +283,11 @@ module UltracartClient
249
283
  return true if self.equal?(o)
250
284
  self.class == o.class &&
251
285
  actual_fulfillment == o.actual_fulfillment &&
286
+ actual_other_cost == o.actual_other_cost &&
252
287
  actual_payment_processing == o.actual_payment_processing &&
288
+ actual_profit == o.actual_profit &&
289
+ actual_profit_analyzed == o.actual_profit_analyzed &&
290
+ actual_profit_review == o.actual_profit_review &&
253
291
  actual_shipping == o.actual_shipping &&
254
292
  arbitrary_shipping_handling_total == o.arbitrary_shipping_handling_total &&
255
293
  health_benefit_card_amount == o.health_benefit_card_amount &&
@@ -281,7 +319,7 @@ module UltracartClient
281
319
  # Calculates hash code according to all attributes.
282
320
  # @return [Integer] Hash code
283
321
  def hash
284
- [actual_fulfillment, actual_payment_processing, actual_shipping, arbitrary_shipping_handling_total, health_benefit_card_amount, health_benefit_card_refunded, internal_gift_certificate_amount, internal_gift_certificate_refunded, other_refunded, shipping_handling_refunded, shipping_handling_total, shipping_handling_total_discount, subtotal, subtotal_discount, subtotal_discount_refunded, subtotal_refunded, tax, tax_refunded, taxable_subtotal, taxable_subtotal_discount, total, total_refunded].hash
322
+ [actual_fulfillment, actual_other_cost, actual_payment_processing, actual_profit, actual_profit_analyzed, actual_profit_review, actual_shipping, arbitrary_shipping_handling_total, health_benefit_card_amount, health_benefit_card_refunded, internal_gift_certificate_amount, internal_gift_certificate_refunded, other_refunded, shipping_handling_refunded, shipping_handling_total, shipping_handling_total_discount, subtotal, subtotal_discount, subtotal_discount_refunded, subtotal_refunded, tax, tax_refunded, taxable_subtotal, taxable_subtotal_discount, total, total_refunded].hash
285
323
  end
286
324
 
287
325
  # Builds the object from hash
@@ -14,26 +14,16 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module UltracartClient
17
- class WebhookSampleRequest
18
- # Request
19
- attr_accessor :request
17
+ class WebhookReflow
18
+ attr_accessor :event_name
20
19
 
21
- # Request headers
22
- attr_accessor :request_headers
23
-
24
- # Request id
25
- attr_accessor :request_id
26
-
27
- # URI to send request to
28
- attr_accessor :uri
20
+ attr_accessor :queued
29
21
 
30
22
  # Attribute mapping from ruby-style variable name to JSON key.
31
23
  def self.attribute_map
32
24
  {
33
- :'request' => :'request',
34
- :'request_headers' => :'request_headers',
35
- :'request_id' => :'request_id',
36
- :'uri' => :'uri'
25
+ :'event_name' => :'event_name',
26
+ :'queued' => :'queued'
37
27
  }
38
28
  end
39
29
 
@@ -45,10 +35,8 @@ module UltracartClient
45
35
  # Attribute type mapping.
46
36
  def self.openapi_types
47
37
  {
48
- :'request' => :'String',
49
- :'request_headers' => :'Array<HTTPHeader>',
50
- :'request_id' => :'String',
51
- :'uri' => :'String'
38
+ :'event_name' => :'String',
39
+ :'queued' => :'Boolean'
52
40
  }
53
41
  end
54
42
 
@@ -62,33 +50,23 @@ module UltracartClient
62
50
  # @param [Hash] attributes Model attributes in the form of hash
63
51
  def initialize(attributes = {})
64
52
  if (!attributes.is_a?(Hash))
65
- fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::WebhookSampleRequest` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::WebhookReflow` initialize method"
66
54
  end
67
55
 
68
56
  # check to see if the attribute exists and convert string to symbol for hash key
69
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
70
58
  if (!self.class.attribute_map.key?(k.to_sym))
71
- fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::WebhookSampleRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::WebhookReflow`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
60
  end
73
61
  h[k.to_sym] = v
74
62
  }
75
63
 
76
- if attributes.key?(:'request')
77
- self.request = attributes[:'request']
78
- end
79
-
80
- if attributes.key?(:'request_headers')
81
- if (value = attributes[:'request_headers']).is_a?(Array)
82
- self.request_headers = value
83
- end
84
- end
85
-
86
- if attributes.key?(:'request_id')
87
- self.request_id = attributes[:'request_id']
64
+ if attributes.key?(:'event_name')
65
+ self.event_name = attributes[:'event_name']
88
66
  end
89
67
 
90
- if attributes.key?(:'uri')
91
- self.uri = attributes[:'uri']
68
+ if attributes.key?(:'queued')
69
+ self.queued = attributes[:'queued']
92
70
  end
93
71
  end
94
72
 
@@ -110,10 +88,8 @@ module UltracartClient
110
88
  def ==(o)
111
89
  return true if self.equal?(o)
112
90
  self.class == o.class &&
113
- request == o.request &&
114
- request_headers == o.request_headers &&
115
- request_id == o.request_id &&
116
- uri == o.uri
91
+ event_name == o.event_name &&
92
+ queued == o.queued
117
93
  end
118
94
 
119
95
  # @see the `==` method
@@ -125,7 +101,7 @@ module UltracartClient
125
101
  # Calculates hash code according to all attributes.
126
102
  # @return [Integer] Hash code
127
103
  def hash
128
- [request, request_headers, request_id, uri].hash
104
+ [event_name, queued].hash
129
105
  end
130
106
 
131
107
  # Builds the object from hash