Class: VericredClient::Provider
- Inherits:
-
Object
- Object
- VericredClient::Provider
- Defined in:
- lib/vericred_client/models/provider.rb
Instance Attribute Summary collapse
-
#accepting_change_of_payor_patients ⇒ Object
Is this provider accepting patients with a change of insurance?.
-
#accepting_medicaid_patients ⇒ Object
Is this provider accepting new Medicaid patients?.
-
#accepting_medicare_patients ⇒ Object
Is this provider accepting new Medicare patients?.
-
#accepting_private_patients ⇒ Object
Is this provider accepting new patients with private insurance?.
-
#accepting_referral_patients ⇒ Object
Is this provider accepting new patients via referrals?.
-
#city ⇒ Object
City name (e.g. Springfield).
-
#email ⇒ Object
Primary email address to contact the provider.
-
#first_name ⇒ Object
Given name for the provider.
-
#gender ⇒ Object
Provider’s gender (M or F).
-
#id ⇒ Object
National Provider Index (NPI) number.
-
#last_name ⇒ Object
Family name for the provider.
-
#middle_name ⇒ Object
Middle name for the provider.
-
#personal_phone ⇒ Object
Personal contact phone for the provider.
-
#phone ⇒ Object
Office phone for the provider.
-
#presentation_name ⇒ Object
Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White).
-
#specialty ⇒ Object
Name of the primary Specialty.
-
#state ⇒ Object
State code for the provider’s address (e.g. NY).
-
#state_id ⇒ Object
Foreign key to States.
-
#street_line_1 ⇒ Object
First line of the provider’s street address.
-
#street_line_2 ⇒ Object
Second line of the provider’s street address.
-
#suffix ⇒ Object
Suffix for the provider’s name (e.g. Jr).
-
#title ⇒ Object
Professional title for the provider (e.g. Dr).
-
#type ⇒ Object
Type of NPI number (individual provider vs organization).
-
#zip_code ⇒ Object
Postal code for the provider’s address (e.g. 11215).
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Provider
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Provider
Initializes the object
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/vericred_client/models/provider.rb', line 264 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?(:'accepting_change_of_payor_patients') self.accepting_change_of_payor_patients = attributes[:'accepting_change_of_payor_patients'] end if attributes.has_key?(:'accepting_medicaid_patients') self.accepting_medicaid_patients = attributes[:'accepting_medicaid_patients'] end if attributes.has_key?(:'accepting_medicare_patients') self.accepting_medicare_patients = attributes[:'accepting_medicare_patients'] end if attributes.has_key?(:'accepting_private_patients') self.accepting_private_patients = attributes[:'accepting_private_patients'] end if attributes.has_key?(:'accepting_referral_patients') self.accepting_referral_patients = attributes[:'accepting_referral_patients'] end 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?(:'middle_name') self.middle_name = attributes[:'middle_name'] end if attributes.has_key?(:'personal_phone') self.personal_phone = attributes[:'personal_phone'] 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 end |
Instance Attribute Details
#accepting_change_of_payor_patients ⇒ Object
Is this provider accepting patients with a change of insurance?
131 132 133 |
# File 'lib/vericred_client/models/provider.rb', line 131 def accepting_change_of_payor_patients @accepting_change_of_payor_patients end |
#accepting_medicaid_patients ⇒ Object
Is this provider accepting new Medicaid patients?
134 135 136 |
# File 'lib/vericred_client/models/provider.rb', line 134 def accepting_medicaid_patients @accepting_medicaid_patients end |
#accepting_medicare_patients ⇒ Object
Is this provider accepting new Medicare patients?
137 138 139 |
# File 'lib/vericred_client/models/provider.rb', line 137 def accepting_medicare_patients @accepting_medicare_patients end |
#accepting_private_patients ⇒ Object
Is this provider accepting new patients with private insurance?
140 141 142 |
# File 'lib/vericred_client/models/provider.rb', line 140 def accepting_private_patients @accepting_private_patients end |
#accepting_referral_patients ⇒ Object
Is this provider accepting new patients via referrals?
143 144 145 |
# File 'lib/vericred_client/models/provider.rb', line 143 def accepting_referral_patients @accepting_referral_patients end |
#city ⇒ Object
City name (e.g. Springfield).
146 147 148 |
# File 'lib/vericred_client/models/provider.rb', line 146 def city @city end |
#email ⇒ Object
Primary email address to contact the provider.
149 150 151 |
# File 'lib/vericred_client/models/provider.rb', line 149 def email @email end |
#first_name ⇒ Object
Given name for the provider.
155 156 157 |
# File 'lib/vericred_client/models/provider.rb', line 155 def first_name @first_name end |
#gender ⇒ Object
Provider’s gender (M or F)
152 153 154 |
# File 'lib/vericred_client/models/provider.rb', line 152 def gender @gender end |
#id ⇒ Object
National Provider Index (NPI) number
158 159 160 |
# File 'lib/vericred_client/models/provider.rb', line 158 def id @id end |
#last_name ⇒ Object
Family name for the provider.
161 162 163 |
# File 'lib/vericred_client/models/provider.rb', line 161 def last_name @last_name end |
#middle_name ⇒ Object
Middle name for the provider.
164 165 166 |
# File 'lib/vericred_client/models/provider.rb', line 164 def middle_name @middle_name end |
#personal_phone ⇒ Object
Personal contact phone for the provider.
167 168 169 |
# File 'lib/vericred_client/models/provider.rb', line 167 def personal_phone @personal_phone end |
#phone ⇒ Object
Office phone for the provider
170 171 172 |
# File 'lib/vericred_client/models/provider.rb', line 170 def phone @phone end |
#presentation_name ⇒ Object
Preferred name for display (e.g. Dr. Francis White may prefer Dr. Frank White)
173 174 175 |
# File 'lib/vericred_client/models/provider.rb', line 173 def presentation_name @presentation_name end |
#specialty ⇒ Object
Name of the primary Specialty
176 177 178 |
# File 'lib/vericred_client/models/provider.rb', line 176 def specialty @specialty end |
#state ⇒ Object
State code for the provider’s address (e.g. NY).
179 180 181 |
# File 'lib/vericred_client/models/provider.rb', line 179 def state @state end |
#state_id ⇒ Object
Foreign key to States
182 183 184 |
# File 'lib/vericred_client/models/provider.rb', line 182 def state_id @state_id end |
#street_line_1 ⇒ Object
First line of the provider’s street address.
185 186 187 |
# File 'lib/vericred_client/models/provider.rb', line 185 def street_line_1 @street_line_1 end |
#street_line_2 ⇒ Object
Second line of the provider’s street address.
188 189 190 |
# File 'lib/vericred_client/models/provider.rb', line 188 def street_line_2 @street_line_2 end |
#suffix ⇒ Object
Suffix for the provider’s name (e.g. Jr)
191 192 193 |
# File 'lib/vericred_client/models/provider.rb', line 191 def suffix @suffix end |
#title ⇒ Object
Professional title for the provider (e.g. Dr).
194 195 196 |
# File 'lib/vericred_client/models/provider.rb', line 194 def title @title end |
#type ⇒ Object
Type of NPI number (individual provider vs organization).
197 198 199 |
# File 'lib/vericred_client/models/provider.rb', line 197 def type @type end |
#zip_code ⇒ Object
Postal code for the provider’s address (e.g. 11215)
200 201 202 |
# File 'lib/vericred_client/models/provider.rb', line 200 def zip_code @zip_code end |
Class Method Details
.attribute_map ⇒ Object
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 |
# File 'lib/vericred_client/models/provider.rb', line 203 def self.attribute_map { :'accepting_change_of_payor_patients' => :'accepting_change_of_payor_patients', :'accepting_medicaid_patients' => :'accepting_medicaid_patients', :'accepting_medicare_patients' => :'accepting_medicare_patients', :'accepting_private_patients' => :'accepting_private_patients', :'accepting_referral_patients' => :'accepting_referral_patients', :'city' => :'city', :'email' => :'email', :'gender' => :'gender', :'first_name' => :'first_name', :'id' => :'id', :'last_name' => :'last_name', :'middle_name' => :'middle_name', :'personal_phone' => :'personal_phone', :'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' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/vericred_client/models/provider.rb', line 233 def self.swagger_types { :'accepting_change_of_payor_patients' => :'BOOLEAN', :'accepting_medicaid_patients' => :'BOOLEAN', :'accepting_medicare_patients' => :'BOOLEAN', :'accepting_private_patients' => :'BOOLEAN', :'accepting_referral_patients' => :'BOOLEAN', :'city' => :'String', :'email' => :'String', :'gender' => :'String', :'first_name' => :'String', :'id' => :'Integer', :'last_name' => :'String', :'middle_name' => :'String', :'personal_phone' => :'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' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/vericred_client/models/provider.rb', line 382 def ==(o) return true if self.equal?(o) self.class == o.class && accepting_change_of_payor_patients == o.accepting_change_of_payor_patients && accepting_medicaid_patients == o.accepting_medicaid_patients && accepting_medicare_patients == o.accepting_medicare_patients && accepting_private_patients == o.accepting_private_patients && accepting_referral_patients == o.accepting_referral_patients && city == o.city && email == o.email && gender == o.gender && first_name == o.first_name && id == o.id && last_name == o.last_name && middle_name == o.middle_name && personal_phone == o.personal_phone && 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 end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/vericred_client/models/provider.rb', line 447 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 =~ /^(true|t|yes|y|1)$/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
513 514 515 516 517 518 519 520 521 522 523 524 525 |
# File 'lib/vericred_client/models/provider.rb', line 513 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
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/vericred_client/models/provider.rb', line 426 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/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
413 414 415 |
# File 'lib/vericred_client/models/provider.rb', line 413 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
419 420 421 |
# File 'lib/vericred_client/models/provider.rb', line 419 def hash [accepting_change_of_payor_patients, accepting_medicaid_patients, accepting_medicare_patients, accepting_private_patients, accepting_referral_patients, city, email, gender, first_name, id, last_name, middle_name, personal_phone, phone, presentation_name, specialty, state, state_id, street_line_1, street_line_2, suffix, title, type, zip_code].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
370 371 372 373 |
# File 'lib/vericred_client/models/provider.rb', line 370 def list_invalid_properties invalid_properties = Array.new return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
493 494 495 |
# File 'lib/vericred_client/models/provider.rb', line 493 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
499 500 501 502 503 504 505 506 507 |
# File 'lib/vericred_client/models/provider.rb', line 499 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_s ⇒ String
Returns the string representation of the object
487 488 489 |
# File 'lib/vericred_client/models/provider.rb', line 487 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
377 378 |
# File 'lib/vericred_client/models/provider.rb', line 377 def valid? end |