ultracart_api 3.1.37 → 3.1.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +109 -4
  3. data/docs/CouponTierAmount.md +1 -0
  4. data/docs/CouponTierPercent.md +1 -0
  5. data/docs/CouponTierQuantityAmount.md +1 -0
  6. data/docs/CouponTierQuantityPercent.md +1 -0
  7. data/docs/CouponTieredPercentOffShipping.md +1 -0
  8. data/docs/Item.md +1 -1
  9. data/docs/LibraryItemAttribute.md +1 -0
  10. data/docs/OrderApi.md +1 -1
  11. data/docs/OrderSummary.md +1 -0
  12. data/docs/ScreenRecordingFilterPageView.md +1 -0
  13. data/docs/ScreenRecordingFilterValuesPageView.md +1 -0
  14. data/docs/ScreenRecordingHeatmap.md +19 -0
  15. data/docs/ScreenRecordingHeatmapIndexResponse.md +12 -0
  16. data/docs/ScreenRecordingHeatmapRequest.md +9 -0
  17. data/docs/ScreenRecordingHeatmapReset.md +8 -0
  18. data/docs/ScreenRecordingHeatmapResponse.md +12 -0
  19. data/docs/ScreenRecordingHeatmapUrl.md +12 -0
  20. data/docs/ScreenRecordingPageView.md +1 -0
  21. data/docs/StorefrontApi.md +158 -0
  22. data/docs/WebhookLog.md +1 -0
  23. data/lib/ultracart_api.rb +6 -0
  24. data/lib/ultracart_api/api/order_api.rb +2 -2
  25. data/lib/ultracart_api/api/storefront_api.rb +176 -0
  26. data/lib/ultracart_api/models/coupon_tier_amount.rb +26 -1
  27. data/lib/ultracart_api/models/coupon_tier_percent.rb +26 -1
  28. data/lib/ultracart_api/models/coupon_tier_quantity_amount.rb +29 -4
  29. data/lib/ultracart_api/models/coupon_tier_quantity_percent.rb +29 -4
  30. data/lib/ultracart_api/models/coupon_tiered_percent_off_shipping.rb +26 -1
  31. data/lib/ultracart_api/models/item.rb +8 -8
  32. data/lib/ultracart_api/models/library_item_attribute.rb +10 -1
  33. data/lib/ultracart_api/models/order_summary.rb +10 -1
  34. data/lib/ultracart_api/models/screen_recording_filter_page_view.rb +10 -1
  35. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +12 -1
  36. data/lib/ultracart_api/models/screen_recording_heatmap.rb +283 -0
  37. data/lib/ultracart_api/models/screen_recording_heatmap_index_response.rb +223 -0
  38. data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +193 -0
  39. data/lib/ultracart_api/models/screen_recording_heatmap_reset.rb +184 -0
  40. data/lib/ultracart_api/models/screen_recording_heatmap_response.rb +221 -0
  41. data/lib/ultracart_api/models/screen_recording_heatmap_url.rb +222 -0
  42. data/lib/ultracart_api/models/screen_recording_page_view.rb +10 -1
  43. data/lib/ultracart_api/models/webhook_log.rb +11 -1
  44. data/lib/ultracart_api/version.rb +1 -1
  45. metadata +14 -2
@@ -20,11 +20,15 @@ module UltracartClient
20
20
  # The quantity of item purchased (in units)
21
21
  attr_accessor :item_quantity
22
22
 
23
+ # Quickbooks accounting code.
24
+ attr_accessor :quickbooks_code
25
+
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
26
29
  :'discount_percent' => :'discount_percent',
27
- :'item_quantity' => :'item_quantity'
30
+ :'item_quantity' => :'item_quantity',
31
+ :'quickbooks_code' => :'quickbooks_code'
28
32
  }
29
33
  end
30
34
 
@@ -32,7 +36,8 @@ module UltracartClient
32
36
  def self.swagger_types
33
37
  {
34
38
  :'discount_percent' => :'Float',
35
- :'item_quantity' => :'Integer'
39
+ :'item_quantity' => :'Integer',
40
+ :'quickbooks_code' => :'String'
36
41
  }
37
42
  end
38
43
 
@@ -51,28 +56,48 @@ module UltracartClient
51
56
  if attributes.has_key?(:'item_quantity')
52
57
  self.item_quantity = attributes[:'item_quantity']
53
58
  end
59
+
60
+ if attributes.has_key?(:'quickbooks_code')
61
+ self.quickbooks_code = attributes[:'quickbooks_code']
62
+ end
54
63
  end
55
64
 
56
65
  # Show invalid properties with the reasons. Usually used together with valid?
57
66
  # @return Array for valid properties with the reasons
58
67
  def list_invalid_properties
59
68
  invalid_properties = Array.new
69
+ if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
70
+ invalid_properties.push('invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.')
71
+ end
72
+
60
73
  invalid_properties
61
74
  end
62
75
 
63
76
  # Check to see if the all the properties in the model are valid
64
77
  # @return true if the model is valid
65
78
  def valid?
79
+ return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
66
80
  true
67
81
  end
68
82
 
83
+ # Custom attribute writer method with validation
84
+ # @param [Object] quickbooks_code Value to be assigned
85
+ def quickbooks_code=(quickbooks_code)
86
+ if !quickbooks_code.nil? && quickbooks_code.to_s.length > 20
87
+ fail ArgumentError, 'invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.'
88
+ end
89
+
90
+ @quickbooks_code = quickbooks_code
91
+ end
92
+
69
93
  # Checks equality by comparing each attribute.
70
94
  # @param [Object] Object to be compared
71
95
  def ==(o)
72
96
  return true if self.equal?(o)
73
97
  self.class == o.class &&
74
98
  discount_percent == o.discount_percent &&
75
- item_quantity == o.item_quantity
99
+ item_quantity == o.item_quantity &&
100
+ quickbooks_code == o.quickbooks_code
76
101
  end
77
102
 
78
103
  # @see the `==` method
@@ -84,7 +109,7 @@ module UltracartClient
84
109
  # Calculates hash code according to all attributes.
85
110
  # @return [Fixnum] Hash code
86
111
  def hash
87
- [discount_percent, item_quantity].hash
112
+ [discount_percent, item_quantity, quickbooks_code].hash
88
113
  end
89
114
 
90
115
  # Builds the object from hash
@@ -14,6 +14,9 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class CouponTieredPercentOffShipping
17
+ # Quickbooks accounting code.
18
+ attr_accessor :quickbooks_code
19
+
17
20
  # One or more shipping methods that may receive this discount
18
21
  attr_accessor :shipping_methods
19
22
 
@@ -23,6 +26,7 @@ module UltracartClient
23
26
  # Attribute mapping from ruby-style variable name to JSON key.
24
27
  def self.attribute_map
25
28
  {
29
+ :'quickbooks_code' => :'quickbooks_code',
26
30
  :'shipping_methods' => :'shipping_methods',
27
31
  :'tiers' => :'tiers'
28
32
  }
@@ -31,6 +35,7 @@ module UltracartClient
31
35
  # Attribute type mapping.
32
36
  def self.swagger_types
33
37
  {
38
+ :'quickbooks_code' => :'String',
34
39
  :'shipping_methods' => :'Array<String>',
35
40
  :'tiers' => :'Array<CouponTierPercent>'
36
41
  }
@@ -44,6 +49,10 @@ module UltracartClient
44
49
  # convert string to symbol for hash key
45
50
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
46
51
 
52
+ if attributes.has_key?(:'quickbooks_code')
53
+ self.quickbooks_code = attributes[:'quickbooks_code']
54
+ end
55
+
47
56
  if attributes.has_key?(:'shipping_methods')
48
57
  if (value = attributes[:'shipping_methods']).is_a?(Array)
49
58
  self.shipping_methods = value
@@ -61,20 +70,36 @@ module UltracartClient
61
70
  # @return Array for valid properties with the reasons
62
71
  def list_invalid_properties
63
72
  invalid_properties = Array.new
73
+ if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
74
+ invalid_properties.push('invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.')
75
+ end
76
+
64
77
  invalid_properties
65
78
  end
66
79
 
67
80
  # Check to see if the all the properties in the model are valid
68
81
  # @return true if the model is valid
69
82
  def valid?
83
+ return false if !@quickbooks_code.nil? && @quickbooks_code.to_s.length > 20
70
84
  true
71
85
  end
72
86
 
87
+ # Custom attribute writer method with validation
88
+ # @param [Object] quickbooks_code Value to be assigned
89
+ def quickbooks_code=(quickbooks_code)
90
+ if !quickbooks_code.nil? && quickbooks_code.to_s.length > 20
91
+ fail ArgumentError, 'invalid value for "quickbooks_code", the character length must be smaller than or equal to 20.'
92
+ end
93
+
94
+ @quickbooks_code = quickbooks_code
95
+ end
96
+
73
97
  # Checks equality by comparing each attribute.
74
98
  # @param [Object] Object to be compared
75
99
  def ==(o)
76
100
  return true if self.equal?(o)
77
101
  self.class == o.class &&
102
+ quickbooks_code == o.quickbooks_code &&
78
103
  shipping_methods == o.shipping_methods &&
79
104
  tiers == o.tiers
80
105
  end
@@ -88,7 +113,7 @@ module UltracartClient
88
113
  # Calculates hash code according to all attributes.
89
114
  # @return [Fixnum] Hash code
90
115
  def hash
91
- [shipping_methods, tiers].hash
116
+ [quickbooks_code, shipping_methods, tiers].hash
92
117
  end
93
118
 
94
119
  # Builds the object from hash
@@ -23,7 +23,7 @@ module UltracartClient
23
23
  attr_accessor :ccbill
24
24
 
25
25
  # Channel Partner Item Mapping
26
- attr_accessor :channel_partner_mappings
26
+ attr_accessor :channel_partner_item_mappings
27
27
 
28
28
  attr_accessor :chargeback
29
29
 
@@ -140,7 +140,7 @@ module UltracartClient
140
140
  :'amember' => :'amember',
141
141
  :'auto_order' => :'auto_order',
142
142
  :'ccbill' => :'ccbill',
143
- :'channel_partner_mappings' => :'channelPartnerMappings',
143
+ :'channel_partner_item_mappings' => :'channel_partner_item_mappings',
144
144
  :'chargeback' => :'chargeback',
145
145
  :'checkout' => :'checkout',
146
146
  :'content' => :'content',
@@ -196,7 +196,7 @@ module UltracartClient
196
196
  :'amember' => :'ItemAmember',
197
197
  :'auto_order' => :'ItemAutoOrder',
198
198
  :'ccbill' => :'ItemCCBill',
199
- :'channel_partner_mappings' => :'Array<ItemChannelPartnerMapping>',
199
+ :'channel_partner_item_mappings' => :'Array<ItemChannelPartnerMapping>',
200
200
  :'chargeback' => :'ItemChargeback',
201
201
  :'checkout' => :'ItemCheckout',
202
202
  :'content' => :'ItemContent',
@@ -269,9 +269,9 @@ module UltracartClient
269
269
  self.ccbill = attributes[:'ccbill']
270
270
  end
271
271
 
272
- if attributes.has_key?(:'channelPartnerMappings')
273
- if (value = attributes[:'channelPartnerMappings']).is_a?(Array)
274
- self.channel_partner_mappings = value
272
+ if attributes.has_key?(:'channel_partner_item_mappings')
273
+ if (value = attributes[:'channel_partner_item_mappings']).is_a?(Array)
274
+ self.channel_partner_item_mappings = value
275
275
  end
276
276
  end
277
277
 
@@ -533,7 +533,7 @@ module UltracartClient
533
533
  amember == o.amember &&
534
534
  auto_order == o.auto_order &&
535
535
  ccbill == o.ccbill &&
536
- channel_partner_mappings == o.channel_partner_mappings &&
536
+ channel_partner_item_mappings == o.channel_partner_item_mappings &&
537
537
  chargeback == o.chargeback &&
538
538
  checkout == o.checkout &&
539
539
  content == o.content &&
@@ -590,7 +590,7 @@ module UltracartClient
590
590
  # Calculates hash code according to all attributes.
591
591
  # @return [Fixnum] Hash code
592
592
  def hash
593
- [accounting, amember, auto_order, ccbill, channel_partner_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
593
+ [accounting, amember, auto_order, ccbill, channel_partner_item_mappings, chargeback, checkout, content, creation_dts, description, description_translated_text_instance_oid, digital_delivery, ebay, email_notifications, enrollment123, gift_certificate, google_product_search, identifiers, inactive, instant_payment_notifications, internal, kit, kit_component_only, kit_definition, last_modified_dts, merchant_id, merchant_item_id, merchant_item_oid, options, parent_category_id, parent_category_path, payment_processing, physical, pricing, properties, realtime_pricing, recommend_replenishment_days, related, reporting, restriction, revguard, reviews, salesforce, shipping, tags, tax, third_party_email_marketing, variant_items, variations, wishlist_member].hash
594
594
  end
595
595
 
596
596
  # Builds the object from hash
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class LibraryItemAttribute
17
+ attr_accessor :library_item_oid
18
+
17
19
  attr_accessor :name
18
20
 
19
21
  attr_accessor :value
@@ -21,6 +23,7 @@ module UltracartClient
21
23
  # Attribute mapping from ruby-style variable name to JSON key.
22
24
  def self.attribute_map
23
25
  {
26
+ :'library_item_oid' => :'libraryItemOid',
24
27
  :'name' => :'name',
25
28
  :'value' => :'value'
26
29
  }
@@ -29,6 +32,7 @@ module UltracartClient
29
32
  # Attribute type mapping.
30
33
  def self.swagger_types
31
34
  {
35
+ :'library_item_oid' => :'Integer',
32
36
  :'name' => :'String',
33
37
  :'value' => :'String'
34
38
  }
@@ -42,6 +46,10 @@ module UltracartClient
42
46
  # convert string to symbol for hash key
43
47
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
48
 
49
+ if attributes.has_key?(:'libraryItemOid')
50
+ self.library_item_oid = attributes[:'libraryItemOid']
51
+ end
52
+
45
53
  if attributes.has_key?(:'name')
46
54
  self.name = attributes[:'name']
47
55
  end
@@ -69,6 +77,7 @@ module UltracartClient
69
77
  def ==(o)
70
78
  return true if self.equal?(o)
71
79
  self.class == o.class &&
80
+ library_item_oid == o.library_item_oid &&
72
81
  name == o.name &&
73
82
  value == o.value
74
83
  end
@@ -82,7 +91,7 @@ module UltracartClient
82
91
  # Calculates hash code according to all attributes.
83
92
  # @return [Fixnum] Hash code
84
93
  def hash
85
- [name, value].hash
94
+ [library_item_oid, name, value].hash
86
95
  end
87
96
 
88
97
  # Builds the object from hash
@@ -16,6 +16,8 @@ module UltracartClient
16
16
  class OrderSummary
17
17
  attr_accessor :actual_fulfillment
18
18
 
19
+ attr_accessor :actual_payment_processing
20
+
19
21
  attr_accessor :actual_shipping
20
22
 
21
23
  attr_accessor :arbitrary_shipping_handling_total
@@ -52,6 +54,7 @@ module UltracartClient
52
54
  def self.attribute_map
53
55
  {
54
56
  :'actual_fulfillment' => :'actual_fulfillment',
57
+ :'actual_payment_processing' => :'actual_payment_processing',
55
58
  :'actual_shipping' => :'actual_shipping',
56
59
  :'arbitrary_shipping_handling_total' => :'arbitrary_shipping_handling_total',
57
60
  :'other_refunded' => :'other_refunded',
@@ -75,6 +78,7 @@ module UltracartClient
75
78
  def self.swagger_types
76
79
  {
77
80
  :'actual_fulfillment' => :'Currency',
81
+ :'actual_payment_processing' => :'Currency',
78
82
  :'actual_shipping' => :'Currency',
79
83
  :'arbitrary_shipping_handling_total' => :'Currency',
80
84
  :'other_refunded' => :'Currency',
@@ -106,6 +110,10 @@ module UltracartClient
106
110
  self.actual_fulfillment = attributes[:'actual_fulfillment']
107
111
  end
108
112
 
113
+ if attributes.has_key?(:'actual_payment_processing')
114
+ self.actual_payment_processing = attributes[:'actual_payment_processing']
115
+ end
116
+
109
117
  if attributes.has_key?(:'actual_shipping')
110
118
  self.actual_shipping = attributes[:'actual_shipping']
111
119
  end
@@ -190,6 +198,7 @@ module UltracartClient
190
198
  return true if self.equal?(o)
191
199
  self.class == o.class &&
192
200
  actual_fulfillment == o.actual_fulfillment &&
201
+ actual_payment_processing == o.actual_payment_processing &&
193
202
  actual_shipping == o.actual_shipping &&
194
203
  arbitrary_shipping_handling_total == o.arbitrary_shipping_handling_total &&
195
204
  other_refunded == o.other_refunded &&
@@ -217,7 +226,7 @@ module UltracartClient
217
226
  # Calculates hash code according to all attributes.
218
227
  # @return [Fixnum] Hash code
219
228
  def hash
220
- [actual_fulfillment, actual_shipping, arbitrary_shipping_handling_total, 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
229
+ [actual_fulfillment, actual_payment_processing, actual_shipping, arbitrary_shipping_handling_total, 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
221
230
  end
222
231
 
223
232
  # Builds the object from hash
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ScreenRecordingFilterPageView
17
+ attr_accessor :domain
18
+
17
19
  attr_accessor :events
18
20
 
19
21
  attr_accessor :params
@@ -31,6 +33,7 @@ module UltracartClient
31
33
  # Attribute mapping from ruby-style variable name to JSON key.
32
34
  def self.attribute_map
33
35
  {
36
+ :'domain' => :'domain',
34
37
  :'events' => :'events',
35
38
  :'params' => :'params',
36
39
  :'referrer' => :'referrer',
@@ -44,6 +47,7 @@ module UltracartClient
44
47
  # Attribute type mapping.
45
48
  def self.swagger_types
46
49
  {
50
+ :'domain' => :'ScreenRecordingFilterStringSearch',
47
51
  :'events' => :'Array<ScreenRecordingFilterPageViewEvent>',
48
52
  :'params' => :'Array<ScreenRecordingFilterPageViewParam>',
49
53
  :'referrer' => :'ScreenRecordingFilterStringSearch',
@@ -62,6 +66,10 @@ module UltracartClient
62
66
  # convert string to symbol for hash key
63
67
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
68
 
69
+ if attributes.has_key?(:'domain')
70
+ self.domain = attributes[:'domain']
71
+ end
72
+
65
73
  if attributes.has_key?(:'events')
66
74
  if (value = attributes[:'events']).is_a?(Array)
67
75
  self.events = value
@@ -115,6 +123,7 @@ module UltracartClient
115
123
  def ==(o)
116
124
  return true if self.equal?(o)
117
125
  self.class == o.class &&
126
+ domain == o.domain &&
118
127
  events == o.events &&
119
128
  params == o.params &&
120
129
  referrer == o.referrer &&
@@ -133,7 +142,7 @@ module UltracartClient
133
142
  # Calculates hash code according to all attributes.
134
143
  # @return [Fixnum] Hash code
135
144
  def hash
136
- [events, params, referrer, referrer_params, referrer_raw, time_on_page, url].hash
145
+ [domain, events, params, referrer, referrer_params, referrer_raw, time_on_page, url].hash
137
146
  end
138
147
 
139
148
  # Builds the object from hash
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ScreenRecordingFilterValuesPageView
17
+ attr_accessor :domains
18
+
17
19
  attr_accessor :events
18
20
 
19
21
  attr_accessor :page_params
@@ -27,6 +29,7 @@ module UltracartClient
27
29
  # Attribute mapping from ruby-style variable name to JSON key.
28
30
  def self.attribute_map
29
31
  {
32
+ :'domains' => :'domains',
30
33
  :'events' => :'events',
31
34
  :'page_params' => :'page_params',
32
35
  :'time_on_page_max' => :'time_on_page_max',
@@ -38,6 +41,7 @@ module UltracartClient
38
41
  # Attribute type mapping.
39
42
  def self.swagger_types
40
43
  {
44
+ :'domains' => :'Array<String>',
41
45
  :'events' => :'Array<ScreenRecordingFilterValuesEvent>',
42
46
  :'page_params' => :'Array<ScreenRecordingFilterValuesPageParam>',
43
47
  :'time_on_page_max' => :'Integer',
@@ -54,6 +58,12 @@ module UltracartClient
54
58
  # convert string to symbol for hash key
55
59
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
60
 
61
+ if attributes.has_key?(:'domains')
62
+ if (value = attributes[:'domains']).is_a?(Array)
63
+ self.domains = value
64
+ end
65
+ end
66
+
57
67
  if attributes.has_key?(:'events')
58
68
  if (value = attributes[:'events']).is_a?(Array)
59
69
  self.events = value
@@ -99,6 +109,7 @@ module UltracartClient
99
109
  def ==(o)
100
110
  return true if self.equal?(o)
101
111
  self.class == o.class &&
112
+ domains == o.domains &&
102
113
  events == o.events &&
103
114
  page_params == o.page_params &&
104
115
  time_on_page_max == o.time_on_page_max &&
@@ -115,7 +126,7 @@ module UltracartClient
115
126
  # Calculates hash code according to all attributes.
116
127
  # @return [Fixnum] Hash code
117
128
  def hash
118
- [events, page_params, time_on_page_max, time_on_page_min, urls].hash
129
+ [domains, events, page_params, time_on_page_max, time_on_page_min, urls].hash
119
130
  end
120
131
 
121
132
  # Builds the object from hash
@@ -0,0 +1,283 @@
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 ScreenRecordingHeatmap
17
+ attr_accessor :large_click_url
18
+
19
+ attr_accessor :large_movement_url
20
+
21
+ attr_accessor :large_regular_url
22
+
23
+ attr_accessor :large_scroll_url
24
+
25
+ attr_accessor :medium_click_url
26
+
27
+ attr_accessor :medium_movement_url
28
+
29
+ attr_accessor :medium_regular_url
30
+
31
+ attr_accessor :medium_scroll_url
32
+
33
+ attr_accessor :small_click_url
34
+
35
+ attr_accessor :small_movement_url
36
+
37
+ attr_accessor :small_regular_url
38
+
39
+ attr_accessor :small_scroll_url
40
+
41
+ # Attribute mapping from ruby-style variable name to JSON key.
42
+ def self.attribute_map
43
+ {
44
+ :'large_click_url' => :'large_click_url',
45
+ :'large_movement_url' => :'large_movement_url',
46
+ :'large_regular_url' => :'large_regular_url',
47
+ :'large_scroll_url' => :'large_scroll_url',
48
+ :'medium_click_url' => :'medium_click_url',
49
+ :'medium_movement_url' => :'medium_movement_url',
50
+ :'medium_regular_url' => :'medium_regular_url',
51
+ :'medium_scroll_url' => :'medium_scroll_url',
52
+ :'small_click_url' => :'small_click_url',
53
+ :'small_movement_url' => :'small_movement_url',
54
+ :'small_regular_url' => :'small_regular_url',
55
+ :'small_scroll_url' => :'small_scroll_url'
56
+ }
57
+ end
58
+
59
+ # Attribute type mapping.
60
+ def self.swagger_types
61
+ {
62
+ :'large_click_url' => :'String',
63
+ :'large_movement_url' => :'String',
64
+ :'large_regular_url' => :'String',
65
+ :'large_scroll_url' => :'String',
66
+ :'medium_click_url' => :'String',
67
+ :'medium_movement_url' => :'String',
68
+ :'medium_regular_url' => :'String',
69
+ :'medium_scroll_url' => :'String',
70
+ :'small_click_url' => :'String',
71
+ :'small_movement_url' => :'String',
72
+ :'small_regular_url' => :'String',
73
+ :'small_scroll_url' => :'String'
74
+ }
75
+ end
76
+
77
+ # Initializes the object
78
+ # @param [Hash] attributes Model attributes in the form of hash
79
+ def initialize(attributes = {})
80
+ return unless attributes.is_a?(Hash)
81
+
82
+ # convert string to symbol for hash key
83
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
84
+
85
+ if attributes.has_key?(:'large_click_url')
86
+ self.large_click_url = attributes[:'large_click_url']
87
+ end
88
+
89
+ if attributes.has_key?(:'large_movement_url')
90
+ self.large_movement_url = attributes[:'large_movement_url']
91
+ end
92
+
93
+ if attributes.has_key?(:'large_regular_url')
94
+ self.large_regular_url = attributes[:'large_regular_url']
95
+ end
96
+
97
+ if attributes.has_key?(:'large_scroll_url')
98
+ self.large_scroll_url = attributes[:'large_scroll_url']
99
+ end
100
+
101
+ if attributes.has_key?(:'medium_click_url')
102
+ self.medium_click_url = attributes[:'medium_click_url']
103
+ end
104
+
105
+ if attributes.has_key?(:'medium_movement_url')
106
+ self.medium_movement_url = attributes[:'medium_movement_url']
107
+ end
108
+
109
+ if attributes.has_key?(:'medium_regular_url')
110
+ self.medium_regular_url = attributes[:'medium_regular_url']
111
+ end
112
+
113
+ if attributes.has_key?(:'medium_scroll_url')
114
+ self.medium_scroll_url = attributes[:'medium_scroll_url']
115
+ end
116
+
117
+ if attributes.has_key?(:'small_click_url')
118
+ self.small_click_url = attributes[:'small_click_url']
119
+ end
120
+
121
+ if attributes.has_key?(:'small_movement_url')
122
+ self.small_movement_url = attributes[:'small_movement_url']
123
+ end
124
+
125
+ if attributes.has_key?(:'small_regular_url')
126
+ self.small_regular_url = attributes[:'small_regular_url']
127
+ end
128
+
129
+ if attributes.has_key?(:'small_scroll_url')
130
+ self.small_scroll_url = attributes[:'small_scroll_url']
131
+ end
132
+ end
133
+
134
+ # Show invalid properties with the reasons. Usually used together with valid?
135
+ # @return Array for valid properties with the reasons
136
+ def list_invalid_properties
137
+ invalid_properties = Array.new
138
+ invalid_properties
139
+ end
140
+
141
+ # Check to see if the all the properties in the model are valid
142
+ # @return true if the model is valid
143
+ def valid?
144
+ true
145
+ end
146
+
147
+ # Checks equality by comparing each attribute.
148
+ # @param [Object] Object to be compared
149
+ def ==(o)
150
+ return true if self.equal?(o)
151
+ self.class == o.class &&
152
+ large_click_url == o.large_click_url &&
153
+ large_movement_url == o.large_movement_url &&
154
+ large_regular_url == o.large_regular_url &&
155
+ large_scroll_url == o.large_scroll_url &&
156
+ medium_click_url == o.medium_click_url &&
157
+ medium_movement_url == o.medium_movement_url &&
158
+ medium_regular_url == o.medium_regular_url &&
159
+ medium_scroll_url == o.medium_scroll_url &&
160
+ small_click_url == o.small_click_url &&
161
+ small_movement_url == o.small_movement_url &&
162
+ small_regular_url == o.small_regular_url &&
163
+ small_scroll_url == o.small_scroll_url
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Fixnum] Hash code
174
+ def hash
175
+ [large_click_url, large_movement_url, large_regular_url, large_scroll_url, medium_click_url, medium_movement_url, medium_regular_url, medium_scroll_url, small_click_url, small_movement_url, small_regular_url, small_scroll_url].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def build_from_hash(attributes)
182
+ return nil unless attributes.is_a?(Hash)
183
+ self.class.swagger_types.each_pair do |key, type|
184
+ if type =~ /\AArray<(.*)>/i
185
+ # check to ensure the input is an array given that the attribute
186
+ # is documented as an array but the input is not
187
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
188
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
189
+ end
190
+ elsif !attributes[self.class.attribute_map[key]].nil?
191
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
192
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
193
+ end
194
+
195
+ self
196
+ end
197
+
198
+ # Deserializes the data based on type
199
+ # @param string type Data type
200
+ # @param string value Value to be deserialized
201
+ # @return [Object] Deserialized data
202
+ def _deserialize(type, value)
203
+ case type.to_sym
204
+ when :DateTime
205
+ DateTime.parse(value)
206
+ when :Date
207
+ Date.parse(value)
208
+ when :String
209
+ value.to_s
210
+ when :Integer
211
+ value.to_i
212
+ when :Float
213
+ value.to_f
214
+ when :BOOLEAN
215
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
216
+ true
217
+ else
218
+ false
219
+ end
220
+ when :Object
221
+ # generic object (usually a Hash), return directly
222
+ value
223
+ when /\AArray<(?<inner_type>.+)>\z/
224
+ inner_type = Regexp.last_match[:inner_type]
225
+ value.map { |v| _deserialize(inner_type, v) }
226
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
227
+ k_type = Regexp.last_match[:k_type]
228
+ v_type = Regexp.last_match[:v_type]
229
+ {}.tap do |hash|
230
+ value.each do |k, v|
231
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
232
+ end
233
+ end
234
+ else # model
235
+ temp_model = UltracartClient.const_get(type).new
236
+ temp_model.build_from_hash(value)
237
+ end
238
+ end
239
+
240
+ # Returns the string representation of the object
241
+ # @return [String] String presentation of the object
242
+ def to_s
243
+ to_hash.to_s
244
+ end
245
+
246
+ # to_body is an alias to to_hash (backward compatibility)
247
+ # @return [Hash] Returns the object in the form of hash
248
+ def to_body
249
+ to_hash
250
+ end
251
+
252
+ # Returns the object in the form of hash
253
+ # @return [Hash] Returns the object in the form of hash
254
+ def to_hash
255
+ hash = {}
256
+ self.class.attribute_map.each_pair do |attr, param|
257
+ value = self.send(attr)
258
+ next if value.nil?
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ # Outputs non-array value in the form of hash
265
+ # For object, use to_hash. Otherwise, just return the value
266
+ # @param [Object] value Any valid value
267
+ # @return [Hash] Returns the value in the form of hash
268
+ def _to_hash(value)
269
+ if value.is_a?(Array)
270
+ value.compact.map { |v| _to_hash(v) }
271
+ elsif value.is_a?(Hash)
272
+ {}.tap do |hash|
273
+ value.each { |k, v| hash[k] = _to_hash(v) }
274
+ end
275
+ elsif value.respond_to? :to_hash
276
+ value.to_hash
277
+ else
278
+ value
279
+ end
280
+ end
281
+
282
+ end
283
+ end