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,230 @@
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 SfvbPreviewTrackingHtmlRequest
18
+ # Conversion HTML to run instead of the live slot on a test order's receipt opened through this session's preview access link. Never on a real order's receipt. An empty string unstages it. The same checks as a write apply.
19
+ attr_accessor :conversion_html
20
+
21
+ # Tracking HTML to run instead of the live slot on pages opened through this session's preview access link. An empty string unstages it. The same checks as a write apply.
22
+ attr_accessor :tracking_html
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'conversion_html' => :'conversion_html',
28
+ :'tracking_html' => :'tracking_html'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'conversion_html' => :'String',
41
+ :'tracking_html' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbPreviewTrackingHtmlRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbPreviewTrackingHtmlRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'conversion_html')
67
+ self.conversion_html = attributes[:'conversion_html']
68
+ end
69
+
70
+ if attributes.key?(:'tracking_html')
71
+ self.tracking_html = attributes[:'tracking_html']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ conversion_html == o.conversion_html &&
94
+ tracking_html == o.tracking_html
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [conversion_html, tracking_html].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -21,7 +21,7 @@ module UltracartClient
21
21
  # How long the render took in milliseconds.
22
22
  attr_accessor :duration_ms
23
23
 
24
- # Error lines in the log, including Velocity problems such as a null
24
+ # Error lines in the log, including Velocity problems such as setting a variable to null.
25
25
  attr_accessor :error_count
26
26
 
27
27
  # Lines in the full log text.
@@ -33,7 +33,7 @@ module UltracartClient
33
33
  # Customers who reached the step and were not sent anything. The dispatch log says why.
34
34
  attr_accessor :skipped
35
35
 
36
- # email (the step's email, all time), sequence (the begin step, customers who started the sequence, all time) or step (this step, the last 90 days).
36
+ # email (the step's email, all time), sequence (the begin step, customers who started the sequence, all time), resend (a Resend Email step, what it resent, the last 90 days), experiment (an experiment step, its variants together, the last 90 days), sms or postcard (the step's own sends, the last 90 days), step (the end step or a condition, split or InboxGeek step, the last 90 days) or not_recorded (a step type the send path keeps no counts for, such as a wait; no counts are given).
37
37
  attr_accessor :source
38
38
 
39
39
  # Spam complaints.
@@ -0,0 +1,230 @@
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 SfvbTrackingHtmlRenderRequest
18
+ # HTML to render instead of the stored slot, such as a draft about to be written. The same checks as a write apply. Left out, the stored slot is rendered.
19
+ attr_accessor :content
20
+
21
+ # A test order on this account, as sf orders test-orders lists them. A real or unknown order is refused the same way.
22
+ attr_accessor :order_id
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'content' => :'content',
28
+ :'order_id' => :'order_id'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'content' => :'String',
41
+ :'order_id' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTrackingHtmlRenderRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTrackingHtmlRenderRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'content')
67
+ self.content = attributes[:'content']
68
+ end
69
+
70
+ if attributes.key?(:'order_id')
71
+ self.order_id = attributes[:'order_id']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ content == o.content &&
94
+ order_id == o.order_id
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [content, order_id].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end