ultracart_api 4.1.229 → 4.1.231

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -2
  3. data/docs/ItemAutoOrder.md +6 -0
  4. data/docs/SfvbApi.md +846 -3
  5. data/docs/SfvbApprovalCreateRequest.md +3 -1
  6. data/docs/SfvbCampaign.md +2 -0
  7. data/docs/SfvbCommsFolder.md +28 -0
  8. data/docs/SfvbCommsFolderItem.md +22 -0
  9. data/docs/SfvbCommsFolderResponse.md +22 -0
  10. data/docs/SfvbCommsFolderWriteRequest.md +18 -0
  11. data/docs/SfvbCommsFoldersResponse.md +18 -0
  12. data/docs/SfvbCommsListDetail.md +34 -0
  13. data/docs/SfvbCommsListResponse.md +20 -0
  14. data/docs/SfvbCommsListWriteRequest.md +24 -0
  15. data/docs/SfvbCommsMember.md +22 -0
  16. data/docs/SfvbCommsMembersResponse.md +36 -0
  17. data/docs/SfvbFlow.md +2 -0
  18. data/docs/SfvbFlowWriteRequest.md +2 -2
  19. data/docs/SfvbPostcardAddress.md +28 -0
  20. data/docs/SfvbPostcardCard.md +40 -0
  21. data/docs/SfvbPostcardTrackingResponse.md +34 -0
  22. data/docs/SfvbSequenceStep.md +1 -1
  23. data/docs/SfvbStepCounts.md +1 -1
  24. data/docs/SfvbTransactionalChange.md +24 -0
  25. data/docs/SfvbTransactionalDeliveryOption.md +22 -0
  26. data/docs/SfvbTransactionalEmailDetail.md +30 -0
  27. data/docs/SfvbTransactionalEmailResponse.md +24 -0
  28. data/docs/SfvbTransactionalEmailUpdateRequest.md +28 -0
  29. data/docs/SfvbTransactionalSender.md +24 -0
  30. data/lib/ultracart_api/api/sfvb_api.rb +1220 -61
  31. data/lib/ultracart_api/models/item_auto_order.rb +35 -1
  32. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +15 -6
  33. data/lib/ultracart_api/models/sfvb_campaign.rb +11 -1
  34. data/lib/ultracart_api/models/sfvb_comms_folder.rb +270 -0
  35. data/lib/ultracart_api/models/sfvb_comms_folder_item.rb +240 -0
  36. data/lib/ultracart_api/models/sfvb_comms_folder_response.rb +243 -0
  37. data/lib/ultracart_api/models/sfvb_comms_folder_write_request.rb +220 -0
  38. data/lib/ultracart_api/models/sfvb_comms_folders_response.rb +222 -0
  39. data/lib/ultracart_api/models/sfvb_comms_list_detail.rb +302 -0
  40. data/lib/ultracart_api/models/sfvb_comms_list_response.rb +231 -0
  41. data/lib/ultracart_api/models/sfvb_comms_list_write_request.rb +250 -0
  42. data/lib/ultracart_api/models/sfvb_comms_member.rb +240 -0
  43. data/lib/ultracart_api/models/sfvb_comms_members_response.rb +314 -0
  44. data/lib/ultracart_api/models/sfvb_flow.rb +11 -1
  45. data/lib/ultracart_api/models/sfvb_flow_write_request.rb +2 -2
  46. data/lib/ultracart_api/models/sfvb_postcard_address.rb +270 -0
  47. data/lib/ultracart_api/models/sfvb_postcard_card.rb +328 -0
  48. data/lib/ultracart_api/models/sfvb_postcard_tracking_response.rb +304 -0
  49. data/lib/ultracart_api/models/sfvb_sequence_step.rb +1 -1
  50. data/lib/ultracart_api/models/sfvb_step_counts.rb +1 -1
  51. data/lib/ultracart_api/models/sfvb_transactional_change.rb +250 -0
  52. data/lib/ultracart_api/models/sfvb_transactional_delivery_option.rb +240 -0
  53. data/lib/ultracart_api/models/sfvb_transactional_email_detail.rb +283 -0
  54. data/lib/ultracart_api/models/sfvb_transactional_email_response.rb +253 -0
  55. data/lib/ultracart_api/models/sfvb_transactional_email_update_request.rb +272 -0
  56. data/lib/ultracart_api/models/sfvb_transactional_sender.rb +250 -0
  57. data/lib/ultracart_api/version.rb +1 -1
  58. data/lib/ultracart_api.rb +19 -0
  59. metadata +40 -2
@@ -0,0 +1,222 @@
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 SfvbCommsFoldersResponse
18
+ # The folders, by name.
19
+ attr_accessor :folders
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'folders' => :'folders'
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
+ :'folders' => :'Array<SfvbCommsFolder>'
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::SfvbCommsFoldersResponse` 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::SfvbCommsFoldersResponse`. 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?(:'folders')
62
+ if (value = attributes[:'folders']).is_a?(Array)
63
+ self.folders = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ folders == o.folders
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [folders].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ attributes = attributes.transform_keys(&:to_sym)
114
+ self.class.openapi_types.each_pair do |key, type|
115
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
116
+ self.send("#{key}=", nil)
117
+ elsif type =~ /\AArray<(.*)>/i
118
+ # check to ensure the input is an array given that the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
125
+ end
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Deserializes the data based on type
132
+ # @param string type Data type
133
+ # @param string value Value to be deserialized
134
+ # @return [Object] Deserialized data
135
+ def _deserialize(type, value)
136
+ case type.to_sym
137
+ when :Time
138
+ Time.parse(value)
139
+ when :Date
140
+ Date.parse(value)
141
+ when :String
142
+ value.to_s
143
+ when :Integer
144
+ value.to_i
145
+ when :Float
146
+ value.to_f
147
+ when :Boolean
148
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
149
+ true
150
+ else
151
+ false
152
+ end
153
+ when :Object
154
+ # generic object (usually a Hash), return directly
155
+ value
156
+ when /\AArray<(?<inner_type>.+)>\z/
157
+ inner_type = Regexp.last_match[:inner_type]
158
+ value.map { |v| _deserialize(inner_type, v) }
159
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
160
+ k_type = Regexp.last_match[:k_type]
161
+ v_type = Regexp.last_match[:v_type]
162
+ {}.tap do |hash|
163
+ value.each do |k, v|
164
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
165
+ end
166
+ end
167
+ else # model
168
+ # models (e.g. Pet) or oneOf
169
+ klass = UltracartClient.const_get(type)
170
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
171
+ end
172
+ end
173
+
174
+ # Returns the string representation of the object
175
+ # @return [String] String presentation of the object
176
+ def to_s
177
+ to_hash.to_s
178
+ end
179
+
180
+ # to_body is an alias to to_hash (backward compatibility)
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_body
183
+ to_hash
184
+ end
185
+
186
+ # Returns the object in the form of hash
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_hash
189
+ hash = {}
190
+ self.class.attribute_map.each_pair do |attr, param|
191
+ value = self.send(attr)
192
+ if value.nil?
193
+ is_nullable = self.class.openapi_nullable.include?(attr)
194
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
195
+ end
196
+
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+
222
+ end
@@ -0,0 +1,302 @@
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 SfvbCommsListDetail
18
+ # When the list was created.
19
+ attr_accessor :created_dts
20
+
21
+ # The list and segment folder it is filed in, or none.
22
+ attr_accessor :folder_uuid
23
+
24
+ # The hash of the name, folder and public settings. Send it as If-Match to change or archive the list.
25
+ attr_accessor :hash_sha256
26
+
27
+ # The list uuid.
28
+ attr_accessor :list_uuid
29
+
30
+ # How many customers are on the list.
31
+ attr_accessor :member_count
32
+
33
+ # The list name.
34
+ attr_accessor :name
35
+
36
+ # The description subscribers see for a public list.
37
+ attr_accessor :public_description
38
+
39
+ # True when subscribers can choose this list on the storefront's email preferences page.
40
+ attr_accessor :public_list
41
+
42
+ # The campaigns that send to the list and the flows it starts, each with whether it is live.
43
+ attr_accessor :used_by
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'created_dts' => :'created_dts',
49
+ :'folder_uuid' => :'folder_uuid',
50
+ :'hash_sha256' => :'hash_sha256',
51
+ :'list_uuid' => :'list_uuid',
52
+ :'member_count' => :'member_count',
53
+ :'name' => :'name',
54
+ :'public_description' => :'public_description',
55
+ :'public_list' => :'public_list',
56
+ :'used_by' => :'used_by'
57
+ }
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'created_dts' => :'String',
69
+ :'folder_uuid' => :'String',
70
+ :'hash_sha256' => :'String',
71
+ :'list_uuid' => :'String',
72
+ :'member_count' => :'Integer',
73
+ :'name' => :'String',
74
+ :'public_description' => :'String',
75
+ :'public_list' => :'Boolean',
76
+ :'used_by' => :'Array<SfvbCommsSegmentUsedBy>'
77
+ }
78
+ end
79
+
80
+ # List of attributes with nullable: true
81
+ def self.openapi_nullable
82
+ Set.new([
83
+ ])
84
+ end
85
+
86
+ # Initializes the object
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ def initialize(attributes = {})
89
+ if (!attributes.is_a?(Hash))
90
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbCommsListDetail` initialize method"
91
+ end
92
+
93
+ # check to see if the attribute exists and convert string to symbol for hash key
94
+ attributes = attributes.each_with_object({}) { |(k, v), h|
95
+ if (!self.class.attribute_map.key?(k.to_sym))
96
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbCommsListDetail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
97
+ end
98
+ h[k.to_sym] = v
99
+ }
100
+
101
+ if attributes.key?(:'created_dts')
102
+ self.created_dts = attributes[:'created_dts']
103
+ end
104
+
105
+ if attributes.key?(:'folder_uuid')
106
+ self.folder_uuid = attributes[:'folder_uuid']
107
+ end
108
+
109
+ if attributes.key?(:'hash_sha256')
110
+ self.hash_sha256 = attributes[:'hash_sha256']
111
+ end
112
+
113
+ if attributes.key?(:'list_uuid')
114
+ self.list_uuid = attributes[:'list_uuid']
115
+ end
116
+
117
+ if attributes.key?(:'member_count')
118
+ self.member_count = attributes[:'member_count']
119
+ end
120
+
121
+ if attributes.key?(:'name')
122
+ self.name = attributes[:'name']
123
+ end
124
+
125
+ if attributes.key?(:'public_description')
126
+ self.public_description = attributes[:'public_description']
127
+ end
128
+
129
+ if attributes.key?(:'public_list')
130
+ self.public_list = attributes[:'public_list']
131
+ end
132
+
133
+ if attributes.key?(:'used_by')
134
+ if (value = attributes[:'used_by']).is_a?(Array)
135
+ self.used_by = value
136
+ end
137
+ end
138
+ end
139
+
140
+ # Show invalid properties with the reasons. Usually used together with valid?
141
+ # @return Array for valid properties with the reasons
142
+ def list_invalid_properties
143
+ invalid_properties = Array.new
144
+ invalid_properties
145
+ end
146
+
147
+ # Check to see if the all the properties in the model are valid
148
+ # @return true if the model is valid
149
+ def valid?
150
+ true
151
+ end
152
+
153
+ # Checks equality by comparing each attribute.
154
+ # @param [Object] Object to be compared
155
+ def ==(o)
156
+ return true if self.equal?(o)
157
+ self.class == o.class &&
158
+ created_dts == o.created_dts &&
159
+ folder_uuid == o.folder_uuid &&
160
+ hash_sha256 == o.hash_sha256 &&
161
+ list_uuid == o.list_uuid &&
162
+ member_count == o.member_count &&
163
+ name == o.name &&
164
+ public_description == o.public_description &&
165
+ public_list == o.public_list &&
166
+ used_by == o.used_by
167
+ end
168
+
169
+ # @see the `==` method
170
+ # @param [Object] Object to be compared
171
+ def eql?(o)
172
+ self == o
173
+ end
174
+
175
+ # Calculates hash code according to all attributes.
176
+ # @return [Integer] Hash code
177
+ def hash
178
+ [created_dts, folder_uuid, hash_sha256, list_uuid, member_count, name, public_description, public_list, used_by].hash
179
+ end
180
+
181
+ # Builds the object from hash
182
+ # @param [Hash] attributes Model attributes in the form of hash
183
+ # @return [Object] Returns the model itself
184
+ def self.build_from_hash(attributes)
185
+ new.build_from_hash(attributes)
186
+ end
187
+
188
+ # Builds the object from hash
189
+ # @param [Hash] attributes Model attributes in the form of hash
190
+ # @return [Object] Returns the model itself
191
+ def build_from_hash(attributes)
192
+ return nil unless attributes.is_a?(Hash)
193
+ attributes = attributes.transform_keys(&:to_sym)
194
+ self.class.openapi_types.each_pair do |key, type|
195
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
196
+ self.send("#{key}=", nil)
197
+ elsif type =~ /\AArray<(.*)>/i
198
+ # check to ensure the input is an array given that the attribute
199
+ # is documented as an array but the input is not
200
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
201
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
202
+ end
203
+ elsif !attributes[self.class.attribute_map[key]].nil?
204
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
205
+ end
206
+ end
207
+
208
+ self
209
+ end
210
+
211
+ # Deserializes the data based on type
212
+ # @param string type Data type
213
+ # @param string value Value to be deserialized
214
+ # @return [Object] Deserialized data
215
+ def _deserialize(type, value)
216
+ case type.to_sym
217
+ when :Time
218
+ Time.parse(value)
219
+ when :Date
220
+ Date.parse(value)
221
+ when :String
222
+ value.to_s
223
+ when :Integer
224
+ value.to_i
225
+ when :Float
226
+ value.to_f
227
+ when :Boolean
228
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
229
+ true
230
+ else
231
+ false
232
+ end
233
+ when :Object
234
+ # generic object (usually a Hash), return directly
235
+ value
236
+ when /\AArray<(?<inner_type>.+)>\z/
237
+ inner_type = Regexp.last_match[:inner_type]
238
+ value.map { |v| _deserialize(inner_type, v) }
239
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
240
+ k_type = Regexp.last_match[:k_type]
241
+ v_type = Regexp.last_match[:v_type]
242
+ {}.tap do |hash|
243
+ value.each do |k, v|
244
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
245
+ end
246
+ end
247
+ else # model
248
+ # models (e.g. Pet) or oneOf
249
+ klass = UltracartClient.const_get(type)
250
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
251
+ end
252
+ end
253
+
254
+ # Returns the string representation of the object
255
+ # @return [String] String presentation of the object
256
+ def to_s
257
+ to_hash.to_s
258
+ end
259
+
260
+ # to_body is an alias to to_hash (backward compatibility)
261
+ # @return [Hash] Returns the object in the form of hash
262
+ def to_body
263
+ to_hash
264
+ end
265
+
266
+ # Returns the object in the form of hash
267
+ # @return [Hash] Returns the object in the form of hash
268
+ def to_hash
269
+ hash = {}
270
+ self.class.attribute_map.each_pair do |attr, param|
271
+ value = self.send(attr)
272
+ if value.nil?
273
+ is_nullable = self.class.openapi_nullable.include?(attr)
274
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
275
+ end
276
+
277
+ hash[param] = _to_hash(value)
278
+ end
279
+ hash
280
+ end
281
+
282
+ # Outputs non-array value in the form of hash
283
+ # For object, use to_hash. Otherwise, just return the value
284
+ # @param [Object] value Any valid value
285
+ # @return [Hash] Returns the value in the form of hash
286
+ def _to_hash(value)
287
+ if value.is_a?(Array)
288
+ value.compact.map { |v| _to_hash(v) }
289
+ elsif value.is_a?(Hash)
290
+ {}.tap do |hash|
291
+ value.each { |k, v| hash[k] = _to_hash(v) }
292
+ end
293
+ elsif value.respond_to? :to_hash
294
+ value.to_hash
295
+ else
296
+ value
297
+ end
298
+ end
299
+
300
+ end
301
+
302
+ end