Class: UnitOpenapiRubySdk::BusinessApplicationAllOfAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BusinessApplicationAllOfAttributes

Initializes the object

Parameters:

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

    Model attributes in the form of hash



222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 222

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

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

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  else
    self.created_at = nil
  end

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

  if attributes.key?(:'status')
    self.status = attributes[:'status']
  else
    self.status = nil
  end

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

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

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

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

  if attributes.key?(:'name')
    self.name = attributes[:'name']
  else
    self.name = nil
  end

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

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

  if attributes.key?(:'entity_type')
    self.entity_type = attributes[:'entity_type']
  else
    self.entity_type = nil
  end

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

  if attributes.key?(:'state_of_incorporation')
    self.state_of_incorporation = attributes[:'state_of_incorporation']
  else
    self.state_of_incorporation = nil
  end

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

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

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

  if attributes.key?(:'contact')
    self.contact = attributes[:'contact']
  else
    self.contact = nil
  end

  if attributes.key?(:'officer')
    self.officer = attributes[:'officer']
  else
    self.officer = nil
  end

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

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

  if attributes.key?(:'beneficial_owners')
    if (value = attributes[:'beneficial_owners']).is_a?(Array)
      self.beneficial_owners = value
    end
  else
    self.beneficial_owners = nil
  end

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

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

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

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

  if attributes.key?(:'tags')
    if (value = attributes[:'tags']).is_a?(Hash)
      self.tags = value
    end
  end

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

  if attributes.key?(:'evaluation_flags')
    if (value = attributes[:'evaluation_flags']).is_a?(Array)
      self.evaluation_flags = value
    end
  end

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

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

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

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

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

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

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

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

  if attributes.key?(:'countries_of_operation')
    if (value = attributes[:'countries_of_operation']).is_a?(Array)
      self.countries_of_operation = value
    end
  end

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

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

Instance Attribute Details

#addressObject

Returns the value of attribute address.



48
49
50
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 48

def address
  @address
end

#annual_revenueObject

Returns the value of attribute annual_revenue.



82
83
84
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 82

def annual_revenue
  @annual_revenue
end

#archivedObject

Returns the value of attribute archived.



78
79
80
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 78

def archived
  @archived
end

#beneficial_ownersObject

Returns the value of attribute beneficial_owners.



58
59
60
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 58

def beneficial_owners
  @beneficial_owners
end

#business_verticalObject

Returns the value of attribute business_vertical.



94
95
96
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 94

def business_vertical
  @business_vertical
end

#cash_flowObject

Returns the value of attribute cash_flow.



86
87
88
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 86

def cash_flow
  @cash_flow
end

#contactObject

Returns the value of attribute contact.



50
51
52
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 50

def contact
  @contact
end

#countries_of_operationObject

Returns the value of attribute countries_of_operation.



90
91
92
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 90

def countries_of_operation
  @countries_of_operation
end

#created_atObject

Returns the value of attribute created_at.



18
19
20
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 18

def created_at
  @created_at
end

#date_of_incorporationObject

Returns the value of attribute date_of_incorporation.



40
41
42
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 40

def date_of_incorporation
  @date_of_incorporation
end

#dbaObject

Returns the value of attribute dba.



34
35
36
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 34

def dba
  @dba
end

#decision_date_timeObject

Returns the value of attribute decision_date_time.



66
67
68
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 66

def decision_date_time
  @decision_date_time
end

#decision_methodObject

Returns the value of attribute decision_method.



60
61
62
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 60

def decision_method
  @decision_method
end

#decision_reasonObject

Returns the value of attribute decision_reason.



64
65
66
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 64

def decision_reason
  @decision_reason
end

#decision_user_idObject

Returns the value of attribute decision_user_id.



62
63
64
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 62

def decision_user_id
  @decision_user_id
end

#einObject

Returns the value of attribute ein.



36
37
38
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 36

def ein
  @ein
end

#entity_typeObject

Returns the value of attribute entity_type.



38
39
40
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 38

def entity_type
  @entity_type
end

#evaluation_entity_idObject

Returns the value of attribute evaluation_entity_id.



30
31
32
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 30

def evaluation_entity_id
  @evaluation_entity_id
end

#evaluation_flagsObject

Returns the value of attribute evaluation_flags.



72
73
74
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 72

def evaluation_flags
  @evaluation_flags
end

#evaluation_idObject

Returns the value of attribute evaluation_id.



28
29
30
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 28

def evaluation_id
  @evaluation_id
end

#evaluation_outcomeObject

Returns the value of attribute evaluation_outcome.



26
27
28
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 26

def evaluation_outcome
  @evaluation_outcome
end

#industryObject

Returns the value of attribute industry.



80
81
82
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 80

def industry
  @industry
end

#ipObject

Returns the value of attribute ip.



54
55
56
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 54

def ip
  @ip
end

#ip_location_detailsObject

Returns the value of attribute ip_location_details.



74
75
76
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 74

def ip_location_details
  @ip_location_details
end

#messageObject

Returns the value of attribute message.



24
25
26
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 24

def message
  @message
end

#nameObject

Returns the value of attribute name.



32
33
34
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 32

def name
  @name
end

#number_of_employeesObject

Returns the value of attribute number_of_employees.



84
85
86
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 84

def number_of_employees
  @number_of_employees
end

#officerObject

Returns the value of attribute officer.



52
53
54
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 52

def officer
  @officer
end

#phoneObject

Returns the value of attribute phone.



46
47
48
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 46

def phone
  @phone
end

#phone_location_detailsObject

Returns the value of attribute phone_location_details.



76
77
78
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 76

def phone_location_details
  @phone_location_details
end

#purposeObject

Returns the value of attribute purpose.



44
45
46
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 44

def purpose
  @purpose
end

#risk_rateObject

Returns the value of attribute risk_rate.



70
71
72
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 70

def risk_rate
  @risk_rate
end

#state_of_incorporationObject

Returns the value of attribute state_of_incorporation.



42
43
44
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 42

def state_of_incorporation
  @state_of_incorporation
end

#statusObject

Returns the value of attribute status.



22
23
24
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 22

def status
  @status
end

#stock_symbolObject

Returns the value of attribute stock_symbol.



92
93
94
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 92

def stock_symbol
  @stock_symbol
end

#tagsObject

Returns the value of attribute tags.



68
69
70
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 68

def tags
  @tags
end

#updated_atObject

Returns the value of attribute updated_at.



20
21
22
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 20

def updated_at
  @updated_at
end

#websiteObject

Returns the value of attribute website.



56
57
58
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 56

def website
  @website
end

#year_of_incorporationObject

Returns the value of attribute year_of_incorporation.



88
89
90
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 88

def year_of_incorporation
  @year_of_incorporation
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 681

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = UnitOpenapiRubySdk.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



164
165
166
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 164

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 119

def self.attribute_map
  {
    :'created_at' => :'createdAt',
    :'updated_at' => :'updatedAt',
    :'status' => :'status',
    :'message' => :'message',
    :'evaluation_outcome' => :'evaluationOutcome',
    :'evaluation_id' => :'evaluationId',
    :'evaluation_entity_id' => :'evaluationEntityId',
    :'name' => :'name',
    :'dba' => :'dba',
    :'ein' => :'ein',
    :'entity_type' => :'entityType',
    :'date_of_incorporation' => :'dateOfIncorporation',
    :'state_of_incorporation' => :'stateOfIncorporation',
    :'purpose' => :'purpose',
    :'phone' => :'phone',
    :'address' => :'address',
    :'contact' => :'contact',
    :'officer' => :'officer',
    :'ip' => :'ip',
    :'website' => :'website',
    :'beneficial_owners' => :'beneficialOwners',
    :'decision_method' => :'decisionMethod',
    :'decision_user_id' => :'decisionUserId',
    :'decision_reason' => :'decisionReason',
    :'decision_date_time' => :'decisionDateTime',
    :'tags' => :'tags',
    :'risk_rate' => :'riskRate',
    :'evaluation_flags' => :'evaluationFlags',
    :'ip_location_details' => :'ipLocationDetails',
    :'phone_location_details' => :'phoneLocationDetails',
    :'archived' => :'archived',
    :'industry' => :'industry',
    :'annual_revenue' => :'annualRevenue',
    :'number_of_employees' => :'numberOfEmployees',
    :'cash_flow' => :'cashFlow',
    :'year_of_incorporation' => :'yearOfIncorporation',
    :'countries_of_operation' => :'countriesOfOperation',
    :'stock_symbol' => :'stockSymbol',
    :'business_vertical' => :'businessVertical'
  }
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



657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 657

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



214
215
216
217
218
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 214

def self.openapi_nullable
  Set.new([
    :'dba',
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 169

def self.openapi_types
  {
    :'created_at' => :'Time',
    :'updated_at' => :'Time',
    :'status' => :'ApplicationStatus',
    :'message' => :'String',
    :'evaluation_outcome' => :'String',
    :'evaluation_id' => :'String',
    :'evaluation_entity_id' => :'String',
    :'name' => :'String',
    :'dba' => :'String',
    :'ein' => :'String',
    :'entity_type' => :'EntityType',
    :'date_of_incorporation' => :'Date',
    :'state_of_incorporation' => :'String',
    :'purpose' => :'String',
    :'phone' => :'Phone',
    :'address' => :'Address',
    :'contact' => :'Contact',
    :'officer' => :'Officer',
    :'ip' => :'String',
    :'website' => :'String',
    :'beneficial_owners' => :'Array<BeneficialOwner>',
    :'decision_method' => :'String',
    :'decision_user_id' => :'String',
    :'decision_reason' => :'String',
    :'decision_date_time' => :'Time',
    :'tags' => :'Hash<String, String>',
    :'risk_rate' => :'String',
    :'evaluation_flags' => :'Array<String>',
    :'ip_location_details' => :'Object',
    :'phone_location_details' => :'Object',
    :'archived' => :'Boolean',
    :'industry' => :'Industry',
    :'annual_revenue' => :'BusinessAnnualRevenue',
    :'number_of_employees' => :'BusinessNumberOfEmployees',
    :'cash_flow' => :'CashFlow',
    :'year_of_incorporation' => :'String',
    :'countries_of_operation' => :'Array<String>',
    :'stock_symbol' => :'String',
    :'business_vertical' => :'BusinessVertical'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 598

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      created_at == o.created_at &&
      updated_at == o.updated_at &&
      status == o.status &&
      message == o.message &&
      evaluation_outcome == o.evaluation_outcome &&
      evaluation_id == o.evaluation_id &&
      evaluation_entity_id == o.evaluation_entity_id &&
      name == o.name &&
      dba == o.dba &&
      ein == o.ein &&
      entity_type == o.entity_type &&
      date_of_incorporation == o.date_of_incorporation &&
      state_of_incorporation == o.state_of_incorporation &&
      purpose == o.purpose &&
      phone == o.phone &&
      address == o.address &&
      contact == o.contact &&
      officer == o.officer &&
      ip == o.ip &&
      website == o.website &&
      beneficial_owners == o.beneficial_owners &&
      decision_method == o.decision_method &&
      decision_user_id == o.decision_user_id &&
      decision_reason == o.decision_reason &&
      decision_date_time == o.decision_date_time &&
      tags == o.tags &&
      risk_rate == o.risk_rate &&
      evaluation_flags == o.evaluation_flags &&
      ip_location_details == o.ip_location_details &&
      phone_location_details == o.phone_location_details &&
      archived == o.archived &&
      industry == o.industry &&
      annual_revenue == o.annual_revenue &&
      number_of_employees == o.number_of_employees &&
      cash_flow == o.cash_flow &&
      year_of_incorporation == o.year_of_incorporation &&
      countries_of_operation == o.countries_of_operation &&
      stock_symbol == o.stock_symbol &&
      business_vertical == o.business_vertical
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



752
753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 752

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


644
645
646
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 644

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



650
651
652
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 650

def hash
  [created_at, updated_at, status, message, evaluation_outcome, evaluation_id, evaluation_entity_id, name, dba, ein, entity_type, date_of_incorporation, state_of_incorporation, purpose, phone, address, contact, officer, ip, website, beneficial_owners, decision_method, decision_user_id, decision_reason, decision_date_time, tags, risk_rate, evaluation_flags, ip_location_details, phone_location_details, archived, industry, annual_revenue, number_of_employees, cash_flow, year_of_incorporation, countries_of_operation, stock_symbol, business_vertical].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 418

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  if @created_at.nil?
    invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
  end

  if @status.nil?
    invalid_properties.push('invalid value for "status", status cannot be nil.')
  end

  if @name.nil?
    invalid_properties.push('invalid value for "name", name cannot be nil.')
  end

  pattern = Regexp.new(/^\d{9}$/)
  if !@ein.nil? && @ein !~ pattern
    invalid_properties.push("invalid value for \"ein\", must conform to the pattern #{pattern}.")
  end

  if @entity_type.nil?
    invalid_properties.push('invalid value for "entity_type", entity_type cannot be nil.')
  end

  if @state_of_incorporation.nil?
    invalid_properties.push('invalid value for "state_of_incorporation", state_of_incorporation cannot be nil.')
  end

  pattern = Regexp.new(/^((A[LKSZR])|(C[AOT])|(D[EC])|(F[ML])|(G[AU])|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EHDAINSOT])|(N[EVHJMYCD])|(MP)|(O[HKR])|(P[WAR])|(RI)|(S[CD])|(T[NX])|(UT)|(V[TIA])|(W[AVIY]))$/)
  if @state_of_incorporation !~ pattern
    invalid_properties.push("invalid value for \"state_of_incorporation\", must conform to the pattern #{pattern}.")
  end

  if @contact.nil?
    invalid_properties.push('invalid value for "contact", contact cannot be nil.')
  end

  if @officer.nil?
    invalid_properties.push('invalid value for "officer", officer cannot be nil.')
  end

  if @beneficial_owners.nil?
    invalid_properties.push('invalid value for "beneficial_owners", beneficial_owners cannot be nil.')
  end

  if !@tags.nil? && @tags.length > 15
    invalid_properties.push('invalid value for "tags", number of items must be less than or equal to 15.')
  end

  pattern = Regexp.new(/^\d{4}$/)
  if !@year_of_incorporation.nil? && @year_of_incorporation !~ pattern
    invalid_properties.push("invalid value for \"year_of_incorporation\", must conform to the pattern #{pattern}.")
  end

  if !@countries_of_operation.nil? && @countries_of_operation.length < 1
    invalid_properties.push('invalid value for "countries_of_operation", number of items must be greater than or equal to 1.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



728
729
730
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 728

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 734

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



722
723
724
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 722

def to_s
  to_hash.to_s
end

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/unit_openapi_ruby_sdk/models/business_application_all_of_attributes.rb', line 481

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if @created_at.nil?
  return false if @status.nil?
  return false if @name.nil?
  return false if !@ein.nil? && @ein !~ Regexp.new(/^\d{9}$/)
  return false if @entity_type.nil?
  return false if @state_of_incorporation.nil?
  return false if @state_of_incorporation !~ Regexp.new(/^((A[LKSZR])|(C[AOT])|(D[EC])|(F[ML])|(G[AU])|(HI)|(I[DLNA])|(K[SY])|(LA)|(M[EHDAINSOT])|(N[EVHJMYCD])|(MP)|(O[HKR])|(P[WAR])|(RI)|(S[CD])|(T[NX])|(UT)|(V[TIA])|(W[AVIY]))$/)
  return false if @contact.nil?
  return false if @officer.nil?
  return false if @beneficial_owners.nil?
  decision_method_validator = EnumAttributeValidator.new('String', ["Manually", "Automatically"])
  return false unless decision_method_validator.valid?(@decision_method)
  return false if !@tags.nil? && @tags.length > 15
  risk_rate_validator = EnumAttributeValidator.new('String', ["low", "medium", "high"])
  return false unless risk_rate_validator.valid?(@risk_rate)
  return false if !@year_of_incorporation.nil? && @year_of_incorporation !~ Regexp.new(/^\d{4}$/)
  return false if !@countries_of_operation.nil? && @countries_of_operation.length < 1
  true
end