ultracart_api 4.1.231 → 4.1.232

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -2
  3. data/docs/ItemContentMultimedia.md +2 -0
  4. data/docs/SfvbApi.md +763 -39
  5. data/docs/SfvbApprovalCreateRequest.md +6 -0
  6. data/docs/SfvbCommsBranchStat.md +20 -0
  7. data/docs/SfvbCommsChange.md +22 -0
  8. data/docs/SfvbCommsClick.md +20 -0
  9. data/docs/SfvbCommsClicksResponse.md +26 -0
  10. data/docs/SfvbCommsDailyStat.md +30 -0
  11. data/docs/SfvbCommsDashboardResponse.md +24 -0
  12. data/docs/SfvbCommsDashboardRow.md +28 -0
  13. data/docs/SfvbCommsPlan.md +66 -0
  14. data/docs/SfvbCommsPlanResponse.md +20 -0
  15. data/docs/SfvbCommsProvider.md +28 -0
  16. data/docs/SfvbCommsProviderImportRequest.md +22 -0
  17. data/docs/SfvbCommsProviderImportResponse.md +26 -0
  18. data/docs/SfvbCommsProviderList.md +20 -0
  19. data/docs/SfvbCommsProvidersResponse.md +22 -0
  20. data/docs/SfvbCommsSender.md +24 -0
  21. data/docs/SfvbCommsSenderUpdate.md +22 -0
  22. data/docs/SfvbCommsSequenceStatsResponse.md +26 -0
  23. data/docs/SfvbCommsSettings.md +34 -0
  24. data/docs/SfvbCommsSettingsResponse.md +24 -0
  25. data/docs/SfvbCommsSettingsUpdateRequest.md +26 -0
  26. data/docs/SfvbCommsStat.md +54 -0
  27. data/docs/SfvbCommsStepStat.md +34 -0
  28. data/docs/SfvbCommsTemplate.md +30 -0
  29. data/docs/SfvbCommsTemplateResponse.md +24 -0
  30. data/docs/SfvbCommsTemplatesResponse.md +20 -0
  31. data/docs/SfvbCommsTestEmailRequest.md +24 -0
  32. data/docs/SfvbCommsTestPostcardRequest.md +36 -0
  33. data/docs/SfvbCommsTestSendResponse.md +32 -0
  34. data/docs/SfvbCommsTestSmsRequest.md +18 -0
  35. data/lib/ultracart_api/api/sfvb_api.rb +982 -10
  36. data/lib/ultracart_api/models/item_content_multimedia.rb +11 -1
  37. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +30 -3
  38. data/lib/ultracart_api/models/sfvb_comms_branch_stat.rb +229 -0
  39. data/lib/ultracart_api/models/sfvb_comms_change.rb +240 -0
  40. data/lib/ultracart_api/models/sfvb_comms_click.rb +230 -0
  41. data/lib/ultracart_api/models/sfvb_comms_clicks_response.rb +264 -0
  42. data/lib/ultracart_api/models/sfvb_comms_daily_stat.rb +280 -0
  43. data/lib/ultracart_api/models/sfvb_comms_dashboard_response.rb +256 -0
  44. data/lib/ultracart_api/models/sfvb_comms_dashboard_row.rb +269 -0
  45. data/lib/ultracart_api/models/sfvb_comms_plan.rb +460 -0
  46. data/lib/ultracart_api/models/sfvb_comms_plan_response.rb +231 -0
  47. data/lib/ultracart_api/models/sfvb_comms_provider.rb +272 -0
  48. data/lib/ultracart_api/models/sfvb_comms_provider_import_request.rb +242 -0
  49. data/lib/ultracart_api/models/sfvb_comms_provider_import_response.rb +264 -0
  50. data/lib/ultracart_api/models/sfvb_comms_provider_list.rb +230 -0
  51. data/lib/ultracart_api/models/sfvb_comms_providers_response.rb +244 -0
  52. data/lib/ultracart_api/models/sfvb_comms_sender.rb +250 -0
  53. data/lib/ultracart_api/models/sfvb_comms_sender_update.rb +240 -0
  54. data/lib/ultracart_api/models/sfvb_comms_sequence_stats_response.rb +263 -0
  55. data/lib/ultracart_api/models/sfvb_comms_settings.rb +297 -0
  56. data/lib/ultracart_api/models/sfvb_comms_settings_response.rb +253 -0
  57. data/lib/ultracart_api/models/sfvb_comms_settings_update_request.rb +257 -0
  58. data/lib/ultracart_api/models/sfvb_comms_stat.rb +402 -0
  59. data/lib/ultracart_api/models/sfvb_comms_step_stat.rb +301 -0
  60. data/lib/ultracart_api/models/sfvb_comms_template.rb +280 -0
  61. data/lib/ultracart_api/models/sfvb_comms_template_response.rb +251 -0
  62. data/lib/ultracart_api/models/sfvb_comms_templates_response.rb +234 -0
  63. data/lib/ultracart_api/models/sfvb_comms_test_email_request.rb +252 -0
  64. data/lib/ultracart_api/models/sfvb_comms_test_postcard_request.rb +312 -0
  65. data/lib/ultracart_api/models/sfvb_comms_test_send_response.rb +292 -0
  66. data/lib/ultracart_api/models/sfvb_comms_test_sms_request.rb +220 -0
  67. data/lib/ultracart_api/version.rb +1 -1
  68. data/lib/ultracart_api.rb +29 -0
  69. metadata +59 -1
@@ -0,0 +1,280 @@
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 SfvbCommsDailyStat
18
+ # Emails bounced.
19
+ attr_accessor :bounced
20
+
21
+ # The day.
22
+ attr_accessor :date
23
+
24
+ # Emails delivered.
25
+ attr_accessor :delivered
26
+
27
+ # Revenue attributed.
28
+ attr_accessor :revenue
29
+
30
+ # Flow and campaign emails sent.
31
+ attr_accessor :sequence_sent
32
+
33
+ # Spam complaints.
34
+ attr_accessor :spam
35
+
36
+ # Transactional emails sent.
37
+ attr_accessor :transactional_sent
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'bounced' => :'bounced',
43
+ :'date' => :'date',
44
+ :'delivered' => :'delivered',
45
+ :'revenue' => :'revenue',
46
+ :'sequence_sent' => :'sequence_sent',
47
+ :'spam' => :'spam',
48
+ :'transactional_sent' => :'transactional_sent'
49
+ }
50
+ end
51
+
52
+ # Returns all the JSON keys this model knows about
53
+ def self.acceptable_attributes
54
+ attribute_map.values
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'bounced' => :'Integer',
61
+ :'date' => :'String',
62
+ :'delivered' => :'Integer',
63
+ :'revenue' => :'Float',
64
+ :'sequence_sent' => :'Integer',
65
+ :'spam' => :'Integer',
66
+ :'transactional_sent' => :'Integer'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsDailyStat` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsDailyStat`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'bounced')
92
+ self.bounced = attributes[:'bounced']
93
+ end
94
+
95
+ if attributes.key?(:'date')
96
+ self.date = attributes[:'date']
97
+ end
98
+
99
+ if attributes.key?(:'delivered')
100
+ self.delivered = attributes[:'delivered']
101
+ end
102
+
103
+ if attributes.key?(:'revenue')
104
+ self.revenue = attributes[:'revenue']
105
+ end
106
+
107
+ if attributes.key?(:'sequence_sent')
108
+ self.sequence_sent = attributes[:'sequence_sent']
109
+ end
110
+
111
+ if attributes.key?(:'spam')
112
+ self.spam = attributes[:'spam']
113
+ end
114
+
115
+ if attributes.key?(:'transactional_sent')
116
+ self.transactional_sent = attributes[:'transactional_sent']
117
+ end
118
+ end
119
+
120
+ # Show invalid properties with the reasons. Usually used together with valid?
121
+ # @return Array for valid properties with the reasons
122
+ def list_invalid_properties
123
+ invalid_properties = Array.new
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ true
131
+ end
132
+
133
+ # Checks equality by comparing each attribute.
134
+ # @param [Object] Object to be compared
135
+ def ==(o)
136
+ return true if self.equal?(o)
137
+ self.class == o.class &&
138
+ bounced == o.bounced &&
139
+ date == o.date &&
140
+ delivered == o.delivered &&
141
+ revenue == o.revenue &&
142
+ sequence_sent == o.sequence_sent &&
143
+ spam == o.spam &&
144
+ transactional_sent == o.transactional_sent
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [bounced, date, delivered, revenue, sequence_sent, spam, transactional_sent].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ attributes = attributes.transform_keys(&:to_sym)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
174
+ self.send("#{key}=", nil)
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
179
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
180
+ end
181
+ elsif !attributes[self.class.attribute_map[key]].nil?
182
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ end
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :Time
196
+ Time.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :Boolean
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ # models (e.g. Pet) or oneOf
227
+ klass = UltracartClient.const_get(type)
228
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ if value.nil?
251
+ is_nullable = self.class.openapi_nullable.include?(attr)
252
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
+ end
254
+
255
+ hash[param] = _to_hash(value)
256
+ end
257
+ hash
258
+ end
259
+
260
+ # Outputs non-array value in the form of hash
261
+ # For object, use to_hash. Otherwise, just return the value
262
+ # @param [Object] value Any valid value
263
+ # @return [Hash] Returns the value in the form of hash
264
+ def _to_hash(value)
265
+ if value.is_a?(Array)
266
+ value.compact.map { |v| _to_hash(v) }
267
+ elsif value.is_a?(Hash)
268
+ {}.tap do |hash|
269
+ value.each { |k, v| hash[k] = _to_hash(v) }
270
+ end
271
+ elsif value.respond_to? :to_hash
272
+ value.to_hash
273
+ else
274
+ value
275
+ end
276
+ end
277
+
278
+ end
279
+
280
+ end
@@ -0,0 +1,256 @@
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 SfvbCommsDashboardResponse
18
+ # The account's last 31 days of sending, whatever the window.
19
+ attr_accessor :daily
20
+
21
+ # The window, in days, for the rows.
22
+ attr_accessor :days
23
+
24
+ # What the windows are.
25
+ attr_accessor :notes
26
+
27
+ # Each flow and campaign with counts in the window.
28
+ attr_accessor :rows
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'daily' => :'daily',
34
+ :'days' => :'days',
35
+ :'notes' => :'notes',
36
+ :'rows' => :'rows'
37
+ }
38
+ end
39
+
40
+ # Returns all the JSON keys this model knows about
41
+ def self.acceptable_attributes
42
+ attribute_map.values
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.openapi_types
47
+ {
48
+ :'daily' => :'Array<SfvbCommsDailyStat>',
49
+ :'days' => :'Integer',
50
+ :'notes' => :'Array<String>',
51
+ :'rows' => :'Array<SfvbCommsDashboardRow>'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsDashboardResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ attributes = attributes.each_with_object({}) { |(k, v), h|
70
+ if (!self.class.attribute_map.key?(k.to_sym))
71
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsDashboardResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
72
+ end
73
+ h[k.to_sym] = v
74
+ }
75
+
76
+ if attributes.key?(:'daily')
77
+ if (value = attributes[:'daily']).is_a?(Array)
78
+ self.daily = value
79
+ end
80
+ end
81
+
82
+ if attributes.key?(:'days')
83
+ self.days = attributes[:'days']
84
+ end
85
+
86
+ if attributes.key?(:'notes')
87
+ if (value = attributes[:'notes']).is_a?(Array)
88
+ self.notes = value
89
+ end
90
+ end
91
+
92
+ if attributes.key?(:'rows')
93
+ if (value = attributes[:'rows']).is_a?(Array)
94
+ self.rows = value
95
+ end
96
+ end
97
+ end
98
+
99
+ # Show invalid properties with the reasons. Usually used together with valid?
100
+ # @return Array for valid properties with the reasons
101
+ def list_invalid_properties
102
+ invalid_properties = Array.new
103
+ invalid_properties
104
+ end
105
+
106
+ # Check to see if the all the properties in the model are valid
107
+ # @return true if the model is valid
108
+ def valid?
109
+ true
110
+ end
111
+
112
+ # Checks equality by comparing each attribute.
113
+ # @param [Object] Object to be compared
114
+ def ==(o)
115
+ return true if self.equal?(o)
116
+ self.class == o.class &&
117
+ daily == o.daily &&
118
+ days == o.days &&
119
+ notes == o.notes &&
120
+ rows == o.rows
121
+ end
122
+
123
+ # @see the `==` method
124
+ # @param [Object] Object to be compared
125
+ def eql?(o)
126
+ self == o
127
+ end
128
+
129
+ # Calculates hash code according to all attributes.
130
+ # @return [Integer] Hash code
131
+ def hash
132
+ [daily, days, notes, rows].hash
133
+ end
134
+
135
+ # Builds the object from hash
136
+ # @param [Hash] attributes Model attributes in the form of hash
137
+ # @return [Object] Returns the model itself
138
+ def self.build_from_hash(attributes)
139
+ new.build_from_hash(attributes)
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ self.class.openapi_types.each_pair do |key, type|
149
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
150
+ self.send("#{key}=", nil)
151
+ elsif type =~ /\AArray<(.*)>/i
152
+ # check to ensure the input is an array given that the attribute
153
+ # is documented as an array but the input is not
154
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
155
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
156
+ end
157
+ elsif !attributes[self.class.attribute_map[key]].nil?
158
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
159
+ end
160
+ end
161
+
162
+ self
163
+ end
164
+
165
+ # Deserializes the data based on type
166
+ # @param string type Data type
167
+ # @param string value Value to be deserialized
168
+ # @return [Object] Deserialized data
169
+ def _deserialize(type, value)
170
+ case type.to_sym
171
+ when :Time
172
+ Time.parse(value)
173
+ when :Date
174
+ Date.parse(value)
175
+ when :String
176
+ value.to_s
177
+ when :Integer
178
+ value.to_i
179
+ when :Float
180
+ value.to_f
181
+ when :Boolean
182
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
183
+ true
184
+ else
185
+ false
186
+ end
187
+ when :Object
188
+ # generic object (usually a Hash), return directly
189
+ value
190
+ when /\AArray<(?<inner_type>.+)>\z/
191
+ inner_type = Regexp.last_match[:inner_type]
192
+ value.map { |v| _deserialize(inner_type, v) }
193
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
194
+ k_type = Regexp.last_match[:k_type]
195
+ v_type = Regexp.last_match[:v_type]
196
+ {}.tap do |hash|
197
+ value.each do |k, v|
198
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
199
+ end
200
+ end
201
+ else # model
202
+ # models (e.g. Pet) or oneOf
203
+ klass = UltracartClient.const_get(type)
204
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
205
+ end
206
+ end
207
+
208
+ # Returns the string representation of the object
209
+ # @return [String] String presentation of the object
210
+ def to_s
211
+ to_hash.to_s
212
+ end
213
+
214
+ # to_body is an alias to to_hash (backward compatibility)
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_body
217
+ to_hash
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ self.class.attribute_map.each_pair do |attr, param|
225
+ value = self.send(attr)
226
+ if value.nil?
227
+ is_nullable = self.class.openapi_nullable.include?(attr)
228
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
229
+ end
230
+
231
+ hash[param] = _to_hash(value)
232
+ end
233
+ hash
234
+ end
235
+
236
+ # Outputs non-array value in the form of hash
237
+ # For object, use to_hash. Otherwise, just return the value
238
+ # @param [Object] value Any valid value
239
+ # @return [Hash] Returns the value in the form of hash
240
+ def _to_hash(value)
241
+ if value.is_a?(Array)
242
+ value.compact.map { |v| _to_hash(v) }
243
+ elsif value.is_a?(Hash)
244
+ {}.tap do |hash|
245
+ value.each { |k, v| hash[k] = _to_hash(v) }
246
+ end
247
+ elsif value.respond_to? :to_hash
248
+ value.to_hash
249
+ else
250
+ value
251
+ end
252
+ end
253
+
254
+ end
255
+
256
+ end