ultracart_api 4.1.101 → 4.1.103

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,277 @@
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 EmailCommseqEnrollmentResponse
18
+ # True if the customer was already enrolled and therefore not enrolled again
19
+ attr_accessor :already_enrolled
20
+
21
+ # True if the customer was newly enrolled into the sequence
22
+ attr_accessor :enrolled
23
+
24
+ attr_accessor :error
25
+
26
+ # The resolved ESP customer UUID for the enrolled email
27
+ attr_accessor :esp_customer_uuid
28
+
29
+ attr_accessor :metadata
30
+
31
+ # Indicates if API call was successful
32
+ attr_accessor :success
33
+
34
+ attr_accessor :warning
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'already_enrolled' => :'already_enrolled',
40
+ :'enrolled' => :'enrolled',
41
+ :'error' => :'error',
42
+ :'esp_customer_uuid' => :'esp_customer_uuid',
43
+ :'metadata' => :'metadata',
44
+ :'success' => :'success',
45
+ :'warning' => :'warning'
46
+ }
47
+ end
48
+
49
+ # Returns all the JSON keys this model knows about
50
+ def self.acceptable_attributes
51
+ attribute_map.values
52
+ end
53
+
54
+ # Attribute type mapping.
55
+ def self.openapi_types
56
+ {
57
+ :'already_enrolled' => :'Boolean',
58
+ :'enrolled' => :'Boolean',
59
+ :'error' => :'Error',
60
+ :'esp_customer_uuid' => :'String',
61
+ :'metadata' => :'ResponseMetadata',
62
+ :'success' => :'Boolean',
63
+ :'warning' => :'Warning'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqEnrollmentResponse` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqEnrollmentResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'already_enrolled')
89
+ self.already_enrolled = attributes[:'already_enrolled']
90
+ end
91
+
92
+ if attributes.key?(:'enrolled')
93
+ self.enrolled = attributes[:'enrolled']
94
+ end
95
+
96
+ if attributes.key?(:'error')
97
+ self.error = attributes[:'error']
98
+ end
99
+
100
+ if attributes.key?(:'esp_customer_uuid')
101
+ self.esp_customer_uuid = attributes[:'esp_customer_uuid']
102
+ end
103
+
104
+ if attributes.key?(:'metadata')
105
+ self.metadata = attributes[:'metadata']
106
+ end
107
+
108
+ if attributes.key?(:'success')
109
+ self.success = attributes[:'success']
110
+ end
111
+
112
+ if attributes.key?(:'warning')
113
+ self.warning = attributes[:'warning']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ true
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ already_enrolled == o.already_enrolled &&
136
+ enrolled == o.enrolled &&
137
+ error == o.error &&
138
+ esp_customer_uuid == o.esp_customer_uuid &&
139
+ metadata == o.metadata &&
140
+ success == o.success &&
141
+ warning == o.warning
142
+ end
143
+
144
+ # @see the `==` method
145
+ # @param [Object] Object to be compared
146
+ def eql?(o)
147
+ self == o
148
+ end
149
+
150
+ # Calculates hash code according to all attributes.
151
+ # @return [Integer] Hash code
152
+ def hash
153
+ [already_enrolled, enrolled, error, esp_customer_uuid, metadata, success, warning].hash
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def self.build_from_hash(attributes)
160
+ new.build_from_hash(attributes)
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def build_from_hash(attributes)
167
+ return nil unless attributes.is_a?(Hash)
168
+ attributes = attributes.transform_keys(&:to_sym)
169
+ self.class.openapi_types.each_pair do |key, type|
170
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
171
+ self.send("#{key}=", nil)
172
+ elsif type =~ /\AArray<(.*)>/i
173
+ # check to ensure the input is an array given that the attribute
174
+ # is documented as an array but the input is not
175
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
176
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
177
+ end
178
+ elsif !attributes[self.class.attribute_map[key]].nil?
179
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
180
+ end
181
+ end
182
+
183
+ self
184
+ end
185
+
186
+ # Deserializes the data based on type
187
+ # @param string type Data type
188
+ # @param string value Value to be deserialized
189
+ # @return [Object] Deserialized data
190
+ def _deserialize(type, value)
191
+ case type.to_sym
192
+ when :Time
193
+ Time.parse(value)
194
+ when :Date
195
+ Date.parse(value)
196
+ when :String
197
+ value.to_s
198
+ when :Integer
199
+ value.to_i
200
+ when :Float
201
+ value.to_f
202
+ when :Boolean
203
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
204
+ true
205
+ else
206
+ false
207
+ end
208
+ when :Object
209
+ # generic object (usually a Hash), return directly
210
+ value
211
+ when /\AArray<(?<inner_type>.+)>\z/
212
+ inner_type = Regexp.last_match[:inner_type]
213
+ value.map { |v| _deserialize(inner_type, v) }
214
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
215
+ k_type = Regexp.last_match[:k_type]
216
+ v_type = Regexp.last_match[:v_type]
217
+ {}.tap do |hash|
218
+ value.each do |k, v|
219
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
220
+ end
221
+ end
222
+ else # model
223
+ # models (e.g. Pet) or oneOf
224
+ klass = UltracartClient.const_get(type)
225
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
226
+ end
227
+ end
228
+
229
+ # Returns the string representation of the object
230
+ # @return [String] String presentation of the object
231
+ def to_s
232
+ to_hash.to_s
233
+ end
234
+
235
+ # to_body is an alias to to_hash (backward compatibility)
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_body
238
+ to_hash
239
+ end
240
+
241
+ # Returns the object in the form of hash
242
+ # @return [Hash] Returns the object in the form of hash
243
+ def to_hash
244
+ hash = {}
245
+ self.class.attribute_map.each_pair do |attr, param|
246
+ value = self.send(attr)
247
+ if value.nil?
248
+ is_nullable = self.class.openapi_nullable.include?(attr)
249
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
250
+ end
251
+
252
+ hash[param] = _to_hash(value)
253
+ end
254
+ hash
255
+ end
256
+
257
+ # Outputs non-array value in the form of hash
258
+ # For object, use to_hash. Otherwise, just return the value
259
+ # @param [Object] value Any valid value
260
+ # @return [Hash] Returns the value in the form of hash
261
+ def _to_hash(value)
262
+ if value.is_a?(Array)
263
+ value.compact.map { |v| _to_hash(v) }
264
+ elsif value.is_a?(Hash)
265
+ {}.tap do |hash|
266
+ value.each { |k, v| hash[k] = _to_hash(v) }
267
+ end
268
+ elsif value.respond_to? :to_hash
269
+ value.to_hash
270
+ else
271
+ value
272
+ end
273
+ end
274
+
275
+ end
276
+
277
+ end
@@ -270,6 +270,14 @@ module UltracartClient
270
270
  # @return Array for valid properties with the reasons
271
271
  def list_invalid_properties
272
272
  invalid_properties = Array.new
273
+ if !@merchant_comments.nil? && @merchant_comments.to_s.length > 2000
274
+ invalid_properties.push('invalid value for "merchant_comments", the character length must be smaller than or equal to 2000.')
275
+ end
276
+
277
+ if !@name.nil? && @name.to_s.length > 80
278
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 80.')
279
+ end
280
+
273
281
  invalid_properties
274
282
  end
275
283
 
@@ -280,6 +288,8 @@ module UltracartClient
280
288
  return false unless api_version_validator.valid?(@api_version)
281
289
  authentication_type_validator = EnumAttributeValidator.new('String', ["none", "basic", "api user", "aws iam"])
282
290
  return false unless authentication_type_validator.valid?(@authentication_type)
291
+ return false if !@merchant_comments.nil? && @merchant_comments.to_s.length > 2000
292
+ return false if !@name.nil? && @name.to_s.length > 80
283
293
  true
284
294
  end
285
295
 
@@ -303,6 +313,26 @@ module UltracartClient
303
313
  @authentication_type = authentication_type
304
314
  end
305
315
 
316
+ # Custom attribute writer method with validation
317
+ # @param [Object] merchant_comments Value to be assigned
318
+ def merchant_comments=(merchant_comments)
319
+ if !merchant_comments.nil? && merchant_comments.to_s.length > 2000
320
+ fail ArgumentError, 'invalid value for "merchant_comments", the character length must be smaller than or equal to 2000.'
321
+ end
322
+
323
+ @merchant_comments = merchant_comments
324
+ end
325
+
326
+ # Custom attribute writer method with validation
327
+ # @param [Object] name Value to be assigned
328
+ def name=(name)
329
+ if !name.nil? && name.to_s.length > 80
330
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 80.'
331
+ end
332
+
333
+ @name = name
334
+ end
335
+
306
336
  # Checks equality by comparing each attribute.
307
337
  # @param [Object] Object to be compared
308
338
  def ==(o)
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.101'
14
+ VERSION = '4.1.103'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -29,6 +29,8 @@ require 'ultracart_api/models/activity'
29
29
  require 'ultracart_api/models/add_library_item_request'
30
30
  require 'ultracart_api/models/adjust_internal_certificate_request'
31
31
  require 'ultracart_api/models/adjust_internal_certificate_response'
32
+ require 'ultracart_api/models/affiliate'
33
+ require 'ultracart_api/models/affiliate_attribute'
32
34
  require 'ultracart_api/models/affiliate_click'
33
35
  require 'ultracart_api/models/affiliate_click_query'
34
36
  require 'ultracart_api/models/affiliate_clicks_response'
@@ -36,6 +38,11 @@ require 'ultracart_api/models/affiliate_ledger'
36
38
  require 'ultracart_api/models/affiliate_ledger_query'
37
39
  require 'ultracart_api/models/affiliate_ledgers_response'
38
40
  require 'ultracart_api/models/affiliate_link'
41
+ require 'ultracart_api/models/affiliate_marketing_strategy'
42
+ require 'ultracart_api/models/affiliate_query'
43
+ require 'ultracart_api/models/affiliate_response'
44
+ require 'ultracart_api/models/affiliate_tier_relationship'
45
+ require 'ultracart_api/models/affiliates_response'
39
46
  require 'ultracart_api/models/agent_summary'
40
47
  require 'ultracart_api/models/api_user_application_profile'
41
48
  require 'ultracart_api/models/apply_library_item_request'
@@ -483,6 +490,8 @@ require 'ultracart_api/models/email_commseq_email_send_test_request'
483
490
  require 'ultracart_api/models/email_commseq_email_send_test_response'
484
491
  require 'ultracart_api/models/email_commseq_emails_request'
485
492
  require 'ultracart_api/models/email_commseq_emails_response'
493
+ require 'ultracart_api/models/email_commseq_enrollment_request'
494
+ require 'ultracart_api/models/email_commseq_enrollment_response'
486
495
  require 'ultracart_api/models/email_commseq_postcard'
487
496
  require 'ultracart_api/models/email_commseq_postcard_response'
488
497
  require 'ultracart_api/models/email_commseq_postcard_send_test_request'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.101
4
+ version: 4.1.103
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-10 00:00:00.000000000 Z
11
+ date: 2026-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -73,7 +73,9 @@ files:
73
73
  - docs/AddLibraryItemRequest.md
74
74
  - docs/AdjustInternalCertificateRequest.md
75
75
  - docs/AdjustInternalCertificateResponse.md
76
+ - docs/Affiliate.md
76
77
  - docs/AffiliateApi.md
78
+ - docs/AffiliateAttribute.md
77
79
  - docs/AffiliateClick.md
78
80
  - docs/AffiliateClickQuery.md
79
81
  - docs/AffiliateClicksResponse.md
@@ -81,6 +83,11 @@ files:
81
83
  - docs/AffiliateLedgerQuery.md
82
84
  - docs/AffiliateLedgersResponse.md
83
85
  - docs/AffiliateLink.md
86
+ - docs/AffiliateMarketingStrategy.md
87
+ - docs/AffiliateQuery.md
88
+ - docs/AffiliateResponse.md
89
+ - docs/AffiliateTierRelationship.md
90
+ - docs/AffiliatesResponse.md
84
91
  - docs/AgentSummary.md
85
92
  - docs/ApiUserApplicationProfile.md
86
93
  - docs/ApplyLibraryItemRequest.md
@@ -536,6 +543,8 @@ files:
536
543
  - docs/EmailCommseqEmailSendTestResponse.md
537
544
  - docs/EmailCommseqEmailsRequest.md
538
545
  - docs/EmailCommseqEmailsResponse.md
546
+ - docs/EmailCommseqEnrollmentRequest.md
547
+ - docs/EmailCommseqEnrollmentResponse.md
539
548
  - docs/EmailCommseqPostcard.md
540
549
  - docs/EmailCommseqPostcardResponse.md
541
550
  - docs/EmailCommseqPostcardSendTestRequest.md
@@ -1126,6 +1135,8 @@ files:
1126
1135
  - lib/ultracart_api/models/add_library_item_request.rb
1127
1136
  - lib/ultracart_api/models/adjust_internal_certificate_request.rb
1128
1137
  - lib/ultracart_api/models/adjust_internal_certificate_response.rb
1138
+ - lib/ultracart_api/models/affiliate.rb
1139
+ - lib/ultracart_api/models/affiliate_attribute.rb
1129
1140
  - lib/ultracart_api/models/affiliate_click.rb
1130
1141
  - lib/ultracart_api/models/affiliate_click_query.rb
1131
1142
  - lib/ultracart_api/models/affiliate_clicks_response.rb
@@ -1133,6 +1144,11 @@ files:
1133
1144
  - lib/ultracart_api/models/affiliate_ledger_query.rb
1134
1145
  - lib/ultracart_api/models/affiliate_ledgers_response.rb
1135
1146
  - lib/ultracart_api/models/affiliate_link.rb
1147
+ - lib/ultracart_api/models/affiliate_marketing_strategy.rb
1148
+ - lib/ultracart_api/models/affiliate_query.rb
1149
+ - lib/ultracart_api/models/affiliate_response.rb
1150
+ - lib/ultracart_api/models/affiliate_tier_relationship.rb
1151
+ - lib/ultracart_api/models/affiliates_response.rb
1136
1152
  - lib/ultracart_api/models/agent_summary.rb
1137
1153
  - lib/ultracart_api/models/api_user_application_profile.rb
1138
1154
  - lib/ultracart_api/models/apply_library_item_request.rb
@@ -1580,6 +1596,8 @@ files:
1580
1596
  - lib/ultracart_api/models/email_commseq_email_send_test_response.rb
1581
1597
  - lib/ultracart_api/models/email_commseq_emails_request.rb
1582
1598
  - lib/ultracart_api/models/email_commseq_emails_response.rb
1599
+ - lib/ultracart_api/models/email_commseq_enrollment_request.rb
1600
+ - lib/ultracart_api/models/email_commseq_enrollment_response.rb
1583
1601
  - lib/ultracart_api/models/email_commseq_postcard.rb
1584
1602
  - lib/ultracart_api/models/email_commseq_postcard_response.rb
1585
1603
  - lib/ultracart_api/models/email_commseq_postcard_send_test_request.rb