ultracart_api 4.1.232 → 4.1.233

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