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