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,242 @@
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 SfvbCommsRulerValidateResponse
18
+ # Why it doesn't compile. Only when valid is false.
19
+ attr_accessor :error_message
20
+
21
+ # How the pattern is used.
22
+ attr_accessor :notes
23
+
24
+ # True when the pattern compiles, so an Is in BigQuery segment rule will accept it.
25
+ attr_accessor :valid
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'error_message' => :'error_message',
31
+ :'notes' => :'notes',
32
+ :'valid' => :'valid'
33
+ }
34
+ end
35
+
36
+ # Returns all the JSON keys this model knows about
37
+ def self.acceptable_attributes
38
+ attribute_map.values
39
+ end
40
+
41
+ # Attribute type mapping.
42
+ def self.openapi_types
43
+ {
44
+ :'error_message' => :'String',
45
+ :'notes' => :'Array<String>',
46
+ :'valid' => :'Boolean'
47
+ }
48
+ end
49
+
50
+ # List of attributes with nullable: true
51
+ def self.openapi_nullable
52
+ Set.new([
53
+ ])
54
+ end
55
+
56
+ # Initializes the object
57
+ # @param [Hash] attributes Model attributes in the form of hash
58
+ def initialize(attributes = {})
59
+ if (!attributes.is_a?(Hash))
60
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsRulerValidateResponse` initialize method"
61
+ end
62
+
63
+ # check to see if the attribute exists and convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h|
65
+ if (!self.class.attribute_map.key?(k.to_sym))
66
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsRulerValidateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
+ end
68
+ h[k.to_sym] = v
69
+ }
70
+
71
+ if attributes.key?(:'error_message')
72
+ self.error_message = attributes[:'error_message']
73
+ end
74
+
75
+ if attributes.key?(:'notes')
76
+ if (value = attributes[:'notes']).is_a?(Array)
77
+ self.notes = value
78
+ end
79
+ end
80
+
81
+ if attributes.key?(:'valid')
82
+ self.valid = attributes[:'valid']
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ invalid_properties
91
+ end
92
+
93
+ # Check to see if the all the properties in the model are valid
94
+ # @return true if the model is valid
95
+ def valid?
96
+ true
97
+ end
98
+
99
+ # Checks equality by comparing each attribute.
100
+ # @param [Object] Object to be compared
101
+ def ==(o)
102
+ return true if self.equal?(o)
103
+ self.class == o.class &&
104
+ error_message == o.error_message &&
105
+ notes == o.notes &&
106
+ valid == o.valid
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Integer] Hash code
117
+ def hash
118
+ [error_message, notes, valid].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def self.build_from_hash(attributes)
125
+ new.build_from_hash(attributes)
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ self.class.openapi_types.each_pair do |key, type|
135
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
136
+ self.send("#{key}=", nil)
137
+ elsif type =~ /\AArray<(.*)>/i
138
+ # check to ensure the input is an array given that the attribute
139
+ # is documented as an array but the input is not
140
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
141
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
142
+ end
143
+ elsif !attributes[self.class.attribute_map[key]].nil?
144
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
145
+ end
146
+ end
147
+
148
+ self
149
+ end
150
+
151
+ # Deserializes the data based on type
152
+ # @param string type Data type
153
+ # @param string value Value to be deserialized
154
+ # @return [Object] Deserialized data
155
+ def _deserialize(type, value)
156
+ case type.to_sym
157
+ when :Time
158
+ Time.parse(value)
159
+ when :Date
160
+ Date.parse(value)
161
+ when :String
162
+ value.to_s
163
+ when :Integer
164
+ value.to_i
165
+ when :Float
166
+ value.to_f
167
+ when :Boolean
168
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
169
+ true
170
+ else
171
+ false
172
+ end
173
+ when :Object
174
+ # generic object (usually a Hash), return directly
175
+ value
176
+ when /\AArray<(?<inner_type>.+)>\z/
177
+ inner_type = Regexp.last_match[:inner_type]
178
+ value.map { |v| _deserialize(inner_type, v) }
179
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
180
+ k_type = Regexp.last_match[:k_type]
181
+ v_type = Regexp.last_match[:v_type]
182
+ {}.tap do |hash|
183
+ value.each do |k, v|
184
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
185
+ end
186
+ end
187
+ else # model
188
+ # models (e.g. Pet) or oneOf
189
+ klass = UltracartClient.const_get(type)
190
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
191
+ end
192
+ end
193
+
194
+ # Returns the string representation of the object
195
+ # @return [String] String presentation of the object
196
+ def to_s
197
+ to_hash.to_s
198
+ end
199
+
200
+ # to_body is an alias to to_hash (backward compatibility)
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_body
203
+ to_hash
204
+ end
205
+
206
+ # Returns the object in the form of hash
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_hash
209
+ hash = {}
210
+ self.class.attribute_map.each_pair do |attr, param|
211
+ value = self.send(attr)
212
+ if value.nil?
213
+ is_nullable = self.class.openapi_nullable.include?(attr)
214
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
215
+ end
216
+
217
+ hash[param] = _to_hash(value)
218
+ end
219
+ hash
220
+ end
221
+
222
+ # Outputs non-array value in the form of hash
223
+ # For object, use to_hash. Otherwise, just return the value
224
+ # @param [Object] value Any valid value
225
+ # @return [Hash] Returns the value in the form of hash
226
+ def _to_hash(value)
227
+ if value.is_a?(Array)
228
+ value.compact.map { |v| _to_hash(v) }
229
+ elsif value.is_a?(Hash)
230
+ {}.tap do |hash|
231
+ value.each { |k, v| hash[k] = _to_hash(v) }
232
+ end
233
+ elsif value.respond_to? :to_hash
234
+ value.to_hash
235
+ else
236
+ value
237
+ end
238
+ end
239
+
240
+ end
241
+
242
+ end
@@ -0,0 +1,270 @@
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 SfvbCommsSequenceFolder
18
+ # The folder.
19
+ attr_accessor :folder_uuid
20
+
21
+ # Send it as If-Match to rename or delete the folder.
22
+ attr_accessor :hash_sha256
23
+
24
+ # How many campaigns or flows are filed in it, archived ones left out.
25
+ attr_accessor :item_count
26
+
27
+ # campaign or flow, what the folder files.
28
+ attr_accessor :kind
29
+
30
+ # Its name.
31
+ attr_accessor :name
32
+
33
+ # True when the admin made it itself. It can't be renamed or deleted here.
34
+ attr_accessor :system_generated
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'folder_uuid' => :'folder_uuid',
40
+ :'hash_sha256' => :'hash_sha256',
41
+ :'item_count' => :'item_count',
42
+ :'kind' => :'kind',
43
+ :'name' => :'name',
44
+ :'system_generated' => :'system_generated'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'folder_uuid' => :'String',
57
+ :'hash_sha256' => :'String',
58
+ :'item_count' => :'Integer',
59
+ :'kind' => :'String',
60
+ :'name' => :'String',
61
+ :'system_generated' => :'Boolean'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsSequenceFolder` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsSequenceFolder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'folder_uuid')
87
+ self.folder_uuid = attributes[:'folder_uuid']
88
+ end
89
+
90
+ if attributes.key?(:'hash_sha256')
91
+ self.hash_sha256 = attributes[:'hash_sha256']
92
+ end
93
+
94
+ if attributes.key?(:'item_count')
95
+ self.item_count = attributes[:'item_count']
96
+ end
97
+
98
+ if attributes.key?(:'kind')
99
+ self.kind = attributes[:'kind']
100
+ end
101
+
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
104
+ end
105
+
106
+ if attributes.key?(:'system_generated')
107
+ self.system_generated = attributes[:'system_generated']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ folder_uuid == o.folder_uuid &&
130
+ hash_sha256 == o.hash_sha256 &&
131
+ item_count == o.item_count &&
132
+ kind == o.kind &&
133
+ name == o.name &&
134
+ system_generated == o.system_generated
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [folder_uuid, hash_sha256, item_count, kind, name, system_generated].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :Time
186
+ Time.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :Boolean
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ # models (e.g. Pet) or oneOf
217
+ klass = UltracartClient.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end