ultracart_api 4.1.232 → 4.1.234

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 (61) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -2
  3. data/docs/SfvbApi.md +922 -34
  4. data/docs/SfvbApprovalCreateRequest.md +2 -0
  5. data/docs/SfvbApprovalParams.md +1 -1
  6. data/docs/SfvbCampaign.md +4 -0
  7. data/docs/SfvbCampaignWriteRequest.md +2 -0
  8. data/docs/SfvbCommsLookupOwner.md +28 -0
  9. data/docs/SfvbCommsLookupResponse.md +36 -0
  10. data/docs/SfvbCommsRulerValidateRequest.md +18 -0
  11. data/docs/SfvbCommsRulerValidateResponse.md +22 -0
  12. data/docs/SfvbCommsSequenceFolder.md +28 -0
  13. data/docs/SfvbCommsSequenceFolderResponse.md +22 -0
  14. data/docs/SfvbCommsSequenceFoldersResponse.md +18 -0
  15. data/docs/SfvbCommsStat.md +1 -1
  16. data/docs/SfvbCommsTemplateResponse.md +8 -2
  17. data/docs/SfvbCommsUnreferencedEmail.md +30 -0
  18. data/docs/SfvbCommsUnreferencedPostcard.md +24 -0
  19. data/docs/SfvbCommsUnreferencedResponse.md +32 -0
  20. data/docs/SfvbEmail.md +8 -0
  21. data/docs/SfvbFlow.md +4 -0
  22. data/docs/SfvbFlowBackfillRequest.md +24 -0
  23. data/docs/SfvbFlowBackfillResponse.md +38 -0
  24. data/docs/SfvbFlowWriteRequest.md +2 -0
  25. data/docs/SfvbPreviewTrackingHtmlRequest.md +20 -0
  26. data/docs/SfvbServerLog.md +1 -1
  27. data/docs/SfvbStepCounts.md +1 -1
  28. data/docs/SfvbTrackingHtmlRenderRequest.md +20 -0
  29. data/docs/SfvbTrackingHtmlRenderResponse.md +32 -0
  30. data/docs/SfvbTrackingProvider.md +2 -0
  31. data/lib/ultracart_api/api/sfvb_api.rb +1235 -31
  32. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +12 -3
  33. data/lib/ultracart_api/models/sfvb_approval_params.rb +1 -1
  34. data/lib/ultracart_api/models/sfvb_campaign.rb +21 -1
  35. data/lib/ultracart_api/models/sfvb_campaign_write_request.rb +11 -1
  36. data/lib/ultracart_api/models/sfvb_comms_lookup_owner.rb +270 -0
  37. data/lib/ultracart_api/models/sfvb_comms_lookup_response.rb +311 -0
  38. data/lib/ultracart_api/models/sfvb_comms_ruler_validate_request.rb +220 -0
  39. data/lib/ultracart_api/models/sfvb_comms_ruler_validate_response.rb +242 -0
  40. data/lib/ultracart_api/models/sfvb_comms_sequence_folder.rb +270 -0
  41. data/lib/ultracart_api/models/sfvb_comms_sequence_folder_response.rb +243 -0
  42. data/lib/ultracart_api/models/sfvb_comms_sequence_folders_response.rb +222 -0
  43. data/lib/ultracart_api/models/sfvb_comms_stat.rb +1 -1
  44. data/lib/ultracart_api/models/sfvb_comms_template_response.rb +35 -5
  45. data/lib/ultracart_api/models/sfvb_comms_unreferenced_email.rb +280 -0
  46. data/lib/ultracart_api/models/sfvb_comms_unreferenced_postcard.rb +250 -0
  47. data/lib/ultracart_api/models/sfvb_comms_unreferenced_response.rb +296 -0
  48. data/lib/ultracart_api/models/sfvb_email.rb +41 -1
  49. data/lib/ultracart_api/models/sfvb_flow.rb +21 -1
  50. data/lib/ultracart_api/models/sfvb_flow_backfill_request.rb +250 -0
  51. data/lib/ultracart_api/models/sfvb_flow_backfill_response.rb +322 -0
  52. data/lib/ultracart_api/models/sfvb_flow_write_request.rb +11 -1
  53. data/lib/ultracart_api/models/sfvb_preview_tracking_html_request.rb +230 -0
  54. data/lib/ultracart_api/models/sfvb_server_log.rb +1 -1
  55. data/lib/ultracart_api/models/sfvb_step_counts.rb +1 -1
  56. data/lib/ultracart_api/models/sfvb_tracking_html_render_request.rb +230 -0
  57. data/lib/ultracart_api/models/sfvb_tracking_html_render_response.rb +328 -0
  58. data/lib/ultracart_api/models/sfvb_tracking_provider.rb +11 -1
  59. data/lib/ultracart_api/version.rb +1 -1
  60. data/lib/ultracart_api.rb +15 -0
  61. metadata +32 -2
@@ -0,0 +1,311 @@
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 SfvbCommsLookupResponse
18
+ # True when the uuid is an archived campaign or flow. It is still on its storefront and can be read; it sends nothing.
19
+ attr_accessor :archived
20
+
21
+ # The sequence it belongs to, when there is one.
22
+ attr_accessor :communication_sequence_uuid
23
+
24
+ # campaign, flow, sequence, step, email, postcard, list or segment.
25
+ attr_accessor :kind
26
+
27
+ # The campaign, flow, list or segment name, or the email subject.
28
+ attr_accessor :name
29
+
30
+ # The CLI command that reads it.
31
+ attr_accessor :_next
32
+
33
+ # What the answer means, in sentences.
34
+ attr_accessor :notes
35
+
36
+ attr_accessor :owner
37
+
38
+ # The step that sends it, for an email or postcard a step names, or the step itself.
39
+ attr_accessor :step_uuid
40
+
41
+ # The storefront it lives on, for the --storefront option.
42
+ attr_accessor :storefront_oid
43
+
44
+ # The uuid looked up.
45
+ attr_accessor :uuid
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'archived' => :'archived',
51
+ :'communication_sequence_uuid' => :'communication_sequence_uuid',
52
+ :'kind' => :'kind',
53
+ :'name' => :'name',
54
+ :'_next' => :'next',
55
+ :'notes' => :'notes',
56
+ :'owner' => :'owner',
57
+ :'step_uuid' => :'step_uuid',
58
+ :'storefront_oid' => :'storefront_oid',
59
+ :'uuid' => :'uuid'
60
+ }
61
+ end
62
+
63
+ # Returns all the JSON keys this model knows about
64
+ def self.acceptable_attributes
65
+ attribute_map.values
66
+ end
67
+
68
+ # Attribute type mapping.
69
+ def self.openapi_types
70
+ {
71
+ :'archived' => :'Boolean',
72
+ :'communication_sequence_uuid' => :'String',
73
+ :'kind' => :'String',
74
+ :'name' => :'String',
75
+ :'_next' => :'String',
76
+ :'notes' => :'Array<String>',
77
+ :'owner' => :'SfvbCommsLookupOwner',
78
+ :'step_uuid' => :'String',
79
+ :'storefront_oid' => :'Integer',
80
+ :'uuid' => :'String'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsLookupResponse` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsLookupResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'archived')
106
+ self.archived = attributes[:'archived']
107
+ end
108
+
109
+ if attributes.key?(:'communication_sequence_uuid')
110
+ self.communication_sequence_uuid = attributes[:'communication_sequence_uuid']
111
+ end
112
+
113
+ if attributes.key?(:'kind')
114
+ self.kind = attributes[:'kind']
115
+ end
116
+
117
+ if attributes.key?(:'name')
118
+ self.name = attributes[:'name']
119
+ end
120
+
121
+ if attributes.key?(:'_next')
122
+ self._next = attributes[:'_next']
123
+ end
124
+
125
+ if attributes.key?(:'notes')
126
+ if (value = attributes[:'notes']).is_a?(Array)
127
+ self.notes = value
128
+ end
129
+ end
130
+
131
+ if attributes.key?(:'owner')
132
+ self.owner = attributes[:'owner']
133
+ end
134
+
135
+ if attributes.key?(:'step_uuid')
136
+ self.step_uuid = attributes[:'step_uuid']
137
+ end
138
+
139
+ if attributes.key?(:'storefront_oid')
140
+ self.storefront_oid = attributes[:'storefront_oid']
141
+ end
142
+
143
+ if attributes.key?(:'uuid')
144
+ self.uuid = attributes[:'uuid']
145
+ end
146
+ end
147
+
148
+ # Show invalid properties with the reasons. Usually used together with valid?
149
+ # @return Array for valid properties with the reasons
150
+ def list_invalid_properties
151
+ invalid_properties = Array.new
152
+ invalid_properties
153
+ end
154
+
155
+ # Check to see if the all the properties in the model are valid
156
+ # @return true if the model is valid
157
+ def valid?
158
+ true
159
+ end
160
+
161
+ # Checks equality by comparing each attribute.
162
+ # @param [Object] Object to be compared
163
+ def ==(o)
164
+ return true if self.equal?(o)
165
+ self.class == o.class &&
166
+ archived == o.archived &&
167
+ communication_sequence_uuid == o.communication_sequence_uuid &&
168
+ kind == o.kind &&
169
+ name == o.name &&
170
+ _next == o._next &&
171
+ notes == o.notes &&
172
+ owner == o.owner &&
173
+ step_uuid == o.step_uuid &&
174
+ storefront_oid == o.storefront_oid &&
175
+ uuid == o.uuid
176
+ end
177
+
178
+ # @see the `==` method
179
+ # @param [Object] Object to be compared
180
+ def eql?(o)
181
+ self == o
182
+ end
183
+
184
+ # Calculates hash code according to all attributes.
185
+ # @return [Integer] Hash code
186
+ def hash
187
+ [archived, communication_sequence_uuid, kind, name, _next, notes, owner, step_uuid, storefront_oid, uuid].hash
188
+ end
189
+
190
+ # Builds the object from hash
191
+ # @param [Hash] attributes Model attributes in the form of hash
192
+ # @return [Object] Returns the model itself
193
+ def self.build_from_hash(attributes)
194
+ new.build_from_hash(attributes)
195
+ end
196
+
197
+ # Builds the object from hash
198
+ # @param [Hash] attributes Model attributes in the form of hash
199
+ # @return [Object] Returns the model itself
200
+ def build_from_hash(attributes)
201
+ return nil unless attributes.is_a?(Hash)
202
+ attributes = attributes.transform_keys(&:to_sym)
203
+ self.class.openapi_types.each_pair do |key, type|
204
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
205
+ self.send("#{key}=", nil)
206
+ elsif type =~ /\AArray<(.*)>/i
207
+ # check to ensure the input is an array given that the attribute
208
+ # is documented as an array but the input is not
209
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
210
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
211
+ end
212
+ elsif !attributes[self.class.attribute_map[key]].nil?
213
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
214
+ end
215
+ end
216
+
217
+ self
218
+ end
219
+
220
+ # Deserializes the data based on type
221
+ # @param string type Data type
222
+ # @param string value Value to be deserialized
223
+ # @return [Object] Deserialized data
224
+ def _deserialize(type, value)
225
+ case type.to_sym
226
+ when :Time
227
+ Time.parse(value)
228
+ when :Date
229
+ Date.parse(value)
230
+ when :String
231
+ value.to_s
232
+ when :Integer
233
+ value.to_i
234
+ when :Float
235
+ value.to_f
236
+ when :Boolean
237
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
238
+ true
239
+ else
240
+ false
241
+ end
242
+ when :Object
243
+ # generic object (usually a Hash), return directly
244
+ value
245
+ when /\AArray<(?<inner_type>.+)>\z/
246
+ inner_type = Regexp.last_match[:inner_type]
247
+ value.map { |v| _deserialize(inner_type, v) }
248
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
249
+ k_type = Regexp.last_match[:k_type]
250
+ v_type = Regexp.last_match[:v_type]
251
+ {}.tap do |hash|
252
+ value.each do |k, v|
253
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
254
+ end
255
+ end
256
+ else # model
257
+ # models (e.g. Pet) or oneOf
258
+ klass = UltracartClient.const_get(type)
259
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
260
+ end
261
+ end
262
+
263
+ # Returns the string representation of the object
264
+ # @return [String] String presentation of the object
265
+ def to_s
266
+ to_hash.to_s
267
+ end
268
+
269
+ # to_body is an alias to to_hash (backward compatibility)
270
+ # @return [Hash] Returns the object in the form of hash
271
+ def to_body
272
+ to_hash
273
+ end
274
+
275
+ # Returns the object in the form of hash
276
+ # @return [Hash] Returns the object in the form of hash
277
+ def to_hash
278
+ hash = {}
279
+ self.class.attribute_map.each_pair do |attr, param|
280
+ value = self.send(attr)
281
+ if value.nil?
282
+ is_nullable = self.class.openapi_nullable.include?(attr)
283
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
284
+ end
285
+
286
+ hash[param] = _to_hash(value)
287
+ end
288
+ hash
289
+ end
290
+
291
+ # Outputs non-array value in the form of hash
292
+ # For object, use to_hash. Otherwise, just return the value
293
+ # @param [Object] value Any valid value
294
+ # @return [Hash] Returns the value in the form of hash
295
+ def _to_hash(value)
296
+ if value.is_a?(Array)
297
+ value.compact.map { |v| _to_hash(v) }
298
+ elsif value.is_a?(Hash)
299
+ {}.tap do |hash|
300
+ value.each { |k, v| hash[k] = _to_hash(v) }
301
+ end
302
+ elsif value.respond_to? :to_hash
303
+ value.to_hash
304
+ else
305
+ value
306
+ end
307
+ end
308
+
309
+ end
310
+
311
+ end
@@ -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 SfvbCommsRulerValidateRequest
18
+ # The Event Ruler pattern, as JSON text, the same text the rule's bigquery_ruler holds. At most 16384 characters.
19
+ attr_accessor :ruler
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'ruler' => :'ruler'
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
+ :'ruler' => :'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::SfvbCommsRulerValidateRequest` 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::SfvbCommsRulerValidateRequest`. 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?(:'ruler')
62
+ self.ruler = attributes[:'ruler']
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
+ ruler == o.ruler
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
+ [ruler].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