Class: SwaggerClient::Client

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

Overview

A Client

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Client

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
553
# File 'lib/swagger_client/models/client.rb', line 324

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?(:'AppointmentGenderPreference')
    self.appointment_gender_preference = attributes[:'AppointmentGenderPreference']
  end

  if attributes.has_key?(:'BirthDate')
    self.birth_date = attributes[:'BirthDate']
  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?(:'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?(:'FirstAppointmentDate')
    self.first_appointment_date = attributes[:'FirstAppointmentDate']
  end

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

  if attributes.has_key?(:'Id')
    self.id = attributes[:'Id']
  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?(:'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?(:'MobileProvider')
    self.mobile_provider = attributes[:'MobileProvider']
  end

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

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

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

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

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

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

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

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

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

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

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

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

  if attributes.has_key?(:'AccountBalance')
    self. = attributes[:'AccountBalance']
  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?(:'City')
    self.city = attributes[:'City']
  end

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

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

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

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

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

  if attributes.has_key?(:'EmergencyContactInfoEmail')
    self.emergency_contact_info_email = attributes[:'EmergencyContactInfoEmail']
  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?(:'Gender')
    self.gender = attributes[:'Gender']
  end

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#account_balanceObject



109
110
111
# File 'lib/swagger_client/models/client.rb', line 109

def 
  @account_balance
end

#actionObject

The action taken.



160
161
162
# File 'lib/swagger_client/models/client.rb', line 160

def action
  @action
end

#activeObject

When ‘true`, indicates that the client’s profile is marked as active on the site.<br /> When `false`, the client’s profile is inactive.



151
152
153
# File 'lib/swagger_client/models/client.rb', line 151

def active
  @active
end

#address_line1Object

The first line of the client’s street address.



112
113
114
# File 'lib/swagger_client/models/client.rb', line 112

def address_line1
  @address_line1
end

#address_line2Object

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



115
116
117
# File 'lib/swagger_client/models/client.rb', line 115

def address_line2
  @address_line2
end

#appointment_gender_preferenceObject

The gender of staff member with whom the client prefers to book appointments.



19
20
21
# File 'lib/swagger_client/models/client.rb', line 19

def appointment_gender_preference
  @appointment_gender_preference
end

#birth_dateObject

The client’s date of birth.



22
23
24
# File 'lib/swagger_client/models/client.rb', line 22

def birth_date
  @birth_date
end

#cityObject

The client’s city.



118
119
120
# File 'lib/swagger_client/models/client.rb', line 118

def city
  @city
end

#client_credit_cardObject

Contains information about the client’s credit card.



34
35
36
# File 'lib/swagger_client/models/client.rb', line 34

def client_credit_card
  @client_credit_card
end

#client_indexesObject

Contains the IDs of the client’s assigned ClientIndexes and ClientIndexValues.



37
38
39
# File 'lib/swagger_client/models/client.rb', line 37

def client_indexes
  @client_indexes
end

#client_relationshipsObject

Contains information about the relationship between two clients.



40
41
42
# File 'lib/swagger_client/models/client.rb', line 40

def client_relationships
  @client_relationships
end

#countryObject

The client’s country.



25
26
27
# File 'lib/swagger_client/models/client.rb', line 25

def country
  @country
end

#creation_dateObject

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



28
29
30
# File 'lib/swagger_client/models/client.rb', line 28

def creation_date
  @creation_date
end

#custom_client_fieldsObject

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



31
32
33
# File 'lib/swagger_client/models/client.rb', line 31

def custom_client_fields
  @custom_client_fields
end

#emailObject

The client’s email address.



97
98
99
# File 'lib/swagger_client/models/client.rb', line 97

def email
  @email
end

#emergency_contact_info_emailObject

The email address of the client’s emergency contact.



136
137
138
# File 'lib/swagger_client/models/client.rb', line 136

def emergency_contact_info_email
  @emergency_contact_info_email
end

#emergency_contact_info_nameObject

The name of the client’s emergency contact.



133
134
135
# File 'lib/swagger_client/models/client.rb', line 133

def emergency_contact_info_name
  @emergency_contact_info_name
end

#emergency_contact_info_phoneObject

The phone number of the client’s emergency contact.



139
140
141
# File 'lib/swagger_client/models/client.rb', line 139

def emergency_contact_info_phone
  @emergency_contact_info_phone
end

#emergency_contact_info_relationshipObject

The client’s relationship with the emergency contact.



142
143
144
# File 'lib/swagger_client/models/client.rb', line 142

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.



43
44
45
# File 'lib/swagger_client/models/client.rb', line 43

def first_appointment_date
  @first_appointment_date
end

#first_nameObject

The client’s first name.



46
47
48
# File 'lib/swagger_client/models/client.rb', line 46

def first_name
  @first_name
end

#genderObject

The gender of the client.



145
146
147
# File 'lib/swagger_client/models/client.rb', line 145

def gender
  @gender
end

#home_phoneObject

The client’s home phone number.



103
104
105
# File 'lib/swagger_client/models/client.rb', line 103

def home_phone
  @home_phone
end

#idObject

The client’s ID, as configured by the business owner. This is the client’s barcode ID if the business owner assigns barcodes to clients. This ID is used throughout the Public API for client-related Public API calls. When used in a POST ‘UpdateClient` request, the `Id` is used to identify the client for the update.



49
50
51
# File 'lib/swagger_client/models/client.rb', line 49

def id
  @id
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.



52
53
54
# File 'lib/swagger_client/models/client.rb', line 52

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.



55
56
57
# File 'lib/swagger_client/models/client.rb', line 55

def is_prospect
  @is_prospect
end

#last_formula_notesObject



148
149
150
# File 'lib/swagger_client/models/client.rb', line 148

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.



82
83
84
# File 'lib/swagger_client/models/client.rb', line 82

def last_modified_date_time
  @last_modified_date_time
end

#last_nameObject

The client’s last name.



58
59
60
# File 'lib/swagger_client/models/client.rb', line 58

def last_name
  @last_name
end

#liabilityObject

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



61
62
63
# File 'lib/swagger_client/models/client.rb', line 61

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`.



64
65
66
# File 'lib/swagger_client/models/client.rb', line 64

def liability_release
  @liability_release
end

#membership_iconObject

The ID of the [membership icon](support.mindbodyonline.com/s/article/203259703-Membership-Setup-screen?language=en_US) displayed next to the client’s name, if the client has a membership on their account.



67
68
69
# File 'lib/swagger_client/models/client.rb', line 67

def membership_icon
  @membership_icon
end

#middle_nameObject

The client’s middle name.



91
92
93
# File 'lib/swagger_client/models/client.rb', line 91

def middle_name
  @middle_name
end

#mobile_phoneObject

The client’s mobile phone number.



100
101
102
# File 'lib/swagger_client/models/client.rb', line 100

def mobile_phone
  @mobile_phone
end

#mobile_providerObject

The client’s mobile provider.



70
71
72
# File 'lib/swagger_client/models/client.rb', line 70

def mobile_provider
  @mobile_provider
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.



73
74
75
# File 'lib/swagger_client/models/client.rb', line 73

def notes
  @notes
end

#photo_urlObject

The URL of the client’s photo for the client profile.



130
131
132
# File 'lib/swagger_client/models/client.rb', line 130

def photo_url
  @photo_url
end

#postal_codeObject

The client’s postal code.



121
122
123
# File 'lib/swagger_client/models/client.rb', line 121

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).



94
95
96
# File 'lib/swagger_client/models/client.rb', line 94

def prospect_stage
  @prospect_stage
end

#red_alertObject

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



85
86
87
# File 'lib/swagger_client/models/client.rb', line 85

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 ‘GetClientReferralTypes` endpoint.



127
128
129
# File 'lib/swagger_client/models/client.rb', line 127

def referred_by
  @referred_by
end

#sales_repsObject

A list of sales representatives.



154
155
156
# File 'lib/swagger_client/models/client.rb', line 154

def sales_reps
  @sales_reps
end

#send_account_emailsObject

When ‘true`, indicates that the client has opted to receive general account notifications by email. This property is editable. <br />Default: false



163
164
165
# File 'lib/swagger_client/models/client.rb', line 163

def 
  @send_account_emails
end

#send_account_textsObject

When ‘true`, indicates that the client has opted to receive general account notifications by text message. This parameter cannot be updated by developers. If included in a request, it is ignored.



166
167
168
# File 'lib/swagger_client/models/client.rb', line 166

def 
  @send_account_texts
end

#send_promotional_emailsObject

When ‘true`, indicates that the client has opted to receive promotional notifications by email. This property is editable. <br />Default: false



169
170
171
# File 'lib/swagger_client/models/client.rb', line 169

def send_promotional_emails
  @send_promotional_emails
end

#send_promotional_textsObject

When ‘true`, indicates that the client has opted to receive promotional notifications by text message. This parameter cannot be updated by developers. If included in a request, it is ignored.



172
173
174
# File 'lib/swagger_client/models/client.rb', line 172

def send_promotional_texts
  @send_promotional_texts
end

#send_schedule_emailsObject

When ‘true`, indicates that the client has opted to receive schedule notifications by email. This property is editable. <br />Default: false



175
176
177
# File 'lib/swagger_client/models/client.rb', line 175

def send_schedule_emails
  @send_schedule_emails
end

#send_schedule_textsObject

When ‘true`, indicates that the client has opted to receive schedule notifications by text message. This parameter cannot be updated by developers. If included in a request, it is ignored.



178
179
180
# File 'lib/swagger_client/models/client.rb', line 178

def send_schedule_texts
  @send_schedule_texts
end

#stateObject

The client’s state.



76
77
78
# File 'lib/swagger_client/models/client.rb', line 76

def state
  @state
end

#statusObject

The status of the client in the business. Possible values are: * Declined * Non-Member * Active * Expired * Suspended * Terminated



157
158
159
# File 'lib/swagger_client/models/client.rb', line 157

def status
  @status
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.



79
80
81
# File 'lib/swagger_client/models/client.rb', line 79

def unique_id
  @unique_id
end

#work_extensionObject

The client’s work phone extension number.



124
125
126
# File 'lib/swagger_client/models/client.rb', line 124

def work_extension
  @work_extension
end

#work_phoneObject

The client’s work phone number.



106
107
108
# File 'lib/swagger_client/models/client.rb', line 106

def work_phone
  @work_phone
end

#yellow_alertObject

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



88
89
90
# File 'lib/swagger_client/models/client.rb', line 88

def yellow_alert
  @yellow_alert
end

Class Method Details

.attribute_mapObject

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



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
260
# File 'lib/swagger_client/models/client.rb', line 203

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

.swagger_typesObject

Attribute type mapping.



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

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

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
649
650
651
# File 'lib/swagger_client/models/client.rb', line 594

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      appointment_gender_preference == o.appointment_gender_preference &&
      birth_date == o.birth_date &&
      country == o.country &&
      creation_date == o.creation_date &&
      custom_client_fields == o.custom_client_fields &&
      client_credit_card == o.client_credit_card &&
      client_indexes == o.client_indexes &&
      client_relationships == o.client_relationships &&
      first_appointment_date == o.first_appointment_date &&
      first_name == o.first_name &&
      id == o.id &&
      is_company == o.is_company &&
      is_prospect == o.is_prospect &&
      last_name == o.last_name &&
      liability == o.liability &&
      liability_release == o.liability_release &&
      membership_icon == o.membership_icon &&
      mobile_provider == o.mobile_provider &&
      notes == o.notes &&
      state == o.state &&
      unique_id == o.unique_id &&
      last_modified_date_time == o.last_modified_date_time &&
      red_alert == o.red_alert &&
      yellow_alert == o.yellow_alert &&
      middle_name == o.middle_name &&
      prospect_stage == o.prospect_stage &&
      email == o.email &&
      mobile_phone == o.mobile_phone &&
      home_phone == o.home_phone &&
      work_phone == o.work_phone &&
       == o. &&
      address_line1 == o.address_line1 &&
      address_line2 == o.address_line2 &&
      city == o.city &&
      postal_code == o.postal_code &&
      work_extension == o.work_extension &&
      referred_by == o.referred_by &&
      photo_url == o.photo_url &&
      emergency_contact_info_name == o.emergency_contact_info_name &&
      emergency_contact_info_email == o.emergency_contact_info_email &&
      emergency_contact_info_phone == o.emergency_contact_info_phone &&
      emergency_contact_info_relationship == o.emergency_contact_info_relationship &&
      gender == o.gender &&
      last_formula_notes == o.last_formula_notes &&
      active == o.active &&
      sales_reps == o.sales_reps &&
      status == o.status &&
      action == o.action &&
       == o. &&
       == o. &&
      send_promotional_emails == o.send_promotional_emails &&
      send_promotional_texts == o.send_promotional_texts &&
      send_schedule_emails == o.send_schedule_emails &&
      send_schedule_texts == o.send_schedule_texts
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



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
723
724
725
# File 'lib/swagger_client/models/client.rb', line 689

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



755
756
757
758
759
760
761
762
763
764
765
766
767
# File 'lib/swagger_client/models/client.rb', line 755

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



668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
# File 'lib/swagger_client/models/client.rb', line 668

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


655
656
657
# File 'lib/swagger_client/models/client.rb', line 655

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



661
662
663
# File 'lib/swagger_client/models/client.rb', line 661

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

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



557
558
559
560
# File 'lib/swagger_client/models/client.rb', line 557

def list_invalid_properties
  invalid_properties = Array.new
  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



735
736
737
# File 'lib/swagger_client/models/client.rb', line 735

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



741
742
743
744
745
746
747
748
749
# File 'lib/swagger_client/models/client.rb', line 741

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



729
730
731
# File 'lib/swagger_client/models/client.rb', line 729

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



564
565
566
567
568
569
570
# File 'lib/swagger_client/models/client.rb', line 564

def valid?
  appointment_gender_preference_validator = EnumAttributeValidator.new('String', ['None', 'Female', 'Male'])
  return false unless appointment_gender_preference_validator.valid?(@appointment_gender_preference)
  action_validator = EnumAttributeValidator.new('String', ['None', 'Added', 'Updated', 'Failed', 'Removed'])
  return false unless action_validator.valid?(@action)
  true
end