ultracart_api 4.1.208 → 4.1.210

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -2
  3. data/docs/SfvbApi.md +717 -48
  4. data/docs/SfvbArchiveRequest.md +18 -0
  5. data/docs/SfvbCampaign.md +16 -0
  6. data/docs/SfvbCampaignMembership.md +24 -0
  7. data/docs/SfvbCampaignWriteRequest.md +32 -0
  8. data/docs/SfvbCommsEmail.md +6 -0
  9. data/docs/SfvbCommsList.md +24 -0
  10. data/docs/SfvbCommsListsResponse.md +18 -0
  11. data/docs/SfvbCommsSegment.md +26 -0
  12. data/docs/SfvbCommsSegmentsResponse.md +18 -0
  13. data/docs/SfvbEmail.md +2 -0
  14. data/docs/SfvbEmailReviewRequest.md +18 -0
  15. data/docs/SfvbFlow.md +22 -0
  16. data/docs/SfvbFlowStatusRequest.md +18 -0
  17. data/docs/SfvbFlowWriteRequest.md +38 -0
  18. data/lib/ultracart_api/api/sfvb_api.rb +1027 -88
  19. data/lib/ultracart_api/models/sfvb_archive_request.rb +220 -0
  20. data/lib/ultracart_api/models/sfvb_campaign.rb +85 -1
  21. data/lib/ultracart_api/models/sfvb_campaign_membership.rb +250 -0
  22. data/lib/ultracart_api/models/sfvb_campaign_write_request.rb +292 -0
  23. data/lib/ultracart_api/models/sfvb_comms_email.rb +31 -1
  24. data/lib/ultracart_api/models/sfvb_comms_list.rb +250 -0
  25. data/lib/ultracart_api/models/sfvb_comms_lists_response.rb +222 -0
  26. data/lib/ultracart_api/models/sfvb_comms_segment.rb +260 -0
  27. data/lib/ultracart_api/models/sfvb_comms_segments_response.rb +222 -0
  28. data/lib/ultracart_api/models/sfvb_email.rb +13 -1
  29. data/lib/ultracart_api/models/sfvb_email_review_request.rb +220 -0
  30. data/lib/ultracart_api/models/sfvb_flow.rb +113 -1
  31. data/lib/ultracart_api/models/sfvb_flow_status_request.rb +254 -0
  32. data/lib/ultracart_api/models/sfvb_flow_write_request.rb +354 -0
  33. data/lib/ultracart_api/version.rb +1 -1
  34. data/lib/ultracart_api.rb +10 -0
  35. metadata +22 -2
@@ -27,6 +27,9 @@ module UltracartClient
27
27
  # True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live.
28
28
  attr_accessor :live
29
29
 
30
+ # What a write did beyond the fields asked for, such as a step label it could not refresh. Only on a write.
31
+ attr_accessor :notes
32
+
30
33
  # True while a change waits for review. An edit puts it back to needing review.
31
34
  attr_accessor :pending_review
32
35
 
@@ -58,6 +61,7 @@ module UltracartClient
58
61
  :'email_uuid' => :'email_uuid',
59
62
  :'hash_sha256' => :'hash_sha256',
60
63
  :'live' => :'live',
64
+ :'notes' => :'notes',
61
65
  :'pending_review' => :'pending_review',
62
66
  :'preview_text' => :'preview_text',
63
67
  :'rejected' => :'rejected',
@@ -81,6 +85,7 @@ module UltracartClient
81
85
  :'email_uuid' => :'String',
82
86
  :'hash_sha256' => :'String',
83
87
  :'live' => :'Boolean',
88
+ :'notes' => :'Array<String>',
84
89
  :'pending_review' => :'Boolean',
85
90
  :'preview_text' => :'String',
86
91
  :'rejected' => :'Boolean',
@@ -129,6 +134,12 @@ module UltracartClient
129
134
  self.live = attributes[:'live']
130
135
  end
131
136
 
137
+ if attributes.key?(:'notes')
138
+ if (value = attributes[:'notes']).is_a?(Array)
139
+ self.notes = value
140
+ end
141
+ end
142
+
132
143
  if attributes.key?(:'pending_review')
133
144
  self.pending_review = attributes[:'pending_review']
134
145
  end
@@ -184,6 +195,7 @@ module UltracartClient
184
195
  email_uuid == o.email_uuid &&
185
196
  hash_sha256 == o.hash_sha256 &&
186
197
  live == o.live &&
198
+ notes == o.notes &&
187
199
  pending_review == o.pending_review &&
188
200
  preview_text == o.preview_text &&
189
201
  rejected == o.rejected &&
@@ -203,7 +215,7 @@ module UltracartClient
203
215
  # Calculates hash code according to all attributes.
204
216
  # @return [Integer] Hash code
205
217
  def hash
206
- [container_last_modified_dts, email_uuid, hash_sha256, live, pending_review, preview_text, rejected, requires_review, subject, suspended_for_spam, transactional, version].hash
218
+ [container_last_modified_dts, email_uuid, hash_sha256, live, notes, pending_review, preview_text, rejected, requires_review, subject, suspended_for_spam, transactional, version].hash
207
219
  end
208
220
 
209
221
  # Builds the object from hash
@@ -0,0 +1,220 @@
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 SfvbEmailReviewRequest
18
+ # A test order id. Required for an email in a flow triggered by an order or an auto order, and refused otherwise.
19
+ attr_accessor :order_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'order_id' => :'order_id'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'order_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbEmailReviewRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbEmailReviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'order_id')
62
+ self.order_id = attributes[:'order_id']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ order_id == o.order_id
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [order_id].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class SfvbFlow
18
+ # True when a customer may be in this flow more than once at a time.
19
+ attr_accessor :allow_multiple_concurrent_enrollments
20
+
18
21
  # The communication sequence the steps belong to.
19
22
  attr_accessor :communication_sequence_uuid
20
23
 
@@ -27,24 +30,54 @@ module UltracartClient
27
30
  # Its emails, in step order.
28
31
  attr_accessor :emails
29
32
 
33
+ # True when a customer leaves the flow once they buy from one of its emails.
34
+ attr_accessor :end_once_customer_purchases
35
+
36
+ # True when a customer leaves the flow once they buy from any source.
37
+ attr_accessor :end_once_customer_purchases_anywhere
38
+
30
39
  # The flow uuid.
31
40
  attr_accessor :flow_uuid
32
41
 
42
+ # Send this as If-Match when changing, archiving or turning the flow on or off.
43
+ attr_accessor :hash_sha256
44
+
33
45
  # True when the emails and postcards reach customers now, so a change to one shows at once. False only in a status that sends nothing.
34
46
  attr_accessor :live
35
47
 
36
48
  # The flow name.
37
49
  attr_accessor :name
38
50
 
51
+ # What a write did beyond the fields it was asked to change, such as putting emails back to needing review or setting a scheduled campaign back to draft. Only on a write.
52
+ attr_accessor :notes
53
+
39
54
  # Its postcards, in step order.
40
55
  attr_accessor :postcards
41
56
 
57
+ # Days before a customer may enter again, with after_days.
58
+ attr_accessor :reentry_delay_days
59
+
60
+ # Whether a customer may enter again, anytime, after_days or never.
61
+ attr_accessor :reentry_policy
62
+
63
+ # The sending domain uuid. Defaults to the storefront's marketing sending domain.
64
+ attr_accessor :sending_domain_uuid
65
+
66
+ # The from name. Defaults to the storefront's marketing setting.
67
+ attr_accessor :sending_name
68
+
69
+ # The part of the from address before the at sign. Defaults to the storefront's marketing setting.
70
+ attr_accessor :sending_user
71
+
42
72
  # The status, such as draft, active, paused, draining or inactive.
43
73
  attr_accessor :status
44
74
 
45
75
  # When the status last changed (ISO 8601, UTC).
46
76
  attr_accessor :status_dts
47
77
 
78
+ # The list or segment uuid, or other value, the trigger is limited to.
79
+ attr_accessor :trigger_parameter
80
+
48
81
  # The name of the trigger parameter, when the trigger takes one.
49
82
  attr_accessor :trigger_parameter_name
50
83
 
@@ -54,16 +87,27 @@ module UltracartClient
54
87
  # Attribute mapping from ruby-style variable name to JSON key.
55
88
  def self.attribute_map
56
89
  {
90
+ :'allow_multiple_concurrent_enrollments' => :'allow_multiple_concurrent_enrollments',
57
91
  :'communication_sequence_uuid' => :'communication_sequence_uuid',
58
92
  :'created_dts' => :'created_dts',
59
93
  :'deleted' => :'deleted',
60
94
  :'emails' => :'emails',
95
+ :'end_once_customer_purchases' => :'end_once_customer_purchases',
96
+ :'end_once_customer_purchases_anywhere' => :'end_once_customer_purchases_anywhere',
61
97
  :'flow_uuid' => :'flow_uuid',
98
+ :'hash_sha256' => :'hash_sha256',
62
99
  :'live' => :'live',
63
100
  :'name' => :'name',
101
+ :'notes' => :'notes',
64
102
  :'postcards' => :'postcards',
103
+ :'reentry_delay_days' => :'reentry_delay_days',
104
+ :'reentry_policy' => :'reentry_policy',
105
+ :'sending_domain_uuid' => :'sending_domain_uuid',
106
+ :'sending_name' => :'sending_name',
107
+ :'sending_user' => :'sending_user',
65
108
  :'status' => :'status',
66
109
  :'status_dts' => :'status_dts',
110
+ :'trigger_parameter' => :'trigger_parameter',
67
111
  :'trigger_parameter_name' => :'trigger_parameter_name',
68
112
  :'trigger_type' => :'trigger_type'
69
113
  }
@@ -77,16 +121,27 @@ module UltracartClient
77
121
  # Attribute type mapping.
78
122
  def self.openapi_types
79
123
  {
124
+ :'allow_multiple_concurrent_enrollments' => :'Boolean',
80
125
  :'communication_sequence_uuid' => :'String',
81
126
  :'created_dts' => :'String',
82
127
  :'deleted' => :'Boolean',
83
128
  :'emails' => :'Array<SfvbCommsEmail>',
129
+ :'end_once_customer_purchases' => :'Boolean',
130
+ :'end_once_customer_purchases_anywhere' => :'Boolean',
84
131
  :'flow_uuid' => :'String',
132
+ :'hash_sha256' => :'String',
85
133
  :'live' => :'Boolean',
86
134
  :'name' => :'String',
135
+ :'notes' => :'Array<String>',
87
136
  :'postcards' => :'Array<SfvbCommsPostcard>',
137
+ :'reentry_delay_days' => :'Integer',
138
+ :'reentry_policy' => :'String',
139
+ :'sending_domain_uuid' => :'String',
140
+ :'sending_name' => :'String',
141
+ :'sending_user' => :'String',
88
142
  :'status' => :'String',
89
143
  :'status_dts' => :'String',
144
+ :'trigger_parameter' => :'String',
90
145
  :'trigger_parameter_name' => :'String',
91
146
  :'trigger_type' => :'String'
92
147
  }
@@ -113,6 +168,10 @@ module UltracartClient
113
168
  h[k.to_sym] = v
114
169
  }
115
170
 
171
+ if attributes.key?(:'allow_multiple_concurrent_enrollments')
172
+ self.allow_multiple_concurrent_enrollments = attributes[:'allow_multiple_concurrent_enrollments']
173
+ end
174
+
116
175
  if attributes.key?(:'communication_sequence_uuid')
117
176
  self.communication_sequence_uuid = attributes[:'communication_sequence_uuid']
118
177
  end
@@ -131,10 +190,22 @@ module UltracartClient
131
190
  end
132
191
  end
133
192
 
193
+ if attributes.key?(:'end_once_customer_purchases')
194
+ self.end_once_customer_purchases = attributes[:'end_once_customer_purchases']
195
+ end
196
+
197
+ if attributes.key?(:'end_once_customer_purchases_anywhere')
198
+ self.end_once_customer_purchases_anywhere = attributes[:'end_once_customer_purchases_anywhere']
199
+ end
200
+
134
201
  if attributes.key?(:'flow_uuid')
135
202
  self.flow_uuid = attributes[:'flow_uuid']
136
203
  end
137
204
 
205
+ if attributes.key?(:'hash_sha256')
206
+ self.hash_sha256 = attributes[:'hash_sha256']
207
+ end
208
+
138
209
  if attributes.key?(:'live')
139
210
  self.live = attributes[:'live']
140
211
  end
@@ -143,12 +214,38 @@ module UltracartClient
143
214
  self.name = attributes[:'name']
144
215
  end
145
216
 
217
+ if attributes.key?(:'notes')
218
+ if (value = attributes[:'notes']).is_a?(Array)
219
+ self.notes = value
220
+ end
221
+ end
222
+
146
223
  if attributes.key?(:'postcards')
147
224
  if (value = attributes[:'postcards']).is_a?(Array)
148
225
  self.postcards = value
149
226
  end
150
227
  end
151
228
 
229
+ if attributes.key?(:'reentry_delay_days')
230
+ self.reentry_delay_days = attributes[:'reentry_delay_days']
231
+ end
232
+
233
+ if attributes.key?(:'reentry_policy')
234
+ self.reentry_policy = attributes[:'reentry_policy']
235
+ end
236
+
237
+ if attributes.key?(:'sending_domain_uuid')
238
+ self.sending_domain_uuid = attributes[:'sending_domain_uuid']
239
+ end
240
+
241
+ if attributes.key?(:'sending_name')
242
+ self.sending_name = attributes[:'sending_name']
243
+ end
244
+
245
+ if attributes.key?(:'sending_user')
246
+ self.sending_user = attributes[:'sending_user']
247
+ end
248
+
152
249
  if attributes.key?(:'status')
153
250
  self.status = attributes[:'status']
154
251
  end
@@ -157,6 +254,10 @@ module UltracartClient
157
254
  self.status_dts = attributes[:'status_dts']
158
255
  end
159
256
 
257
+ if attributes.key?(:'trigger_parameter')
258
+ self.trigger_parameter = attributes[:'trigger_parameter']
259
+ end
260
+
160
261
  if attributes.key?(:'trigger_parameter_name')
161
262
  self.trigger_parameter_name = attributes[:'trigger_parameter_name']
162
263
  end
@@ -184,16 +285,27 @@ module UltracartClient
184
285
  def ==(o)
185
286
  return true if self.equal?(o)
186
287
  self.class == o.class &&
288
+ allow_multiple_concurrent_enrollments == o.allow_multiple_concurrent_enrollments &&
187
289
  communication_sequence_uuid == o.communication_sequence_uuid &&
188
290
  created_dts == o.created_dts &&
189
291
  deleted == o.deleted &&
190
292
  emails == o.emails &&
293
+ end_once_customer_purchases == o.end_once_customer_purchases &&
294
+ end_once_customer_purchases_anywhere == o.end_once_customer_purchases_anywhere &&
191
295
  flow_uuid == o.flow_uuid &&
296
+ hash_sha256 == o.hash_sha256 &&
192
297
  live == o.live &&
193
298
  name == o.name &&
299
+ notes == o.notes &&
194
300
  postcards == o.postcards &&
301
+ reentry_delay_days == o.reentry_delay_days &&
302
+ reentry_policy == o.reentry_policy &&
303
+ sending_domain_uuid == o.sending_domain_uuid &&
304
+ sending_name == o.sending_name &&
305
+ sending_user == o.sending_user &&
195
306
  status == o.status &&
196
307
  status_dts == o.status_dts &&
308
+ trigger_parameter == o.trigger_parameter &&
197
309
  trigger_parameter_name == o.trigger_parameter_name &&
198
310
  trigger_type == o.trigger_type
199
311
  end
@@ -207,7 +319,7 @@ module UltracartClient
207
319
  # Calculates hash code according to all attributes.
208
320
  # @return [Integer] Hash code
209
321
  def hash
210
- [communication_sequence_uuid, created_dts, deleted, emails, flow_uuid, live, name, postcards, status, status_dts, trigger_parameter_name, trigger_type].hash
322
+ [allow_multiple_concurrent_enrollments, communication_sequence_uuid, created_dts, deleted, emails, end_once_customer_purchases, end_once_customer_purchases_anywhere, flow_uuid, hash_sha256, live, name, notes, postcards, reentry_delay_days, reentry_policy, sending_domain_uuid, sending_name, sending_user, status, status_dts, trigger_parameter, trigger_parameter_name, trigger_type].hash
211
323
  end
212
324
 
213
325
  # Builds the object from hash