Class: AlogramPayRisk::EntityIds

Inherits:
ApiModelBase show all
Defined in:
lib/alogram_payrisk/models/entity_ids.rb

Overview

Canonical entity identifiers (tenant/client/user/device/session). Do not send raw PII. Hash emails/phones/addresses as sha256 and prefix with ‘sha256_’. Tiered support: - tenantId is the top-level SaaS customer (required for all flows). - clientId is the tenant’s downstream business customer (e.g. merchant/partner) and MAY be omitted for processor / bank / PSP-style integrations. - endCustomerId is the tenant/client’s consumer or business account (cardholder, shopper, etc.) and MAY be omitted for purely device- or instrument-level checks.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ EntityIds

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 153

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `AlogramPayRisk::EntityIds` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `AlogramPayRisk::EntityIds`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'tenant_id')
    self.tenant_id = attributes[:'tenant_id']
  end

  if attributes.key?(:'client_id')
    self.client_id = attributes[:'client_id']
  end

  if attributes.key?(:'end_customer_id')
    self.end_customer_id = attributes[:'end_customer_id']
  end

  if attributes.key?(:'operator_id')
    self.operator_id = attributes[:'operator_id']
  end

  if attributes.key?(:'operator_type')
    self.operator_type = attributes[:'operator_type']
  end

  if attributes.key?(:'auth')
    self.auth = attributes[:'auth']
  end

  if attributes.key?(:'sku_id')
    self.sku_id = attributes[:'sku_id']
  end

  if attributes.key?(:'sku_handle')
    self.sku_handle = attributes[:'sku_handle']
  end

  if attributes.key?(:'payment_instrument_id')
    self.payment_instrument_id = attributes[:'payment_instrument_id']
  end

  if attributes.key?(:'device_id')
    self.device_id = attributes[:'device_id']
  end

  if attributes.key?(:'session_id')
    self.session_id = attributes[:'session_id']
  end

  if attributes.key?(:'agent')
    self.agent = attributes[:'agent']
  end

  if attributes.key?(:'email_hash')
    self.email_hash = attributes[:'email_hash']
  end

  if attributes.key?(:'email_domain_hash')
    self.email_domain_hash = attributes[:'email_domain_hash']
  end

  if attributes.key?(:'phone_hash')
    self.phone_hash = attributes[:'phone_hash']
  end

  if attributes.key?(:'shipping_address_hash')
    self.shipping_address_hash = attributes[:'shipping_address_hash']
  end

  if attributes.key?(:'billing_address_hash')
    self.billing_address_hash = attributes[:'billing_address_hash']
  end
end

Instance Attribute Details

#agentObject

Returns the value of attribute agent.



50
51
52
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 50

def agent
  @agent
end

#authObject

Returns the value of attribute auth.



33
34
35
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 33

def auth
  @auth
end

#billing_address_hashObject

Normalized+lowercased billing address hash (e.g., sha256).



65
66
67
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 65

def billing_address_hash
  @billing_address_hash
end

#client_idObject

Canonical ID for the Tenant’s business customer (e.g., merchant/partner). Opaque, immutable, lowercase. Must start with "cid_" (Legacy) or "cli_" (Preferred).



23
24
25
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 23

def client_id
  @client_id
end

#device_idObject

Server-issued stable device token (device-level identifier). Should persist across sessions and logins on the same browser/device.



45
46
47
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 45

def device_id
  @device_id
end

#email_domain_hashObject

Normalized+lowercased email domain hash (e.g., sha256).



56
57
58
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 56

def email_domain_hash
  @email_domain_hash
end

#email_hashObject

Normalized+lowercased email hash (e.g., sha256).



53
54
55
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 53

def email_hash
  @email_hash
end

#end_customer_idObject

Canonical ID for the client’s end user / consumer (account holder). Opaque, immutable, lowercase. Supports "ecid_" slugs (Legacy) or "cus_" hex (Preferred).



26
27
28
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 26

def end_customer_id
  @end_customer_id
end

#operator_idObject

Canonical ID for a Tenant Operator (staff/automation) holding membership in the platform. Opaque, immutable, lowercase. Supports "mid_" slugs (Legacy) or "op_" hex (Preferred).



29
30
31
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 29

def operator_id
  @operator_id
end

#operator_typeObject

Returns the value of attribute operator_type.



31
32
33
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 31

def operator_type
  @operator_type
end

#payment_instrument_idObject

Tokenized instrument ID (non-PCI).



42
43
44
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 42

def payment_instrument_id
  @payment_instrument_id
end

#phone_hashObject

Normalized+lowercased phone hash (e.g., sha256).



59
60
61
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 59

def phone_hash
  @phone_hash
end

#session_idObject

Application/user session identifier (login or checkout session). Typically rotates more frequently than deviceId and may be tied to authentication.



48
49
50
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 48

def session_id
  @session_id
end

#shipping_address_hashObject

Normalized+lowercased shipping address hash (e.g., sha256).



62
63
64
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 62

def shipping_address_hash
  @shipping_address_hash
end

#sku_handleObject

Human-readable identifier for a SKU, used for logic and feature checks.



39
40
41
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 39

def sku_handle
  @sku_handle
end

#sku_idObject

Canonical ID for a marketplace product edition or billing SKU. Always follows the Fortress-36 (sku_ + 32 hex) format.



36
37
38
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 36

def sku_id
  @sku_id
end

#tenant_idObject

Canonical ID for the paying organization (Tenant). Opaque, immutable, lowercase. Must start with "tid_" (Legacy) or "ten_" (Preferred).



20
21
22
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 20

def tenant_id
  @tenant_id
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



113
114
115
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 113

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



118
119
120
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 118

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 90

def self.attribute_map
  {
    :'tenant_id' => :'tenantId',
    :'client_id' => :'clientId',
    :'end_customer_id' => :'endCustomerId',
    :'operator_id' => :'operatorId',
    :'operator_type' => :'operatorType',
    :'auth' => :'auth',
    :'sku_id' => :'skuId',
    :'sku_handle' => :'skuHandle',
    :'payment_instrument_id' => :'paymentInstrumentId',
    :'device_id' => :'deviceId',
    :'session_id' => :'sessionId',
    :'agent' => :'agent',
    :'email_hash' => :'emailHash',
    :'email_domain_hash' => :'emailDomainHash',
    :'phone_hash' => :'phoneHash',
    :'shipping_address_hash' => :'shippingAddressHash',
    :'billing_address_hash' => :'billingAddressHash'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 708

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



146
147
148
149
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 146

def self.openapi_nullable
  Set.new([
  ])
end

.openapi_typesObject

Attribute type mapping.



123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 123

def self.openapi_types
  {
    :'tenant_id' => :'String',
    :'client_id' => :'String',
    :'end_customer_id' => :'String',
    :'operator_id' => :'String',
    :'operator_type' => :'OperatorType',
    :'auth' => :'AuthContext',
    :'sku_id' => :'String',
    :'sku_handle' => :'String',
    :'payment_instrument_id' => :'String',
    :'device_id' => :'String',
    :'session_id' => :'String',
    :'agent' => :'AgentManifest',
    :'email_hash' => :'String',
    :'email_domain_hash' => :'String',
    :'phone_hash' => :'String',
    :'shipping_address_hash' => :'String',
    :'billing_address_hash' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 671

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      tenant_id == o.tenant_id &&
      client_id == o.client_id &&
      end_customer_id == o.end_customer_id &&
      operator_id == o.operator_id &&
      operator_type == o.operator_type &&
      auth == o.auth &&
      sku_id == o.sku_id &&
      sku_handle == o.sku_handle &&
      payment_instrument_id == o.payment_instrument_id &&
      device_id == o.device_id &&
      session_id == o.session_id &&
      agent == o.agent &&
      email_hash == o.email_hash &&
      email_domain_hash == o.email_domain_hash &&
      phone_hash == o.phone_hash &&
      shipping_address_hash == o.shipping_address_hash &&
      billing_address_hash == o.billing_address_hash
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


695
696
697
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 695

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



701
702
703
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 701

def hash
  [tenant_id, client_id, end_customer_id, operator_id, operator_type, auth, sku_id, sku_handle, payment_instrument_id, device_id, session_id, agent, email_hash, email_domain_hash, phone_hash, shipping_address_hash, billing_address_hash].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 238

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if !@tenant_id.nil? && @tenant_id.to_s.length > 68
    invalid_properties.push('invalid value for "tenant_id", the character length must be smaller than or equal to 68.')
  end

  if !@tenant_id.nil? && @tenant_id.to_s.length < 6
    invalid_properties.push('invalid value for "tenant_id", the character length must be greater than or equal to 6.')
  end

  pattern = Regexp.new(/^(tid|ten)_[a-z0-9_-]{2,64}$/)
  if !@tenant_id.nil? && @tenant_id !~ pattern
    invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.")
  end

  if !@client_id.nil? && @client_id.to_s.length > 100
    invalid_properties.push('invalid value for "client_id", the character length must be smaller than or equal to 100.')
  end

  if !@client_id.nil? && @client_id.to_s.length < 6
    invalid_properties.push('invalid value for "client_id", the character length must be greater than or equal to 6.')
  end

  pattern = Regexp.new(/^(cid|cli)_[a-z0-9_-]{2,96}$/)
  if !@client_id.nil? && @client_id !~ pattern
    invalid_properties.push("invalid value for \"client_id\", must conform to the pattern #{pattern}.")
  end

  if !@end_customer_id.nil? && @end_customer_id.to_s.length > 100
    invalid_properties.push('invalid value for "end_customer_id", the character length must be smaller than or equal to 100.')
  end

  if !@end_customer_id.nil? && @end_customer_id.to_s.length < 6
    invalid_properties.push('invalid value for "end_customer_id", the character length must be greater than or equal to 6.')
  end

  pattern = Regexp.new(/^(ecid_[a-z0-9\-_]{2,96}|cus_[a-f0-9]{32})$/)
  if !@end_customer_id.nil? && @end_customer_id !~ pattern
    invalid_properties.push("invalid value for \"end_customer_id\", must conform to the pattern #{pattern}.")
  end

  if !@operator_id.nil? && @operator_id.to_s.length > 100
    invalid_properties.push('invalid value for "operator_id", the character length must be smaller than or equal to 100.')
  end

  if !@operator_id.nil? && @operator_id.to_s.length < 5
    invalid_properties.push('invalid value for "operator_id", the character length must be greater than or equal to 5.')
  end

  pattern = Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_([a-f0-9]{32}|system|[a-z0-9_-]{2,64}))$/)
  if !@operator_id.nil? && @operator_id !~ pattern
    invalid_properties.push("invalid value for \"operator_id\", must conform to the pattern #{pattern}.")
  end

  if !@sku_id.nil? && @sku_id.to_s.length > 37
    invalid_properties.push('invalid value for "sku_id", the character length must be smaller than or equal to 37.')
  end

  if !@sku_id.nil? && @sku_id.to_s.length < 36
    invalid_properties.push('invalid value for "sku_id", the character length must be greater than or equal to 36.')
  end

  pattern = Regexp.new(/^sku_[a-f0-9]{32}$/)
  if !@sku_id.nil? && @sku_id !~ pattern
    invalid_properties.push("invalid value for \"sku_id\", must conform to the pattern #{pattern}.")
  end

  if !@sku_handle.nil? && @sku_handle.to_s.length > 64
    invalid_properties.push('invalid value for "sku_handle", the character length must be smaller than or equal to 64.')
  end

  if !@sku_handle.nil? && @sku_handle.to_s.length < 2
    invalid_properties.push('invalid value for "sku_handle", the character length must be greater than or equal to 2.')
  end

  pattern = Regexp.new(/^[a-z0-9\-_]{2,64}$/)
  if !@sku_handle.nil? && @sku_handle !~ pattern
    invalid_properties.push("invalid value for \"sku_handle\", must conform to the pattern #{pattern}.")
  end

  if !@payment_instrument_id.nil? && @payment_instrument_id.to_s.length > 100
    invalid_properties.push('invalid value for "payment_instrument_id", the character length must be smaller than or equal to 100.')
  end

  pattern = Regexp.new(/^[a-zA-Z0-9\-_:]{2,96}$/)
  if !@payment_instrument_id.nil? && @payment_instrument_id !~ pattern
    invalid_properties.push("invalid value for \"payment_instrument_id\", must conform to the pattern #{pattern}.")
  end

  if !@device_id.nil? && @device_id.to_s.length > 100
    invalid_properties.push('invalid value for "device_id", the character length must be smaller than or equal to 100.')
  end

  pattern = Regexp.new(/^did_[a-zA-Z0-9\-_:]{2,96}$/)
  if !@device_id.nil? && @device_id !~ pattern
    invalid_properties.push("invalid value for \"device_id\", must conform to the pattern #{pattern}.")
  end

  if !@session_id.nil? && @session_id.to_s.length > 100
    invalid_properties.push('invalid value for "session_id", the character length must be smaller than or equal to 100.')
  end

  pattern = Regexp.new(/^sid_[a-zA-Z0-9\-_:]{2,96}$/)
  if !@session_id.nil? && @session_id !~ pattern
    invalid_properties.push("invalid value for \"session_id\", must conform to the pattern #{pattern}.")
  end

  if !@email_hash.nil? && @email_hash.to_s.length > 71
    invalid_properties.push('invalid value for "email_hash", the character length must be smaller than or equal to 71.')
  end

  pattern = Regexp.new(/^sha256_[0-9a-f]{64}$/)
  if !@email_hash.nil? && @email_hash !~ pattern
    invalid_properties.push("invalid value for \"email_hash\", must conform to the pattern #{pattern}.")
  end

  if !@email_domain_hash.nil? && @email_domain_hash.to_s.length > 71
    invalid_properties.push('invalid value for "email_domain_hash", the character length must be smaller than or equal to 71.')
  end

  pattern = Regexp.new(/^sha256_[0-9a-f]{64}$/)
  if !@email_domain_hash.nil? && @email_domain_hash !~ pattern
    invalid_properties.push("invalid value for \"email_domain_hash\", must conform to the pattern #{pattern}.")
  end

  if !@phone_hash.nil? && @phone_hash.to_s.length > 71
    invalid_properties.push('invalid value for "phone_hash", the character length must be smaller than or equal to 71.')
  end

  pattern = Regexp.new(/^sha256_[0-9a-f]{64}$/)
  if !@phone_hash.nil? && @phone_hash !~ pattern
    invalid_properties.push("invalid value for \"phone_hash\", must conform to the pattern #{pattern}.")
  end

  if !@shipping_address_hash.nil? && @shipping_address_hash.to_s.length > 71
    invalid_properties.push('invalid value for "shipping_address_hash", the character length must be smaller than or equal to 71.')
  end

  pattern = Regexp.new(/^sha256_[0-9a-f]{64}$/)
  if !@shipping_address_hash.nil? && @shipping_address_hash !~ pattern
    invalid_properties.push("invalid value for \"shipping_address_hash\", must conform to the pattern #{pattern}.")
  end

  if !@billing_address_hash.nil? && @billing_address_hash.to_s.length > 71
    invalid_properties.push('invalid value for "billing_address_hash", the character length must be smaller than or equal to 71.')
  end

  pattern = Regexp.new(/^sha256_[0-9a-f]{64}$/)
  if !@billing_address_hash.nil? && @billing_address_hash !~ pattern
    invalid_properties.push("invalid value for \"billing_address_hash\", must conform to the pattern #{pattern}.")
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



730
731
732
733
734
735
736
737
738
739
740
741
742
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 730

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
# File 'lib/alogram_payrisk/models/entity_ids.rb', line 396

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if !@tenant_id.nil? && @tenant_id.to_s.length > 68
  return false if !@tenant_id.nil? && @tenant_id.to_s.length < 6
  return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^(tid|ten)_[a-z0-9_-]{2,64}$/)
  return false if !@client_id.nil? && @client_id.to_s.length > 100
  return false if !@client_id.nil? && @client_id.to_s.length < 6
  return false if !@client_id.nil? && @client_id !~ Regexp.new(/^(cid|cli)_[a-z0-9_-]{2,96}$/)
  return false if !@end_customer_id.nil? && @end_customer_id.to_s.length > 100
  return false if !@end_customer_id.nil? && @end_customer_id.to_s.length < 6
  return false if !@end_customer_id.nil? && @end_customer_id !~ Regexp.new(/^(ecid_[a-z0-9\-_]{2,96}|cus_[a-f0-9]{32})$/)
  return false if !@operator_id.nil? && @operator_id.to_s.length > 100
  return false if !@operator_id.nil? && @operator_id.to_s.length < 5
  return false if !@operator_id.nil? && @operator_id !~ Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_([a-f0-9]{32}|system|[a-z0-9_-]{2,64}))$/)
  return false if !@sku_id.nil? && @sku_id.to_s.length > 37
  return false if !@sku_id.nil? && @sku_id.to_s.length < 36
  return false if !@sku_id.nil? && @sku_id !~ Regexp.new(/^sku_[a-f0-9]{32}$/)
  return false if !@sku_handle.nil? && @sku_handle.to_s.length > 64
  return false if !@sku_handle.nil? && @sku_handle.to_s.length < 2
  return false if !@sku_handle.nil? && @sku_handle !~ Regexp.new(/^[a-z0-9\-_]{2,64}$/)
  return false if !@payment_instrument_id.nil? && @payment_instrument_id.to_s.length > 100
  return false if !@payment_instrument_id.nil? && @payment_instrument_id !~ Regexp.new(/^[a-zA-Z0-9\-_:]{2,96}$/)
  return false if !@device_id.nil? && @device_id.to_s.length > 100
  return false if !@device_id.nil? && @device_id !~ Regexp.new(/^did_[a-zA-Z0-9\-_:]{2,96}$/)
  return false if !@session_id.nil? && @session_id.to_s.length > 100
  return false if !@session_id.nil? && @session_id !~ Regexp.new(/^sid_[a-zA-Z0-9\-_:]{2,96}$/)
  return false if !@email_hash.nil? && @email_hash.to_s.length > 71
  return false if !@email_hash.nil? && @email_hash !~ Regexp.new(/^sha256_[0-9a-f]{64}$/)
  return false if !@email_domain_hash.nil? && @email_domain_hash.to_s.length > 71
  return false if !@email_domain_hash.nil? && @email_domain_hash !~ Regexp.new(/^sha256_[0-9a-f]{64}$/)
  return false if !@phone_hash.nil? && @phone_hash.to_s.length > 71
  return false if !@phone_hash.nil? && @phone_hash !~ Regexp.new(/^sha256_[0-9a-f]{64}$/)
  return false if !@shipping_address_hash.nil? && @shipping_address_hash.to_s.length > 71
  return false if !@shipping_address_hash.nil? && @shipping_address_hash !~ Regexp.new(/^sha256_[0-9a-f]{64}$/)
  return false if !@billing_address_hash.nil? && @billing_address_hash.to_s.length > 71
  return false if !@billing_address_hash.nil? && @billing_address_hash !~ Regexp.new(/^sha256_[0-9a-f]{64}$/)
  true
end