ultracart_api 3.10.82 → 3.10.83

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: ac41750d5917a3eb8e82104b1346deb324f4ce7c0ffa863be8761e857bdfc2de
4
- data.tar.gz: be31bc969b93330a832818f48af3c52ad313d3780d33d93a532064195dd8920f
3
+ metadata.gz: 3f9861b7b08df849bc2db24b1a7b4810fd9ddad3b674f5b0b7eb4c39c26c4b05
4
+ data.tar.gz: d52f5231010245d2d78d84fa72460ced53f05834bd89d97088d754b21165a192
5
5
  SHA512:
6
- metadata.gz: '044318b54d553a9207d79741cc7013d047755db045944326132345366cb008f52606e8eac9bfddf8628b1fa64dbc5a7c304ae466095379b7258b7793bcd097fd'
7
- data.tar.gz: 48f8711b008df4dcb1cc532bfc22dbc2964f777f5da344e83adb133658816e8a3d72ed3043a259d1a3a1b0e58a8693ebed71770b7b411116ef774bccb345bd3b
6
+ metadata.gz: f3c835a52ff5e056143d6e756e60d059672135e0085df3c73210601bb9439449ef7a6d5ab3955f515d2591801af5398cb4ba4db4be43205f704dd0ab1a567632
7
+ data.tar.gz: 0263f337c65ce160ae4a29aafaa7505c3c486f3a50cf509aeb9d1dcb5f91a0d1ff5f407f518ec32f2421c9d922ad51d8260067cfc84fd4318db61e2a8fd08351
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.82
10
+ - Package version: 3.10.83
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.82.gem
27
+ gem install ./ultracart_api-3.10.83.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.82.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.83.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.82'
35
+ gem 'ultracart_api', '~> 3.10.83'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -610,6 +610,8 @@ Class | Method | HTTP request | Description
610
610
  - [UltracartClient::ConversationDepartmentsResponse](docs/ConversationDepartmentsResponse.md)
611
611
  - [UltracartClient::ConversationEngagement](docs/ConversationEngagement.md)
612
612
  - [UltracartClient::ConversationEngagementEquation](docs/ConversationEngagementEquation.md)
613
+ - [UltracartClient::ConversationEngagementEquationFunction](docs/ConversationEngagementEquationFunction.md)
614
+ - [UltracartClient::ConversationEngagementEquationGroup](docs/ConversationEngagementEquationGroup.md)
613
615
  - [UltracartClient::ConversationEngagementResponse](docs/ConversationEngagementResponse.md)
614
616
  - [UltracartClient::ConversationEngagementsResponse](docs/ConversationEngagementsResponse.md)
615
617
  - [UltracartClient::ConversationEventAddCoupon](docs/ConversationEventAddCoupon.md)
@@ -1258,6 +1260,7 @@ Not every change is committed to every SDK.
1258
1260
 
1259
1261
  | Version | Date | Comments |
1260
1262
  | --: | :-: | --- |
1263
+ | 3.10.83 | 12/20/2022 | conversation engagement update |
1261
1264
  | 3.10.82 | 12/15/2022 | conversation search - added start date filtering |
1262
1265
  | 3.10.81 | 12/15/2022 | conversation searching |
1263
1266
  | 3.10.80 | 12/13/2022 | conversations - add email and sms_phone to participant object |
@@ -9,6 +9,6 @@ Name | Type | Description | Notes
9
9
  **engagement_name** | **String** | | [optional]
10
10
  **equation** | [**ConversationEngagementEquation**](ConversationEngagementEquation.md) | | [optional]
11
11
  **time_on_page** | **Integer** | | [optional]
12
- **visitor_type** | **String** | | [optional]
12
+ **visitor_type** | **String** | The type of visitor | [optional]
13
13
 
14
14
 
@@ -3,5 +3,6 @@
3
3
  ## Properties
4
4
  Name | Type | Description | Notes
5
5
  ------------ | ------------- | ------------- | -------------
6
+ **groups** | [**Array<ConversationEngagementEquationGroup>**](ConversationEngagementEquationGroup.md) | | [optional]
6
7
 
7
8
 
@@ -0,0 +1,21 @@
1
+ # UltracartClient::ConversationEngagementEquationFunction
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **any_page_url_logic** | **String** | Logic operation to perform on an any page url function type | [optional]
7
+ **any_page_url_value** | **String** | | [optional]
8
+ **current_page_url_logic** | **String** | Logic operation to perform on a current page url function type | [optional]
9
+ **current_page_url_value** | **String** | | [optional]
10
+ **customers_browsing_time_logic** | **String** | Logic operation to perform on a customer's browsing time function type | [optional]
11
+ **customers_browsing_time_seconds** | **Integer** | | [optional]
12
+ **customers_location_country** | **String** | | [optional]
13
+ **customers_location_logic** | **String** | Logic operation to perform on a customer's location function type | [optional]
14
+ **customers_location_state** | **String** | | [optional]
15
+ **number_of_viewed_pages_logic** | **String** | Logic operation to perform on a customer's browsing time function type | [optional]
16
+ **number_of_viewed_pages_value** | **Integer** | | [optional]
17
+ **referring_website_logic** | **String** | Logic operation to perform on a referring website function type | [optional]
18
+ **referring_website_value** | **String** | | [optional]
19
+ **type** | **String** | Type of function | [optional]
20
+
21
+
@@ -0,0 +1,8 @@
1
+ # UltracartClient::ConversationEngagementEquationGroup
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **functions** | [**Array<ConversationEngagementEquationFunction>**](ConversationEngagementEquationFunction.md) | | [optional]
7
+
8
+
@@ -26,8 +26,31 @@ module UltracartClient
26
26
 
27
27
  attr_accessor :time_on_page
28
28
 
29
+ # The type of visitor
29
30
  attr_accessor :visitor_type
30
31
 
32
+ class EnumAttributeValidator
33
+ attr_reader :datatype
34
+ attr_reader :allowable_values
35
+
36
+ def initialize(datatype, allowable_values)
37
+ @allowable_values = allowable_values.map do |value|
38
+ case datatype.to_s
39
+ when /Integer/i
40
+ value.to_i
41
+ when /Float/i
42
+ value.to_f
43
+ else
44
+ value
45
+ end
46
+ end
47
+ end
48
+
49
+ def valid?(value)
50
+ !value || allowable_values.include?(value)
51
+ end
52
+ end
53
+
31
54
  # Attribute mapping from ruby-style variable name to JSON key.
32
55
  def self.attribute_map
33
56
  {
@@ -103,9 +126,21 @@ module UltracartClient
103
126
  # Check to see if the all the properties in the model are valid
104
127
  # @return true if the model is valid
105
128
  def valid?
129
+ visitor_type_validator = EnumAttributeValidator.new('String', ['all', 'first time', 'returning'])
130
+ return false unless visitor_type_validator.valid?(@visitor_type)
106
131
  true
107
132
  end
108
133
 
134
+ # Custom attribute writer method checking allowed values (enum).
135
+ # @param [Object] visitor_type Object to be assigned
136
+ def visitor_type=(visitor_type)
137
+ validator = EnumAttributeValidator.new('String', ['all', 'first time', 'returning'])
138
+ unless validator.valid?(visitor_type)
139
+ fail ArgumentError, 'invalid value for "visitor_type", must be one of #{validator.allowable_values}.'
140
+ end
141
+ @visitor_type = visitor_type
142
+ end
143
+
109
144
  # Checks equality by comparing each attribute.
110
145
  # @param [Object] Object to be compared
111
146
  def ==(o)
@@ -14,15 +14,19 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ConversationEngagementEquation
17
+ attr_accessor :groups
18
+
17
19
  # Attribute mapping from ruby-style variable name to JSON key.
18
20
  def self.attribute_map
19
21
  {
22
+ :'groups' => :'groups'
20
23
  }
21
24
  end
22
25
 
23
26
  # Attribute type mapping.
24
27
  def self.swagger_types
25
28
  {
29
+ :'groups' => :'Array<ConversationEngagementEquationGroup>'
26
30
  }
27
31
  end
28
32
 
@@ -33,6 +37,12 @@ module UltracartClient
33
37
 
34
38
  # convert string to symbol for hash key
35
39
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'groups')
42
+ if (value = attributes[:'groups']).is_a?(Array)
43
+ self.groups = value
44
+ end
45
+ end
36
46
  end
37
47
 
38
48
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -52,7 +62,8 @@ module UltracartClient
52
62
  # @param [Object] Object to be compared
53
63
  def ==(o)
54
64
  return true if self.equal?(o)
55
- self.class == o.class
65
+ self.class == o.class &&
66
+ groups == o.groups
56
67
  end
57
68
 
58
69
  # @see the `==` method
@@ -64,7 +75,7 @@ module UltracartClient
64
75
  # Calculates hash code according to all attributes.
65
76
  # @return [Fixnum] Hash code
66
77
  def hash
67
- [].hash
78
+ [groups].hash
68
79
  end
69
80
 
70
81
  # Builds the object from hash
@@ -0,0 +1,414 @@
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 ConversationEngagementEquationFunction
17
+ # Logic operation to perform on an any page url function type
18
+ attr_accessor :any_page_url_logic
19
+
20
+ attr_accessor :any_page_url_value
21
+
22
+ # Logic operation to perform on a current page url function type
23
+ attr_accessor :current_page_url_logic
24
+
25
+ attr_accessor :current_page_url_value
26
+
27
+ # Logic operation to perform on a customer's browsing time function type
28
+ attr_accessor :customers_browsing_time_logic
29
+
30
+ attr_accessor :customers_browsing_time_seconds
31
+
32
+ attr_accessor :customers_location_country
33
+
34
+ # Logic operation to perform on a customer's location function type
35
+ attr_accessor :customers_location_logic
36
+
37
+ attr_accessor :customers_location_state
38
+
39
+ # Logic operation to perform on a customer's browsing time function type
40
+ attr_accessor :number_of_viewed_pages_logic
41
+
42
+ attr_accessor :number_of_viewed_pages_value
43
+
44
+ # Logic operation to perform on a referring website function type
45
+ attr_accessor :referring_website_logic
46
+
47
+ attr_accessor :referring_website_value
48
+
49
+ # Type of function
50
+ attr_accessor :type
51
+
52
+ class EnumAttributeValidator
53
+ attr_reader :datatype
54
+ attr_reader :allowable_values
55
+
56
+ def initialize(datatype, allowable_values)
57
+ @allowable_values = allowable_values.map do |value|
58
+ case datatype.to_s
59
+ when /Integer/i
60
+ value.to_i
61
+ when /Float/i
62
+ value.to_f
63
+ else
64
+ value
65
+ end
66
+ end
67
+ end
68
+
69
+ def valid?(value)
70
+ !value || allowable_values.include?(value)
71
+ end
72
+ end
73
+
74
+ # Attribute mapping from ruby-style variable name to JSON key.
75
+ def self.attribute_map
76
+ {
77
+ :'any_page_url_logic' => :'any_page_url_logic',
78
+ :'any_page_url_value' => :'any_page_url_value',
79
+ :'current_page_url_logic' => :'current_page_url_logic',
80
+ :'current_page_url_value' => :'current_page_url_value',
81
+ :'customers_browsing_time_logic' => :'customers_browsing_time_logic',
82
+ :'customers_browsing_time_seconds' => :'customers_browsing_time_seconds',
83
+ :'customers_location_country' => :'customers_location_country',
84
+ :'customers_location_logic' => :'customers_location_logic',
85
+ :'customers_location_state' => :'customers_location_state',
86
+ :'number_of_viewed_pages_logic' => :'number_of_viewed_pages_logic',
87
+ :'number_of_viewed_pages_value' => :'number_of_viewed_pages_value',
88
+ :'referring_website_logic' => :'referring_website_logic',
89
+ :'referring_website_value' => :'referring_website_value',
90
+ :'type' => :'type'
91
+ }
92
+ end
93
+
94
+ # Attribute type mapping.
95
+ def self.swagger_types
96
+ {
97
+ :'any_page_url_logic' => :'String',
98
+ :'any_page_url_value' => :'String',
99
+ :'current_page_url_logic' => :'String',
100
+ :'current_page_url_value' => :'String',
101
+ :'customers_browsing_time_logic' => :'String',
102
+ :'customers_browsing_time_seconds' => :'Integer',
103
+ :'customers_location_country' => :'String',
104
+ :'customers_location_logic' => :'String',
105
+ :'customers_location_state' => :'String',
106
+ :'number_of_viewed_pages_logic' => :'String',
107
+ :'number_of_viewed_pages_value' => :'Integer',
108
+ :'referring_website_logic' => :'String',
109
+ :'referring_website_value' => :'String',
110
+ :'type' => :'String'
111
+ }
112
+ end
113
+
114
+ # Initializes the object
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ def initialize(attributes = {})
117
+ return unless attributes.is_a?(Hash)
118
+
119
+ # convert string to symbol for hash key
120
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
121
+
122
+ if attributes.has_key?(:'any_page_url_logic')
123
+ self.any_page_url_logic = attributes[:'any_page_url_logic']
124
+ end
125
+
126
+ if attributes.has_key?(:'any_page_url_value')
127
+ self.any_page_url_value = attributes[:'any_page_url_value']
128
+ end
129
+
130
+ if attributes.has_key?(:'current_page_url_logic')
131
+ self.current_page_url_logic = attributes[:'current_page_url_logic']
132
+ end
133
+
134
+ if attributes.has_key?(:'current_page_url_value')
135
+ self.current_page_url_value = attributes[:'current_page_url_value']
136
+ end
137
+
138
+ if attributes.has_key?(:'customers_browsing_time_logic')
139
+ self.customers_browsing_time_logic = attributes[:'customers_browsing_time_logic']
140
+ end
141
+
142
+ if attributes.has_key?(:'customers_browsing_time_seconds')
143
+ self.customers_browsing_time_seconds = attributes[:'customers_browsing_time_seconds']
144
+ end
145
+
146
+ if attributes.has_key?(:'customers_location_country')
147
+ self.customers_location_country = attributes[:'customers_location_country']
148
+ end
149
+
150
+ if attributes.has_key?(:'customers_location_logic')
151
+ self.customers_location_logic = attributes[:'customers_location_logic']
152
+ end
153
+
154
+ if attributes.has_key?(:'customers_location_state')
155
+ self.customers_location_state = attributes[:'customers_location_state']
156
+ end
157
+
158
+ if attributes.has_key?(:'number_of_viewed_pages_logic')
159
+ self.number_of_viewed_pages_logic = attributes[:'number_of_viewed_pages_logic']
160
+ end
161
+
162
+ if attributes.has_key?(:'number_of_viewed_pages_value')
163
+ self.number_of_viewed_pages_value = attributes[:'number_of_viewed_pages_value']
164
+ end
165
+
166
+ if attributes.has_key?(:'referring_website_logic')
167
+ self.referring_website_logic = attributes[:'referring_website_logic']
168
+ end
169
+
170
+ if attributes.has_key?(:'referring_website_value')
171
+ self.referring_website_value = attributes[:'referring_website_value']
172
+ end
173
+
174
+ if attributes.has_key?(:'type')
175
+ self.type = attributes[:'type']
176
+ end
177
+ end
178
+
179
+ # Show invalid properties with the reasons. Usually used together with valid?
180
+ # @return Array for valid properties with the reasons
181
+ def list_invalid_properties
182
+ invalid_properties = Array.new
183
+ invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+ any_page_url_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
190
+ return false unless any_page_url_logic_validator.valid?(@any_page_url_logic)
191
+ current_page_url_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
192
+ return false unless current_page_url_logic_validator.valid?(@current_page_url_logic)
193
+ customers_browsing_time_logic_validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
194
+ return false unless customers_browsing_time_logic_validator.valid?(@customers_browsing_time_logic)
195
+ customers_location_logic_validator = EnumAttributeValidator.new('String', ['is', 'is not'])
196
+ return false unless customers_location_logic_validator.valid?(@customers_location_logic)
197
+ number_of_viewed_pages_logic_validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
198
+ return false unless number_of_viewed_pages_logic_validator.valid?(@number_of_viewed_pages_logic)
199
+ referring_website_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
200
+ return false unless referring_website_logic_validator.valid?(@referring_website_logic)
201
+ type_validator = EnumAttributeValidator.new('String', ['current page url', 'customer's location', 'customer's browsing time', 'number of viewed pages', 'referring website address', 'any page from session'])
202
+ return false unless type_validator.valid?(@type)
203
+ true
204
+ end
205
+
206
+ # Custom attribute writer method checking allowed values (enum).
207
+ # @param [Object] any_page_url_logic Object to be assigned
208
+ def any_page_url_logic=(any_page_url_logic)
209
+ validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
210
+ unless validator.valid?(any_page_url_logic)
211
+ fail ArgumentError, 'invalid value for "any_page_url_logic", must be one of #{validator.allowable_values}.'
212
+ end
213
+ @any_page_url_logic = any_page_url_logic
214
+ end
215
+
216
+ # Custom attribute writer method checking allowed values (enum).
217
+ # @param [Object] current_page_url_logic Object to be assigned
218
+ def current_page_url_logic=(current_page_url_logic)
219
+ validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
220
+ unless validator.valid?(current_page_url_logic)
221
+ fail ArgumentError, 'invalid value for "current_page_url_logic", must be one of #{validator.allowable_values}.'
222
+ end
223
+ @current_page_url_logic = current_page_url_logic
224
+ end
225
+
226
+ # Custom attribute writer method checking allowed values (enum).
227
+ # @param [Object] customers_browsing_time_logic Object to be assigned
228
+ def customers_browsing_time_logic=(customers_browsing_time_logic)
229
+ validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
230
+ unless validator.valid?(customers_browsing_time_logic)
231
+ fail ArgumentError, 'invalid value for "customers_browsing_time_logic", must be one of #{validator.allowable_values}.'
232
+ end
233
+ @customers_browsing_time_logic = customers_browsing_time_logic
234
+ end
235
+
236
+ # Custom attribute writer method checking allowed values (enum).
237
+ # @param [Object] customers_location_logic Object to be assigned
238
+ def customers_location_logic=(customers_location_logic)
239
+ validator = EnumAttributeValidator.new('String', ['is', 'is not'])
240
+ unless validator.valid?(customers_location_logic)
241
+ fail ArgumentError, 'invalid value for "customers_location_logic", must be one of #{validator.allowable_values}.'
242
+ end
243
+ @customers_location_logic = customers_location_logic
244
+ end
245
+
246
+ # Custom attribute writer method checking allowed values (enum).
247
+ # @param [Object] number_of_viewed_pages_logic Object to be assigned
248
+ def number_of_viewed_pages_logic=(number_of_viewed_pages_logic)
249
+ validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
250
+ unless validator.valid?(number_of_viewed_pages_logic)
251
+ fail ArgumentError, 'invalid value for "number_of_viewed_pages_logic", must be one of #{validator.allowable_values}.'
252
+ end
253
+ @number_of_viewed_pages_logic = number_of_viewed_pages_logic
254
+ end
255
+
256
+ # Custom attribute writer method checking allowed values (enum).
257
+ # @param [Object] referring_website_logic Object to be assigned
258
+ def referring_website_logic=(referring_website_logic)
259
+ validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
260
+ unless validator.valid?(referring_website_logic)
261
+ fail ArgumentError, 'invalid value for "referring_website_logic", must be one of #{validator.allowable_values}.'
262
+ end
263
+ @referring_website_logic = referring_website_logic
264
+ end
265
+
266
+ # Custom attribute writer method checking allowed values (enum).
267
+ # @param [Object] type Object to be assigned
268
+ def type=(type)
269
+ validator = EnumAttributeValidator.new('String', ['current page url', 'customer's location', 'customer's browsing time', 'number of viewed pages', 'referring website address', 'any page from session'])
270
+ unless validator.valid?(type)
271
+ fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
272
+ end
273
+ @type = type
274
+ end
275
+
276
+ # Checks equality by comparing each attribute.
277
+ # @param [Object] Object to be compared
278
+ def ==(o)
279
+ return true if self.equal?(o)
280
+ self.class == o.class &&
281
+ any_page_url_logic == o.any_page_url_logic &&
282
+ any_page_url_value == o.any_page_url_value &&
283
+ current_page_url_logic == o.current_page_url_logic &&
284
+ current_page_url_value == o.current_page_url_value &&
285
+ customers_browsing_time_logic == o.customers_browsing_time_logic &&
286
+ customers_browsing_time_seconds == o.customers_browsing_time_seconds &&
287
+ customers_location_country == o.customers_location_country &&
288
+ customers_location_logic == o.customers_location_logic &&
289
+ customers_location_state == o.customers_location_state &&
290
+ number_of_viewed_pages_logic == o.number_of_viewed_pages_logic &&
291
+ number_of_viewed_pages_value == o.number_of_viewed_pages_value &&
292
+ referring_website_logic == o.referring_website_logic &&
293
+ referring_website_value == o.referring_website_value &&
294
+ type == o.type
295
+ end
296
+
297
+ # @see the `==` method
298
+ # @param [Object] Object to be compared
299
+ def eql?(o)
300
+ self == o
301
+ end
302
+
303
+ # Calculates hash code according to all attributes.
304
+ # @return [Fixnum] Hash code
305
+ def hash
306
+ [any_page_url_logic, any_page_url_value, current_page_url_logic, current_page_url_value, customers_browsing_time_logic, customers_browsing_time_seconds, customers_location_country, customers_location_logic, customers_location_state, number_of_viewed_pages_logic, number_of_viewed_pages_value, referring_website_logic, referring_website_value, type].hash
307
+ end
308
+
309
+ # Builds the object from hash
310
+ # @param [Hash] attributes Model attributes in the form of hash
311
+ # @return [Object] Returns the model itself
312
+ def build_from_hash(attributes)
313
+ return nil unless attributes.is_a?(Hash)
314
+ self.class.swagger_types.each_pair do |key, type|
315
+ if type =~ /\AArray<(.*)>/i
316
+ # check to ensure the input is an array given that the attribute
317
+ # is documented as an array but the input is not
318
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
319
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
320
+ end
321
+ elsif !attributes[self.class.attribute_map[key]].nil?
322
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
323
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
324
+ end
325
+
326
+ self
327
+ end
328
+
329
+ # Deserializes the data based on type
330
+ # @param string type Data type
331
+ # @param string value Value to be deserialized
332
+ # @return [Object] Deserialized data
333
+ def _deserialize(type, value)
334
+ case type.to_sym
335
+ when :DateTime
336
+ DateTime.parse(value)
337
+ when :Date
338
+ Date.parse(value)
339
+ when :String
340
+ value.to_s
341
+ when :Integer
342
+ value.to_i
343
+ when :Float
344
+ value.to_f
345
+ when :BOOLEAN
346
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
347
+ true
348
+ else
349
+ false
350
+ end
351
+ when :Object
352
+ # generic object (usually a Hash), return directly
353
+ value
354
+ when /\AArray<(?<inner_type>.+)>\z/
355
+ inner_type = Regexp.last_match[:inner_type]
356
+ value.map { |v| _deserialize(inner_type, v) }
357
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
358
+ k_type = Regexp.last_match[:k_type]
359
+ v_type = Regexp.last_match[:v_type]
360
+ {}.tap do |hash|
361
+ value.each do |k, v|
362
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
363
+ end
364
+ end
365
+ else # model
366
+ temp_model = UltracartClient.const_get(type).new
367
+ temp_model.build_from_hash(value)
368
+ end
369
+ end
370
+
371
+ # Returns the string representation of the object
372
+ # @return [String] String presentation of the object
373
+ def to_s
374
+ to_hash.to_s
375
+ end
376
+
377
+ # to_body is an alias to to_hash (backward compatibility)
378
+ # @return [Hash] Returns the object in the form of hash
379
+ def to_body
380
+ to_hash
381
+ end
382
+
383
+ # Returns the object in the form of hash
384
+ # @return [Hash] Returns the object in the form of hash
385
+ def to_hash
386
+ hash = {}
387
+ self.class.attribute_map.each_pair do |attr, param|
388
+ value = self.send(attr)
389
+ next if value.nil?
390
+ hash[param] = _to_hash(value)
391
+ end
392
+ hash
393
+ end
394
+
395
+ # Outputs non-array value in the form of hash
396
+ # For object, use to_hash. Otherwise, just return the value
397
+ # @param [Object] value Any valid value
398
+ # @return [Hash] Returns the value in the form of hash
399
+ def _to_hash(value)
400
+ if value.is_a?(Array)
401
+ value.compact.map { |v| _to_hash(v) }
402
+ elsif value.is_a?(Hash)
403
+ {}.tap do |hash|
404
+ value.each { |k, v| hash[k] = _to_hash(v) }
405
+ end
406
+ elsif value.respond_to? :to_hash
407
+ value.to_hash
408
+ else
409
+ value
410
+ end
411
+ end
412
+
413
+ end
414
+ end
@@ -0,0 +1,186 @@
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 ConversationEngagementEquationGroup
17
+ attr_accessor :functions
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'functions' => :'functions'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'functions' => :'Array<ConversationEngagementEquationFunction>'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'functions')
42
+ if (value = attributes[:'functions']).is_a?(Array)
43
+ self.functions = value
44
+ end
45
+ end
46
+ end
47
+
48
+ # Show invalid properties with the reasons. Usually used together with valid?
49
+ # @return Array for valid properties with the reasons
50
+ def list_invalid_properties
51
+ invalid_properties = Array.new
52
+ invalid_properties
53
+ end
54
+
55
+ # Check to see if the all the properties in the model are valid
56
+ # @return true if the model is valid
57
+ def valid?
58
+ true
59
+ end
60
+
61
+ # Checks equality by comparing each attribute.
62
+ # @param [Object] Object to be compared
63
+ def ==(o)
64
+ return true if self.equal?(o)
65
+ self.class == o.class &&
66
+ functions == o.functions
67
+ end
68
+
69
+ # @see the `==` method
70
+ # @param [Object] Object to be compared
71
+ def eql?(o)
72
+ self == o
73
+ end
74
+
75
+ # Calculates hash code according to all attributes.
76
+ # @return [Fixnum] Hash code
77
+ def hash
78
+ [functions].hash
79
+ end
80
+
81
+ # Builds the object from hash
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ # @return [Object] Returns the model itself
84
+ def build_from_hash(attributes)
85
+ return nil unless attributes.is_a?(Hash)
86
+ self.class.swagger_types.each_pair do |key, type|
87
+ if type =~ /\AArray<(.*)>/i
88
+ # check to ensure the input is an array given that the attribute
89
+ # is documented as an array but the input is not
90
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
91
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
92
+ end
93
+ elsif !attributes[self.class.attribute_map[key]].nil?
94
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
95
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
96
+ end
97
+
98
+ self
99
+ end
100
+
101
+ # Deserializes the data based on type
102
+ # @param string type Data type
103
+ # @param string value Value to be deserialized
104
+ # @return [Object] Deserialized data
105
+ def _deserialize(type, value)
106
+ case type.to_sym
107
+ when :DateTime
108
+ DateTime.parse(value)
109
+ when :Date
110
+ Date.parse(value)
111
+ when :String
112
+ value.to_s
113
+ when :Integer
114
+ value.to_i
115
+ when :Float
116
+ value.to_f
117
+ when :BOOLEAN
118
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
119
+ true
120
+ else
121
+ false
122
+ end
123
+ when :Object
124
+ # generic object (usually a Hash), return directly
125
+ value
126
+ when /\AArray<(?<inner_type>.+)>\z/
127
+ inner_type = Regexp.last_match[:inner_type]
128
+ value.map { |v| _deserialize(inner_type, v) }
129
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
130
+ k_type = Regexp.last_match[:k_type]
131
+ v_type = Regexp.last_match[:v_type]
132
+ {}.tap do |hash|
133
+ value.each do |k, v|
134
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
135
+ end
136
+ end
137
+ else # model
138
+ temp_model = UltracartClient.const_get(type).new
139
+ temp_model.build_from_hash(value)
140
+ end
141
+ end
142
+
143
+ # Returns the string representation of the object
144
+ # @return [String] String presentation of the object
145
+ def to_s
146
+ to_hash.to_s
147
+ end
148
+
149
+ # to_body is an alias to to_hash (backward compatibility)
150
+ # @return [Hash] Returns the object in the form of hash
151
+ def to_body
152
+ to_hash
153
+ end
154
+
155
+ # Returns the object in the form of hash
156
+ # @return [Hash] Returns the object in the form of hash
157
+ def to_hash
158
+ hash = {}
159
+ self.class.attribute_map.each_pair do |attr, param|
160
+ value = self.send(attr)
161
+ next if value.nil?
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ # Outputs non-array value in the form of hash
168
+ # For object, use to_hash. Otherwise, just return the value
169
+ # @param [Object] value Any valid value
170
+ # @return [Hash] Returns the value in the form of hash
171
+ def _to_hash(value)
172
+ if value.is_a?(Array)
173
+ value.compact.map { |v| _to_hash(v) }
174
+ elsif value.is_a?(Hash)
175
+ {}.tap do |hash|
176
+ value.each { |k, v| hash[k] = _to_hash(v) }
177
+ end
178
+ elsif value.respond_to? :to_hash
179
+ value.to_hash
180
+ else
181
+ value
182
+ end
183
+ end
184
+
185
+ end
186
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.82'
14
+ VERSION = '3.10.83'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -151,6 +151,8 @@ require 'ultracart_api/models/conversation_department_settings'
151
151
  require 'ultracart_api/models/conversation_departments_response'
152
152
  require 'ultracart_api/models/conversation_engagement'
153
153
  require 'ultracart_api/models/conversation_engagement_equation'
154
+ require 'ultracart_api/models/conversation_engagement_equation_function'
155
+ require 'ultracart_api/models/conversation_engagement_equation_group'
154
156
  require 'ultracart_api/models/conversation_engagement_response'
155
157
  require 'ultracart_api/models/conversation_engagements_response'
156
158
  require 'ultracart_api/models/conversation_event_add_coupon'
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.82
4
+ version: 3.10.83
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-15 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -361,6 +361,8 @@ files:
361
361
  - docs/ConversationDepartmentsResponse.md
362
362
  - docs/ConversationEngagement.md
363
363
  - docs/ConversationEngagementEquation.md
364
+ - docs/ConversationEngagementEquationFunction.md
365
+ - docs/ConversationEngagementEquationGroup.md
364
366
  - docs/ConversationEngagementResponse.md
365
367
  - docs/ConversationEngagementsResponse.md
366
368
  - docs/ConversationEventAddCoupon.md
@@ -1110,6 +1112,8 @@ files:
1110
1112
  - lib/ultracart_api/models/conversation_departments_response.rb
1111
1113
  - lib/ultracart_api/models/conversation_engagement.rb
1112
1114
  - lib/ultracart_api/models/conversation_engagement_equation.rb
1115
+ - lib/ultracart_api/models/conversation_engagement_equation_function.rb
1116
+ - lib/ultracart_api/models/conversation_engagement_equation_group.rb
1113
1117
  - lib/ultracart_api/models/conversation_engagement_response.rb
1114
1118
  - lib/ultracart_api/models/conversation_engagements_response.rb
1115
1119
  - lib/ultracart_api/models/conversation_event_add_coupon.rb