ultracart_api 4.1.203 → 4.1.205

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.
@@ -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 SfvbTransactionalEmail
18
+ # The body container a draft replaces, such as receipt_body.cjson.
19
+ attr_accessor :body_file_name
20
+
21
+ # The HTML template file, such as receipt_html.vm.
22
+ attr_accessor :file_name
23
+
24
+ # The display name, such as Order - Receipt.
25
+ attr_accessor :name
26
+
27
+ # The plain text template file, when the email has one.
28
+ attr_accessor :text_file_name
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'body_file_name' => :'body_file_name',
34
+ :'file_name' => :'file_name',
35
+ :'name' => :'name',
36
+ :'text_file_name' => :'text_file_name'
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
+ :'body_file_name' => :'String',
49
+ :'file_name' => :'String',
50
+ :'name' => :'String',
51
+ :'text_file_name' => :'String'
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::SfvbTransactionalEmail` 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::SfvbTransactionalEmail`. 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?(:'body_file_name')
77
+ self.body_file_name = attributes[:'body_file_name']
78
+ end
79
+
80
+ if attributes.key?(:'file_name')
81
+ self.file_name = attributes[:'file_name']
82
+ end
83
+
84
+ if attributes.key?(:'name')
85
+ self.name = attributes[:'name']
86
+ end
87
+
88
+ if attributes.key?(:'text_file_name')
89
+ self.text_file_name = attributes[:'text_file_name']
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
+ body_file_name == o.body_file_name &&
112
+ file_name == o.file_name &&
113
+ name == o.name &&
114
+ text_file_name == o.text_file_name
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
+ [body_file_name, file_name, name, text_file_name].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
@@ -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 SfvbTransactionalEmailsResponse
18
+ # The emails, sorted by name.
19
+ attr_accessor :emails
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'emails' => :'emails'
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
+ :'emails' => :'Array<SfvbTransactionalEmail>'
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::SfvbTransactionalEmailsResponse` 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::SfvbTransactionalEmailsResponse`. 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?(:'emails')
62
+ if (value = attributes[:'emails']).is_a?(Array)
63
+ self.emails = 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
+ emails == o.emails
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
+ [emails].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
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.203'
14
+ VERSION = '4.1.205'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -996,6 +996,11 @@ require 'ultracart_api/models/sfvb_blog_post_image'
996
996
  require 'ultracart_api/models/sfvb_blog_post_image_request'
997
997
  require 'ultracart_api/models/sfvb_blog_post_request'
998
998
  require 'ultracart_api/models/sfvb_blog_posts_response'
999
+ require 'ultracart_api/models/sfvb_comms_dns_record'
1000
+ require 'ultracart_api/models/sfvb_comms_sending_domain'
1001
+ require 'ultracart_api/models/sfvb_comms_sending_domains_response'
1002
+ require 'ultracart_api/models/sfvb_comms_twilio_account'
1003
+ require 'ultracart_api/models/sfvb_comms_twilio_account_response'
999
1004
  require 'ultracart_api/models/sfvb_compile_request'
1000
1005
  require 'ultracart_api/models/sfvb_compile_response'
1001
1006
  require 'ultracart_api/models/sfvb_container_response'
@@ -1006,6 +1011,8 @@ require 'ultracart_api/models/sfvb_container_write_request'
1006
1011
  require 'ultracart_api/models/sfvb_element'
1007
1012
  require 'ultracart_api/models/sfvb_element_schema_response'
1008
1013
  require 'ultracart_api/models/sfvb_elements_response'
1014
+ require 'ultracart_api/models/sfvb_email_render_request'
1015
+ require 'ultracart_api/models/sfvb_email_render_response'
1009
1016
  require 'ultracart_api/models/sfvb_error_detail'
1010
1017
  require 'ultracart_api/models/sfvb_event'
1011
1018
  require 'ultracart_api/models/sfvb_events_auth_request'
@@ -1187,6 +1194,8 @@ require 'ultracart_api/models/sfvb_theme_font'
1187
1194
  require 'ultracart_api/models/sfvb_theme_font_family'
1188
1195
  require 'ultracart_api/models/sfvb_theme_job_response'
1189
1196
  require 'ultracart_api/models/sfvb_themes_response'
1197
+ require 'ultracart_api/models/sfvb_transactional_email'
1198
+ require 'ultracart_api/models/sfvb_transactional_emails_response'
1190
1199
  require 'ultracart_api/models/sfvb_upsell_item_logic'
1191
1200
  require 'ultracart_api/models/sfvb_upsell_item_logic_item'
1192
1201
  require 'ultracart_api/models/sfvb_upsell_offer'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.203
4
+ version: 4.1.205
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1058,6 +1058,11 @@ files:
1058
1058
  - docs/SfvbBlogPostImageRequest.md
1059
1059
  - docs/SfvbBlogPostRequest.md
1060
1060
  - docs/SfvbBlogPostsResponse.md
1061
+ - docs/SfvbCommsDnsRecord.md
1062
+ - docs/SfvbCommsSendingDomain.md
1063
+ - docs/SfvbCommsSendingDomainsResponse.md
1064
+ - docs/SfvbCommsTwilioAccount.md
1065
+ - docs/SfvbCommsTwilioAccountResponse.md
1061
1066
  - docs/SfvbCompileRequest.md
1062
1067
  - docs/SfvbCompileResponse.md
1063
1068
  - docs/SfvbContainerResponse.md
@@ -1068,6 +1073,8 @@ files:
1068
1073
  - docs/SfvbElement.md
1069
1074
  - docs/SfvbElementSchemaResponse.md
1070
1075
  - docs/SfvbElementsResponse.md
1076
+ - docs/SfvbEmailRenderRequest.md
1077
+ - docs/SfvbEmailRenderResponse.md
1071
1078
  - docs/SfvbErrorDetail.md
1072
1079
  - docs/SfvbEvent.md
1073
1080
  - docs/SfvbEventsAuthRequest.md
@@ -1249,6 +1256,8 @@ files:
1249
1256
  - docs/SfvbThemeFontFamily.md
1250
1257
  - docs/SfvbThemeJobResponse.md
1251
1258
  - docs/SfvbThemesResponse.md
1259
+ - docs/SfvbTransactionalEmail.md
1260
+ - docs/SfvbTransactionalEmailsResponse.md
1252
1261
  - docs/SfvbUpsellItemLogic.md
1253
1262
  - docs/SfvbUpsellItemLogicItem.md
1254
1263
  - docs/SfvbUpsellOffer.md
@@ -2374,6 +2383,11 @@ files:
2374
2383
  - lib/ultracart_api/models/sfvb_blog_post_image_request.rb
2375
2384
  - lib/ultracart_api/models/sfvb_blog_post_request.rb
2376
2385
  - lib/ultracart_api/models/sfvb_blog_posts_response.rb
2386
+ - lib/ultracart_api/models/sfvb_comms_dns_record.rb
2387
+ - lib/ultracart_api/models/sfvb_comms_sending_domain.rb
2388
+ - lib/ultracart_api/models/sfvb_comms_sending_domains_response.rb
2389
+ - lib/ultracart_api/models/sfvb_comms_twilio_account.rb
2390
+ - lib/ultracart_api/models/sfvb_comms_twilio_account_response.rb
2377
2391
  - lib/ultracart_api/models/sfvb_compile_request.rb
2378
2392
  - lib/ultracart_api/models/sfvb_compile_response.rb
2379
2393
  - lib/ultracart_api/models/sfvb_container_response.rb
@@ -2384,6 +2398,8 @@ files:
2384
2398
  - lib/ultracart_api/models/sfvb_element.rb
2385
2399
  - lib/ultracart_api/models/sfvb_element_schema_response.rb
2386
2400
  - lib/ultracart_api/models/sfvb_elements_response.rb
2401
+ - lib/ultracart_api/models/sfvb_email_render_request.rb
2402
+ - lib/ultracart_api/models/sfvb_email_render_response.rb
2387
2403
  - lib/ultracart_api/models/sfvb_error_detail.rb
2388
2404
  - lib/ultracart_api/models/sfvb_event.rb
2389
2405
  - lib/ultracart_api/models/sfvb_events_auth_request.rb
@@ -2565,6 +2581,8 @@ files:
2565
2581
  - lib/ultracart_api/models/sfvb_theme_font_family.rb
2566
2582
  - lib/ultracart_api/models/sfvb_theme_job_response.rb
2567
2583
  - lib/ultracart_api/models/sfvb_themes_response.rb
2584
+ - lib/ultracart_api/models/sfvb_transactional_email.rb
2585
+ - lib/ultracart_api/models/sfvb_transactional_emails_response.rb
2568
2586
  - lib/ultracart_api/models/sfvb_upsell_item_logic.rb
2569
2587
  - lib/ultracart_api/models/sfvb_upsell_item_logic_item.rb
2570
2588
  - lib/ultracart_api/models/sfvb_upsell_offer.rb