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