Class: SwaggerClient::AddClientRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger_client/models/add_client_request.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AddClientRequest

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
415
416
417
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
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
# File 'lib/swagger_client/models/add_client_request.rb', line 323

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'AccountBalance')
    self. = attributes[:'AccountBalance']
  end

  if attributes.has_key?(:'Action')
    self.action = attributes[:'Action']
  end

  if attributes.has_key?(:'Active')
    self.active = attributes[:'Active']
  end

  if attributes.has_key?(:'AddressLine1')
    self.address_line1 = attributes[:'AddressLine1']
  end

  if attributes.has_key?(:'AddressLine2')
    self.address_line2 = attributes[:'AddressLine2']
  end

  if attributes.has_key?(:'ApptGenderPrefMale')
    self.appt_gender_pref_male = attributes[:'ApptGenderPrefMale']
  end

  if attributes.has_key?(:'BirthDate')
    self.birth_date = attributes[:'BirthDate']
  end

  if attributes.has_key?(:'City')
    self.city = attributes[:'City']
  end

  if attributes.has_key?(:'ClientCreditCard')
    self.client_credit_card = attributes[:'ClientCreditCard']
  end

  if attributes.has_key?(:'ClientIndexes')
    if (value = attributes[:'ClientIndexes']).is_a?(Array)
      self.client_indexes = value
    end
  end

  if attributes.has_key?(:'ClientRelationships')
    if (value = attributes[:'ClientRelationships']).is_a?(Array)
      self.client_relationships = value
    end
  end

  if attributes.has_key?(:'Country')
    self.country = attributes[:'Country']
  end

  if attributes.has_key?(:'CreationDate')
    self.creation_date = attributes[:'CreationDate']
  end

  if attributes.has_key?(:'CustomClientFields')
    if (value = attributes[:'CustomClientFields']).is_a?(Array)
      self.custom_client_fields = value
    end
  end

  if attributes.has_key?(:'Email')
    self.email = attributes[:'Email']
  end

  if attributes.has_key?(:'EmergencyContactInfoEmail')
    self.emergency_contact_info_email = attributes[:'EmergencyContactInfoEmail']
  end

  if attributes.has_key?(:'EmergencyContactInfoName')
    self.emergency_contact_info_name = attributes[:'EmergencyContactInfoName']
  end

  if attributes.has_key?(:'EmergencyContactInfoPhone')
    self.emergency_contact_info_phone = attributes[:'EmergencyContactInfoPhone']
  end

  if attributes.has_key?(:'EmergencyContactInfoRelationship')
    self.emergency_contact_info_relationship = attributes[:'EmergencyContactInfoRelationship']
  end

  if attributes.has_key?(:'FirstAppointmentDate')
    self.first_appointment_date = attributes[:'FirstAppointmentDate']
  end

  if attributes.has_key?(:'FirstName')
    self.first_name = attributes[:'FirstName']
  end

  if attributes.has_key?(:'Gender')
    self.gender = attributes[:'Gender']
  end

  if attributes.has_key?(:'HomeLocation')
    self.home_location = attributes[:'HomeLocation']
  end

  if attributes.has_key?(:'HomePhone')
    self.home_phone = attributes[:'HomePhone']
  end

  if attributes.has_key?(:'IsCompany')
    self.is_company = attributes[:'IsCompany']
  end

  if attributes.has_key?(:'IsProspect')
    self.is_prospect = attributes[:'IsProspect']
  end

  if attributes.has_key?(:'LastFormulaNotes')
    self.last_formula_notes = attributes[:'LastFormulaNotes']
  end

  if attributes.has_key?(:'LastModifiedDateTime')
    self.last_modified_date_time = attributes[:'LastModifiedDateTime']
  end

  if attributes.has_key?(:'LastName')
    self.last_name = attributes[:'LastName']
  end

  if attributes.has_key?(:'Liability')
    self.liability = attributes[:'Liability']
  end

  if attributes.has_key?(:'LiabilityRelease')
    self.liability_release = attributes[:'LiabilityRelease']
  end

  if attributes.has_key?(:'MembershipIcon')
    self.membership_icon = attributes[:'MembershipIcon']
  end

  if attributes.has_key?(:'MiddleName')
    self.middle_name = attributes[:'MiddleName']
  end

  if attributes.has_key?(:'MobilePhone')
    self.mobile_phone = attributes[:'MobilePhone']
  end

  if attributes.has_key?(:'MobileProvider')
    self.mobile_provider = attributes[:'MobileProvider']
  end

  if attributes.has_key?(:'NewId')
    self.new_id = attributes[:'NewId']
  end

  if attributes.has_key?(:'Notes')
    self.notes = attributes[:'Notes']
  end

  if attributes.has_key?(:'PhotoUrl')
    self.photo_url = attributes[:'PhotoUrl']
  end

  if attributes.has_key?(:'PostalCode')
    self.postal_code = attributes[:'PostalCode']
  end

  if attributes.has_key?(:'ProspectStage')
    self.prospect_stage = attributes[:'ProspectStage']
  end

  if attributes.has_key?(:'RedAlert')
    self.red_alert = attributes[:'RedAlert']
  end

  if attributes.has_key?(:'ReferredBy')
    self.referred_by = attributes[:'ReferredBy']
  end

  if attributes.has_key?(:'SalesReps')
    if (value = attributes[:'SalesReps']).is_a?(Array)
      self.sales_reps = value
    end
  end

  if attributes.has_key?(:'SiteId')
    self.site_id = attributes[:'SiteId']
  end

  if attributes.has_key?(:'State')
    self.state = attributes[:'State']
  end

  if attributes.has_key?(:'Status')
    self.status = attributes[:'Status']
  end

  if attributes.has_key?(:'Test')
    self.test = attributes[:'Test']
  end

  if attributes.has_key?(:'UniqueId')
    self.unique_id = attributes[:'UniqueId']
  end

  if attributes.has_key?(:'WorkExtension')
    self.work_extension = attributes[:'WorkExtension']
  end

  if attributes.has_key?(:'WorkPhone')
    self.work_phone = attributes[:'WorkPhone']
  end

  if attributes.has_key?(:'YellowAlert')
    self.yellow_alert = attributes[:'YellowAlert']
  end

  if attributes.has_key?(:'SendScheduleEmails')
    self.send_schedule_emails = attributes[:'SendScheduleEmails']
  end

  if attributes.has_key?(:'SendAccountEmails')
    self. = attributes[:'SendAccountEmails']
  end

  if attributes.has_key?(:'SendPromotionalEmails')
    self.send_promotional_emails = attributes[:'SendPromotionalEmails']
  end
end

Instance Attribute Details

#account_balanceObject



18
19
20
# File 'lib/swagger_client/models/add_client_request.rb', line 18

def 
  @account_balance
end

#actionObject

The action taken.



21
22
23
# File 'lib/swagger_client/models/add_client_request.rb', line 21

def action
  @action
end

#activeObject

When ‘true`, indicates that the client is active at the site.<br /> When `false`, indicates that the client is not active at the site.



24
25
26
# File 'lib/swagger_client/models/add_client_request.rb', line 24

def active
  @active
end

#address_line1Object

The first line of the client’s street address.



27
28
29
# File 'lib/swagger_client/models/add_client_request.rb', line 27

def address_line1
  @address_line1
end

#address_line2Object

The second line of the client’s street address, if needed.



30
31
32
# File 'lib/swagger_client/models/add_client_request.rb', line 30

def address_line2
  @address_line2
end

#appt_gender_pref_maleObject

When ‘true`, indicates that the client prefers services to be provided by a male service provider.<br /> When `false`, indicates that the client prefers services to be provided by a female service provider.<br /> When `null`, indicates that the client has no preference. Default: null



33
34
35
# File 'lib/swagger_client/models/add_client_request.rb', line 33

def appt_gender_pref_male
  @appt_gender_pref_male
end

#birth_dateObject

The client’s date of birth.



36
37
38
# File 'lib/swagger_client/models/add_client_request.rb', line 36

def birth_date
  @birth_date
end

#cityObject

The client’s city.



39
40
41
# File 'lib/swagger_client/models/add_client_request.rb', line 39

def city
  @city
end

#client_credit_cardObject

Contains information about the client’s credit card.



42
43
44
# File 'lib/swagger_client/models/add_client_request.rb', line 42

def client_credit_card
  @client_credit_card
end

#client_indexesObject

Contains a list of the indexes and client index values to be assigned to the client.



45
46
47
# File 'lib/swagger_client/models/add_client_request.rb', line 45

def client_indexes
  @client_indexes
end

#client_relationshipsObject

Contains information about client relationships to be assigned to the client.



48
49
50
# File 'lib/swagger_client/models/add_client_request.rb', line 48

def client_relationships
  @client_relationships
end

#countryObject

The country in which the client is located.



51
52
53
# File 'lib/swagger_client/models/add_client_request.rb', line 51

def country
  @country
end

#creation_dateObject

The date when the client was added to the business, either by the client from the online store or by a staff member at the subscriber’s business. This value always returns in the format yyyy-mm-ddThh:mm:ss:ms.



54
55
56
# File 'lib/swagger_client/models/add_client_request.rb', line 54

def creation_date
  @creation_date
end

#custom_client_fieldsObject

Contains information about the custom fields to be assigned to the client.



57
58
59
# File 'lib/swagger_client/models/add_client_request.rb', line 57

def custom_client_fields
  @custom_client_fields
end

#emailObject

The client’s email address.



60
61
62
# File 'lib/swagger_client/models/add_client_request.rb', line 60

def email
  @email
end

#emergency_contact_info_emailObject

The email address of the client’s emergency contact.<br /> For more information, see [Children’s program features(emergency contact information)](support.mindbodyonline.com/s/article/203259283-Children-s-program-features-emergency-contact-information?language=en_US).



63
64
65
# File 'lib/swagger_client/models/add_client_request.rb', line 63

def emergency_contact_info_email
  @emergency_contact_info_email
end

#emergency_contact_info_nameObject

The name of the client’s emergency contact.



66
67
68
# File 'lib/swagger_client/models/add_client_request.rb', line 66

def emergency_contact_info_name
  @emergency_contact_info_name
end

#emergency_contact_info_phoneObject

The phone number of the client’s emergency contact.



69
70
71
# File 'lib/swagger_client/models/add_client_request.rb', line 69

def emergency_contact_info_phone
  @emergency_contact_info_phone
end

#emergency_contact_info_relationshipObject

The client’s relationship with the emergency contact, for example, mother or spouse.



72
73
74
# File 'lib/swagger_client/models/add_client_request.rb', line 72

def emergency_contact_info_relationship
  @emergency_contact_info_relationship
end

#first_appointment_dateObject

The date of the client’s first booked appointment at the business.



75
76
77
# File 'lib/swagger_client/models/add_client_request.rb', line 75

def first_appointment_date
  @first_appointment_date
end

#first_nameObject

The client’s first name. You must specify a first name when you add a client.



78
79
80
# File 'lib/swagger_client/models/add_client_request.rb', line 78

def first_name
  @first_name
end

#genderObject

The client’s gender.



81
82
83
# File 'lib/swagger_client/models/add_client_request.rb', line 81

def gender
  @gender
end

#home_locationObject

Sets the client’s home location to the passed location, based on its ID.



84
85
86
# File 'lib/swagger_client/models/add_client_request.rb', line 84

def home_location
  @home_location
end

#home_phoneObject

The client’s home phone number.



87
88
89
# File 'lib/swagger_client/models/add_client_request.rb', line 87

def home_phone
  @home_phone
end

#is_companyObject

When ‘true`, indicates that the client should be marked as a company at the business.<br /> When `false`, indicates the client is an individual and does not represent a company.



90
91
92
# File 'lib/swagger_client/models/add_client_request.rb', line 90

def is_company
  @is_company
end

#is_prospectObject

This value is set only if the business owner allows individuals to be prospects.<br /> When ‘true`, indicates that the client should be marked as a prospect for the business.<br /> When `false`, indicates that the client should not be marked as a prospect for the business.



93
94
95
# File 'lib/swagger_client/models/add_client_request.rb', line 93

def is_prospect
  @is_prospect
end

#last_formula_notesObject



96
97
98
# File 'lib/swagger_client/models/add_client_request.rb', line 96

def last_formula_notes
  @last_formula_notes
end

#last_modified_date_timeObject

The UTC date and time when the client’s information was last modified.



99
100
101
# File 'lib/swagger_client/models/add_client_request.rb', line 99

def last_modified_date_time
  @last_modified_date_time
end

#last_nameObject

The client’s last name. You must specify a last name when you add a client.



102
103
104
# File 'lib/swagger_client/models/add_client_request.rb', line 102

def last_name
  @last_name
end

#liabilityObject

Contains the client’s liability agreement information for the business.



105
106
107
# File 'lib/swagger_client/models/add_client_request.rb', line 105

def liability
  @liability
end

#liability_releaseObject

Passing ‘true` sets the client’s liability information as follows: * `IsReleased` is set to `true`. * `AgreementDate` is set to the time zone of the business when the call was processed. * `ReleasedBy` is set to `null` if the call is made by the client, `0` if the call was made by the business owner, or to a specific staff member’s ID if a staff member made the call. Passing `false` sets the client’s liability information as follows: * `IsReleased` is set to `false`. * `AgreementDate` is set to `null`. * `ReleasedBy` is set to `null`.



108
109
110
# File 'lib/swagger_client/models/add_client_request.rb', line 108

def liability_release
  @liability_release
end

#membership_iconObject

The ID of the membership icon displayed next to the client’s name, if the client has a membership on their account.



111
112
113
# File 'lib/swagger_client/models/add_client_request.rb', line 111

def membership_icon
  @membership_icon
end

#middle_nameObject

The client’s middle name.



114
115
116
# File 'lib/swagger_client/models/add_client_request.rb', line 114

def middle_name
  @middle_name
end

#mobile_phoneObject

The client’s mobile phone number.



117
118
119
# File 'lib/swagger_client/models/add_client_request.rb', line 117

def mobile_phone
  @mobile_phone
end

#mobile_providerObject

The client’s mobile provider.



120
121
122
# File 'lib/swagger_client/models/add_client_request.rb', line 120

def mobile_provider
  @mobile_provider
end

#new_idObject

When passed, sets the client’s ID to this value. Otherwise, the client’s ID will match their ‘UniqueId`.



123
124
125
# File 'lib/swagger_client/models/add_client_request.rb', line 123

def new_id
  @new_id
end

#notesObject

Any notes entered on the client’s account by staff members. This value should never be shown to clients unless the business owner has a specific reason for showing them.



126
127
128
# File 'lib/swagger_client/models/add_client_request.rb', line 126

def notes
  @notes
end

#photo_urlObject

The URL for the client’s photo, if one has been uploaded.



129
130
131
# File 'lib/swagger_client/models/add_client_request.rb', line 129

def photo_url
  @photo_url
end

#postal_codeObject

The client’s postal code.



132
133
134
# File 'lib/swagger_client/models/add_client_request.rb', line 132

def postal_code
  @postal_code
end

#prospect_stageObject

Contains information about the client [prospect stage](support.mindbodyonline.com/s/article/206176457-Prospect-Stages?language=en_US).



135
136
137
# File 'lib/swagger_client/models/add_client_request.rb', line 135

def prospect_stage
  @prospect_stage
end

#red_alertObject

Contains any red alert information entered by the business owner for the client.



138
139
140
# File 'lib/swagger_client/models/add_client_request.rb', line 138

def red_alert
  @red_alert
end

#referred_byObject

Specifies how the client was referred to the business. You can get a list of possible strings using the ‘GET ClientReferralTypes` endpoint.<br /> For more information, see [Referral types and referral subtypes](support.mindbodyonline.com/s/article/203259393-Referral-types-and-referral-subtypes?language=en_US).



141
142
143
# File 'lib/swagger_client/models/add_client_request.rb', line 141

def referred_by
  @referred_by
end

#sales_repsObject

Contains information about the sales representatives to be assigned to the new client.



144
145
146
# File 'lib/swagger_client/models/add_client_request.rb', line 144

def sales_reps
  @sales_reps
end

#send_account_emailsObject

When ‘true`, indicates that the client opts to receive account emails.



174
175
176
# File 'lib/swagger_client/models/add_client_request.rb', line 174

def 
  
end

#send_promotional_emailsObject

When ‘true`, indicates that the client opts to receive promotional emails.



177
178
179
# File 'lib/swagger_client/models/add_client_request.rb', line 177

def send_promotional_emails
  @send_promotional_emails
end

#send_schedule_emailsObject

When ‘true`, indicates that the client opts to receive schedule emails.



171
172
173
# File 'lib/swagger_client/models/add_client_request.rb', line 171

def send_schedule_emails
  @send_schedule_emails
end

#site_idObject

The ID of the site.



147
148
149
# File 'lib/swagger_client/models/add_client_request.rb', line 147

def site_id
  @site_id
end

#stateObject

The client’s state.



150
151
152
# File 'lib/swagger_client/models/add_client_request.rb', line 150

def state
  @state
end

#statusObject

The client’s status.



153
154
155
# File 'lib/swagger_client/models/add_client_request.rb', line 153

def status
  @status
end

#testObject

When ‘true`, indicates that test mode is enabled. The method is validated, but no client data is added or updated.<br /> Default: false



156
157
158
# File 'lib/swagger_client/models/add_client_request.rb', line 156

def test
  @test
end

#unique_idObject

The client’s system-generated ID at the business. This value cannot be changed by business owners and is always unique across all clients at the business. This ID is not widely used in the Public API, but can be used by your application to uniquely identify clients.



159
160
161
# File 'lib/swagger_client/models/add_client_request.rb', line 159

def unique_id
  @unique_id
end

#work_extensionObject

The client’s work phone extension number.



162
163
164
# File 'lib/swagger_client/models/add_client_request.rb', line 162

def work_extension
  @work_extension
end

#work_phoneObject

The client’s work phone number.



165
166
167
# File 'lib/swagger_client/models/add_client_request.rb', line 165

def work_phone
  @work_phone
end

#yellow_alertObject

Contains any yellow alert information entered by the business owner for the client.



168
169
170
# File 'lib/swagger_client/models/add_client_request.rb', line 168

def yellow_alert
  @yellow_alert
end

Class Method Details

.attribute_mapObject

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



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
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
# File 'lib/swagger_client/models/add_client_request.rb', line 202

def self.attribute_map
  {
    :'account_balance' => :'AccountBalance',
    :'action' => :'Action',
    :'active' => :'Active',
    :'address_line1' => :'AddressLine1',
    :'address_line2' => :'AddressLine2',
    :'appt_gender_pref_male' => :'ApptGenderPrefMale',
    :'birth_date' => :'BirthDate',
    :'city' => :'City',
    :'client_credit_card' => :'ClientCreditCard',
    :'client_indexes' => :'ClientIndexes',
    :'client_relationships' => :'ClientRelationships',
    :'country' => :'Country',
    :'creation_date' => :'CreationDate',
    :'custom_client_fields' => :'CustomClientFields',
    :'email' => :'Email',
    :'emergency_contact_info_email' => :'EmergencyContactInfoEmail',
    :'emergency_contact_info_name' => :'EmergencyContactInfoName',
    :'emergency_contact_info_phone' => :'EmergencyContactInfoPhone',
    :'emergency_contact_info_relationship' => :'EmergencyContactInfoRelationship',
    :'first_appointment_date' => :'FirstAppointmentDate',
    :'first_name' => :'FirstName',
    :'gender' => :'Gender',
    :'home_location' => :'HomeLocation',
    :'home_phone' => :'HomePhone',
    :'is_company' => :'IsCompany',
    :'is_prospect' => :'IsProspect',
    :'last_formula_notes' => :'LastFormulaNotes',
    :'last_modified_date_time' => :'LastModifiedDateTime',
    :'last_name' => :'LastName',
    :'liability' => :'Liability',
    :'liability_release' => :'LiabilityRelease',
    :'membership_icon' => :'MembershipIcon',
    :'middle_name' => :'MiddleName',
    :'mobile_phone' => :'MobilePhone',
    :'mobile_provider' => :'MobileProvider',
    :'new_id' => :'NewId',
    :'notes' => :'Notes',
    :'photo_url' => :'PhotoUrl',
    :'postal_code' => :'PostalCode',
    :'prospect_stage' => :'ProspectStage',
    :'red_alert' => :'RedAlert',
    :'referred_by' => :'ReferredBy',
    :'sales_reps' => :'SalesReps',
    :'site_id' => :'SiteId',
    :'state' => :'State',
    :'status' => :'Status',
    :'test' => :'Test',
    :'unique_id' => :'UniqueId',
    :'work_extension' => :'WorkExtension',
    :'work_phone' => :'WorkPhone',
    :'yellow_alert' => :'YellowAlert',
    :'send_schedule_emails' => :'SendScheduleEmails',
    :'send_account_emails' => :'SendAccountEmails',
    :'send_promotional_emails' => :'SendPromotionalEmails'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/swagger_client/models/add_client_request.rb', line 262

def self.swagger_types
  {
    :'account_balance' => :'Float',
    :'action' => :'String',
    :'active' => :'BOOLEAN',
    :'address_line1' => :'String',
    :'address_line2' => :'String',
    :'appt_gender_pref_male' => :'BOOLEAN',
    :'birth_date' => :'DateTime',
    :'city' => :'String',
    :'client_credit_card' => :'ClientCreditCard',
    :'client_indexes' => :'Array<AssignedClientIndex>',
    :'client_relationships' => :'Array<ClientRelationship>',
    :'country' => :'String',
    :'creation_date' => :'DateTime',
    :'custom_client_fields' => :'Array<CustomClientFieldValue>',
    :'email' => :'String',
    :'emergency_contact_info_email' => :'String',
    :'emergency_contact_info_name' => :'String',
    :'emergency_contact_info_phone' => :'String',
    :'emergency_contact_info_relationship' => :'String',
    :'first_appointment_date' => :'DateTime',
    :'first_name' => :'String',
    :'gender' => :'String',
    :'home_location' => :'Location',
    :'home_phone' => :'String',
    :'is_company' => :'BOOLEAN',
    :'is_prospect' => :'BOOLEAN',
    :'last_formula_notes' => :'String',
    :'last_modified_date_time' => :'DateTime',
    :'last_name' => :'String',
    :'liability' => :'Liability',
    :'liability_release' => :'BOOLEAN',
    :'membership_icon' => :'Integer',
    :'middle_name' => :'String',
    :'mobile_phone' => :'String',
    :'mobile_provider' => :'Integer',
    :'new_id' => :'String',
    :'notes' => :'String',
    :'photo_url' => :'String',
    :'postal_code' => :'String',
    :'prospect_stage' => :'ProspectStage',
    :'red_alert' => :'String',
    :'referred_by' => :'String',
    :'sales_reps' => :'Array<SalesRep>',
    :'site_id' => :'Integer',
    :'state' => :'String',
    :'status' => :'String',
    :'test' => :'BOOLEAN',
    :'unique_id' => :'Integer',
    :'work_extension' => :'String',
    :'work_phone' => :'String',
    :'yellow_alert' => :'String',
    :'send_schedule_emails' => :'BOOLEAN',
    :'send_account_emails' => :'BOOLEAN',
    :'send_promotional_emails' => :'BOOLEAN'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



591
592
593
594
595
596
597
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
641
642
643
644
645
646
647
648
# File 'lib/swagger_client/models/add_client_request.rb', line 591

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
      action == o.action &&
      active == o.active &&
      address_line1 == o.address_line1 &&
      address_line2 == o.address_line2 &&
      appt_gender_pref_male == o.appt_gender_pref_male &&
      birth_date == o.birth_date &&
      city == o.city &&
      client_credit_card == o.client_credit_card &&
      client_indexes == o.client_indexes &&
      client_relationships == o.client_relationships &&
      country == o.country &&
      creation_date == o.creation_date &&
      custom_client_fields == o.custom_client_fields &&
      email == o.email &&
      emergency_contact_info_email == o.emergency_contact_info_email &&
      emergency_contact_info_name == o.emergency_contact_info_name &&
      emergency_contact_info_phone == o.emergency_contact_info_phone &&
      emergency_contact_info_relationship == o.emergency_contact_info_relationship &&
      first_appointment_date == o.first_appointment_date &&
      first_name == o.first_name &&
      gender == o.gender &&
      home_location == o.home_location &&
      home_phone == o.home_phone &&
      is_company == o.is_company &&
      is_prospect == o.is_prospect &&
      last_formula_notes == o.last_formula_notes &&
      last_modified_date_time == o.last_modified_date_time &&
      last_name == o.last_name &&
      liability == o.liability &&
      liability_release == o.liability_release &&
      membership_icon == o.membership_icon &&
      middle_name == o.middle_name &&
      mobile_phone == o.mobile_phone &&
      mobile_provider == o.mobile_provider &&
      new_id == o.new_id &&
      notes == o.notes &&
      photo_url == o.photo_url &&
      postal_code == o.postal_code &&
      prospect_stage == o.prospect_stage &&
      red_alert == o.red_alert &&
      referred_by == o.referred_by &&
      sales_reps == o.sales_reps &&
      site_id == o.site_id &&
      state == o.state &&
      status == o.status &&
      test == o.test &&
      unique_id == o.unique_id &&
      work_extension == o.work_extension &&
      work_phone == o.work_phone &&
      yellow_alert == o.yellow_alert &&
      send_schedule_emails == o.send_schedule_emails &&
       == o. &&
      send_promotional_emails == o.send_promotional_emails
end

#_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



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
719
720
721
722
# File 'lib/swagger_client/models/add_client_request.rb', line 686

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.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
    temp_model = SwaggerClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
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/swagger_client/models/add_client_request.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

#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



665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
# File 'lib/swagger_client/models/add_client_request.rb', line 665

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


652
653
654
# File 'lib/swagger_client/models/add_client_request.rb', line 652

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



658
659
660
# File 'lib/swagger_client/models/add_client_request.rb', line 658

def hash
  [, action, active, address_line1, address_line2, appt_gender_pref_male, birth_date, city, client_credit_card, client_indexes, client_relationships, country, creation_date, custom_client_fields, email, emergency_contact_info_email, emergency_contact_info_name, emergency_contact_info_phone, emergency_contact_info_relationship, first_appointment_date, first_name, gender, home_location, home_phone, is_company, is_prospect, last_formula_notes, last_modified_date_time, last_name, liability, liability_release, membership_icon, middle_name, mobile_phone, mobile_provider, new_id, notes, photo_url, postal_code, prospect_stage, red_alert, referred_by, sales_reps, site_id, state, status, test, unique_id, work_extension, work_phone, yellow_alert, send_schedule_emails, , send_promotional_emails].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



556
557
558
559
560
561
562
563
564
565
566
567
# File 'lib/swagger_client/models/add_client_request.rb', line 556

def list_invalid_properties
  invalid_properties = Array.new
  if @first_name.nil?
    invalid_properties.push('invalid value for "first_name", first_name cannot be nil.')
  end

  if @last_name.nil?
    invalid_properties.push('invalid value for "last_name", last_name cannot be nil.')
  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



732
733
734
# File 'lib/swagger_client/models/add_client_request.rb', line 732

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



738
739
740
741
742
743
744
745
746
# File 'lib/swagger_client/models/add_client_request.rb', line 738

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



726
727
728
# File 'lib/swagger_client/models/add_client_request.rb', line 726

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



571
572
573
574
575
576
577
# File 'lib/swagger_client/models/add_client_request.rb', line 571

def valid?
  action_validator = EnumAttributeValidator.new('String', ['None', 'Added', 'Updated', 'Failed', 'Removed'])
  return false unless action_validator.valid?(@action)
  return false if @first_name.nil?
  return false if @last_name.nil?
  true
end