Class: SwaggerClient::AddClientToClassVisit

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

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AddClientToClassVisit

Initializes the object

Parameters:

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

    Model attributes in the form of hash



158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 158

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#actionObject

The action taken.



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

def action
  @action
end

#appointment_gender_preferenceObject

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



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

def appointment_gender_preference
  @appointment_gender_preference
end

#appointment_idObject

The appointment’s ID.



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

def appointment_id
  @appointment_id
end

#appointment_statusObject

The status of the appointment.



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

def appointment_status
  @appointment_status
end

#class_idObject

The class ID that was used to retrieve the visits.



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

def class_id
  @class_id
end

#client_idObject

The ID of the client associated with the visit.



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

def client_id
  @client_id
end

#cross_regional_booking_performedObject

When ‘true`, indicates that the client is paying for the visit using a pricing option from one of their associated cross-regional profiles.



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

def cross_regional_booking_performed
  @cross_regional_booking_performed
end

#end_date_timeObject

The date and time the visit ends. The Public API returns UTC dates and times. For example, a class that occurs on June 25th, 2018 at 2:15PM (EST) appears as “2018-06-25T19:15:00Z” because EST is five hours behind UTC. Date time pairs always return in the format YYYY-MM-DDTHH:mm:ssZ.



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

def end_date_time
  @end_date_time
end

#idObject

The ID of the visit.



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

def id
  @id
end

#last_modified_date_timeObject

When included in the request, only records modified on or after the specified ‘LastModifiedDate` are included in the response. The Public API returns UTC dates and times. For example, a class that occurs on June 25th, 2018 at 2:15PM (EST) appears as “2018-06-25T19:15:00Z” because EST is five hours behind UTC. Date time pairs always return in the format YYYY-MM-DDTHH:mm:ssZ.



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

def last_modified_date_time
  @last_modified_date_time
end

#late_cancelledObject

When ‘true`, indicates that the class has been `LateCancelled`.<br /> When `false`, indicates that the class has not been `LateCancelled`.



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

def late_cancelled
  @late_cancelled
end

#location_idObject

The ID of the location where the visit took place or is to take place.



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

def location_id
  @location_id
end

#make_upObject

When ‘true`, the client can make up this session and a session is not deducted from the pricing option that was used to sign the client into the enrollment. When the client has the make-up session, a session is automatically removed from a pricing option that matches the service category of the enrollment and is within the same date range of the missed session.<br /> When `false`, the client cannot make up this session. See [Enrollments: Make-ups](support.mindbodyonline.com/s/article/203259433-Enrollments-Make-ups?language=en_US) for more information.



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

def make_up
  @make_up
end

#nameObject

The name of the class.



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

def name
  @name
end

#service_idObject

The ID of the pricing option used to pay for the class visit.



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

def service_id
  @service_id
end

#signed_inObject

When ‘true`, indicates that the client has been signed in.<br /> When `false`, indicates that the client has not been signed in.



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

def signed_in
  @signed_in
end

#site_idObject

The ID of the business from which cross-regional payment is applied.



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

def site_id
  @site_id
end

#staff_idObject

The ID of the staff member who is teaching the class.



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

def staff_id
  @staff_id
end

#start_date_timeObject

The time this class is scheduled to start.



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

def start_date_time
  @start_date_time
end

#waitlist_entry_idObject

When this value is not null, it indicates that the client is on the waiting list for the requested class. The only additional fields that are populated when this is not null are: * ClassId * ClientId You can call GET WaitlistEntries using ‘WaitlistEntryId` to obtain more data about this waiting list entry.



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

def waitlist_entry_id
  @waitlist_entry_id
end

#web_signupObject

When ‘true`, indicates that the client signed up online.<br /> When `false`, indicates that the client was signed up by a staff member.



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

def 
  @web_signup
end

Class Method Details

.attribute_mapObject

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



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 103

def self.attribute_map
  {
    :'cross_regional_booking_performed' => :'CrossRegionalBookingPerformed',
    :'site_id' => :'SiteId',
    :'waitlist_entry_id' => :'WaitlistEntryId',
    :'appointment_id' => :'AppointmentId',
    :'appointment_gender_preference' => :'AppointmentGenderPreference',
    :'appointment_status' => :'AppointmentStatus',
    :'class_id' => :'ClassId',
    :'client_id' => :'ClientId',
    :'start_date_time' => :'StartDateTime',
    :'end_date_time' => :'EndDateTime',
    :'id' => :'Id',
    :'last_modified_date_time' => :'LastModifiedDateTime',
    :'late_cancelled' => :'LateCancelled',
    :'location_id' => :'LocationId',
    :'make_up' => :'MakeUp',
    :'name' => :'Name',
    :'service_id' => :'ServiceId',
    :'signed_in' => :'SignedIn',
    :'staff_id' => :'StaffId',
    :'web_signup' => :'WebSignup',
    :'action' => :'Action'
  }
end

.swagger_typesObject

Attribute type mapping.



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

def self.swagger_types
  {
    :'cross_regional_booking_performed' => :'BOOLEAN',
    :'site_id' => :'Integer',
    :'waitlist_entry_id' => :'Integer',
    :'appointment_id' => :'Integer',
    :'appointment_gender_preference' => :'String',
    :'appointment_status' => :'String',
    :'class_id' => :'Integer',
    :'client_id' => :'String',
    :'start_date_time' => :'DateTime',
    :'end_date_time' => :'DateTime',
    :'id' => :'Integer',
    :'last_modified_date_time' => :'DateTime',
    :'late_cancelled' => :'BOOLEAN',
    :'location_id' => :'Integer',
    :'make_up' => :'BOOLEAN',
    :'name' => :'String',
    :'service_id' => :'Integer',
    :'signed_in' => :'BOOLEAN',
    :'staff_id' => :'Integer',
    :'web_signup' => :'BOOLEAN',
    :'action' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      cross_regional_booking_performed == o.cross_regional_booking_performed &&
      site_id == o.site_id &&
      waitlist_entry_id == o.waitlist_entry_id &&
      appointment_id == o.appointment_id &&
      appointment_gender_preference == o.appointment_gender_preference &&
      appointment_status == o.appointment_status &&
      class_id == o.class_id &&
      client_id == o.client_id &&
      start_date_time == o.start_date_time &&
      end_date_time == o.end_date_time &&
      id == o.id &&
      last_modified_date_time == o.last_modified_date_time &&
      late_cancelled == o.late_cancelled &&
      location_id == o.location_id &&
      make_up == o.make_up &&
      name == o.name &&
      service_id == o.service_id &&
      signed_in == o.signed_in &&
      staff_id == o.staff_id &&
       == o. &&
      action == o.action
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



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

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



428
429
430
431
432
433
434
435
436
437
438
439
440
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 428

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



341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 341

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


328
329
330
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 328

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



334
335
336
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 334

def hash
  [cross_regional_booking_performed, site_id, waitlist_entry_id, appointment_id, appointment_gender_preference, appointment_status, class_id, client_id, start_date_time, end_date_time, id, last_modified_date_time, late_cancelled, location_id, make_up, name, service_id, signed_in, staff_id, , action].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



251
252
253
254
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 251

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



408
409
410
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 408

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



414
415
416
417
418
419
420
421
422
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 414

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



402
403
404
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 402

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



258
259
260
261
262
263
264
265
266
# File 'lib/swagger_client/models/add_client_to_class_visit.rb', line 258

def valid?
  appointment_gender_preference_validator = EnumAttributeValidator.new('String', ['None', 'Female', 'Male'])
  return false unless appointment_gender_preference_validator.valid?(@appointment_gender_preference)
  appointment_status_validator = EnumAttributeValidator.new('String', ['None', 'Requested', 'Booked', 'Completed', 'Confirmed', 'Arrived', 'NoShow', 'Cancelled', 'LateCancelled'])
  return false unless appointment_status_validator.valid?(@appointment_status)
  action_validator = EnumAttributeValidator.new('String', ['None', 'Added', 'Updated', 'Failed', 'Removed'])
  return false unless action_validator.valid?(@action)
  true
end