Class: VericredClient::ProviderDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/vericred_client/models/provider_details.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ProviderDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end

Instance Attribute Details

#cityObject

City name (e.g. Springfield).



19
20
21
# File 'lib/vericred_client/models/provider_details.rb', line 19

def city
  @city
end

#emailObject

Primary email address to contact the provider.



22
23
24
# File 'lib/vericred_client/models/provider_details.rb', line 22

def email
  @email
end

#first_nameObject

Given name for the provider.



28
29
30
# File 'lib/vericred_client/models/provider_details.rb', line 28

def first_name
  @first_name
end

#genderObject

Provider’s gender (M or F)



25
26
27
# File 'lib/vericred_client/models/provider_details.rb', line 25

def gender
  @gender
end

#hios_idsObject

List of HIOS ids for this provider



88
89
90
# File 'lib/vericred_client/models/provider_details.rb', line 88

def hios_ids
  @hios_ids
end

#idObject

National Provider Index (NPI) number



31
32
33
# File 'lib/vericred_client/models/provider_details.rb', line 31

def id
  @id
end

#last_nameObject

Family name for the provider.



34
35
36
# File 'lib/vericred_client/models/provider_details.rb', line 34

def last_name
  @last_name
end

#latitudeObject

Latitude of provider



37
38
39
# File 'lib/vericred_client/models/provider_details.rb', line 37

def latitude
  @latitude
end

#longitudeObject

Longitude of provider



40
41
42
# File 'lib/vericred_client/models/provider_details.rb', line 40

def longitude
  @longitude
end

#middle_nameObject

Middle name for the provider.



43
44
45
# File 'lib/vericred_client/models/provider_details.rb', line 43

def middle_name
  @middle_name
end

#network_idsObject

Array of network ids



46
47
48
# File 'lib/vericred_client/models/provider_details.rb', line 46

def network_ids
  @network_ids
end

#npisObject

The National Provider Index (NPI) numbers associated with this provider.



85
86
87
# File 'lib/vericred_client/models/provider_details.rb', line 85

def npis
  @npis
end

#organization_nameObject

name for the providers of type: organization.



49
50
51
# File 'lib/vericred_client/models/provider_details.rb', line 49

def organization_name
  @organization_name
end

#phoneObject

Office phone for the provider



52
53
54
# File 'lib/vericred_client/models/provider_details.rb', line 52

def phone
  @phone
end

#presentation_nameObject

Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White)



55
56
57
# File 'lib/vericred_client/models/provider_details.rb', line 55

def presentation_name
  @presentation_name
end

#specialtyObject

Name of the primary Specialty



58
59
60
# File 'lib/vericred_client/models/provider_details.rb', line 58

def specialty
  @specialty
end

#stateObject

State code for the provider’s address (e.g. NY).



61
62
63
# File 'lib/vericred_client/models/provider_details.rb', line 61

def state
  @state
end

#state_idObject

Foreign key to States



64
65
66
# File 'lib/vericred_client/models/provider_details.rb', line 64

def state_id
  @state_id
end

#street_line_1Object

First line of the provider’s street address.



67
68
69
# File 'lib/vericred_client/models/provider_details.rb', line 67

def street_line_1
  @street_line_1
end

#street_line_2Object

Second line of the provider’s street address.



70
71
72
# File 'lib/vericred_client/models/provider_details.rb', line 70

def street_line_2
  @street_line_2
end

#suffixObject

Suffix for the provider’s name (e.g. Jr)



73
74
75
# File 'lib/vericred_client/models/provider_details.rb', line 73

def suffix
  @suffix
end

#titleObject

Professional title for the provider (e.g. Dr).



76
77
78
# File 'lib/vericred_client/models/provider_details.rb', line 76

def title
  @title
end

#typeObject

Type of NPI number (individual provider vs organization).



79
80
81
# File 'lib/vericred_client/models/provider_details.rb', line 79

def type
  @type
end

#zip_codeObject

Postal code for the provider’s address (e.g. 11215)



82
83
84
# File 'lib/vericred_client/models/provider_details.rb', line 82

def zip_code
  @zip_code
end

Class Method Details

.attribute_mapObject

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



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/vericred_client/models/provider_details.rb', line 92

def self.attribute_map
  {
    :'city' => :'city',
    :'email' => :'email',
    :'gender' => :'gender',
    :'first_name' => :'first_name',
    :'id' => :'id',
    :'last_name' => :'last_name',
    :'latitude' => :'latitude',
    :'longitude' => :'longitude',
    :'middle_name' => :'middle_name',
    :'network_ids' => :'network_ids',
    :'organization_name' => :'organization_name',
    :'phone' => :'phone',
    :'presentation_name' => :'presentation_name',
    :'specialty' => :'specialty',
    :'state' => :'state',
    :'state_id' => :'state_id',
    :'street_line_1' => :'street_line_1',
    :'street_line_2' => :'street_line_2',
    :'suffix' => :'suffix',
    :'title' => :'title',
    :'type' => :'type',
    :'zip_code' => :'zip_code',
    :'npis' => :'npis',
    :'hios_ids' => :'hios_ids'
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/vericred_client/models/provider_details.rb', line 122

def self.swagger_types
  {
    :'city' => :'String',
    :'email' => :'String',
    :'gender' => :'String',
    :'first_name' => :'String',
    :'id' => :'Integer',
    :'last_name' => :'String',
    :'latitude' => :'Float',
    :'longitude' => :'Float',
    :'middle_name' => :'String',
    :'network_ids' => :'Array<Integer>',
    :'organization_name' => :'String',
    :'phone' => :'String',
    :'presentation_name' => :'String',
    :'specialty' => :'String',
    :'state' => :'String',
    :'state_id' => :'Integer',
    :'street_line_1' => :'String',
    :'street_line_2' => :'String',
    :'suffix' => :'String',
    :'title' => :'String',
    :'type' => :'String',
    :'zip_code' => :'String',
    :'npis' => :'Array<Integer>',
    :'hios_ids' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



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
# File 'lib/vericred_client/models/provider_details.rb', line 278

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      city == o.city &&
      email == o.email &&
      gender == o.gender &&
      first_name == o.first_name &&
      id == o.id &&
      last_name == o.last_name &&
      latitude == o.latitude &&
      longitude == o.longitude &&
      middle_name == o.middle_name &&
      network_ids == o.network_ids &&
      organization_name == o.organization_name &&
      phone == o.phone &&
      presentation_name == o.presentation_name &&
      specialty == o.specialty &&
      state == o.state &&
      state_id == o.state_id &&
      street_line_1 == o.street_line_1 &&
      street_line_2 == o.street_line_2 &&
      suffix == o.suffix &&
      title == o.title &&
      type == o.type &&
      zip_code == o.zip_code &&
      npis == o.npis &&
      hios_ids == o.hios_ids
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



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
# File 'lib/vericred_client/models/provider_details.rb', line 343

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 = VericredClient.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



409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/vericred_client/models/provider_details.rb', line 409

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



322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
# File 'lib/vericred_client/models/provider_details.rb', line 322

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


309
310
311
# File 'lib/vericred_client/models/provider_details.rb', line 309

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



315
316
317
# File 'lib/vericred_client/models/provider_details.rb', line 315

def hash
  [city, email, gender, first_name, id, last_name, latitude, longitude, middle_name, network_ids, organization_name, phone, presentation_name, specialty, state, state_id, street_line_1, street_line_2, suffix, title, type, zip_code, npis, hios_ids].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



265
266
267
268
# File 'lib/vericred_client/models/provider_details.rb', line 265

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



389
390
391
# File 'lib/vericred_client/models/provider_details.rb', line 389

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



395
396
397
398
399
400
401
402
403
# File 'lib/vericred_client/models/provider_details.rb', line 395

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



383
384
385
# File 'lib/vericred_client/models/provider_details.rb', line 383

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



272
273
274
# File 'lib/vericred_client/models/provider_details.rb', line 272

def valid?
  return true
end