Class: CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate
- Inherits:
-
Object
- Object
- CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate
- Defined in:
- lib/candidhealth/service_facility/types/encounter_service_facility_update.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#address ⇒ CandidApiClient::Commons::Types::StreetAddressLongZip
readonly
Zip_plus_four_code is required for service facility address.
-
#npi ⇒ String
readonly
An NPI specific to the service facility if applicable, i.e.
- #organization_name ⇒ String readonly
-
#secondary_identification ⇒ String
readonly
An additional identifier for the service facility other than the facility’s NPI.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate
Deserialize a JSON object to an instance of EncounterServiceFacilityUpdate.
-
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
Instance Method Summary collapse
- #initialize(organization_name: OMIT, npi: OMIT, address: OMIT, secondary_identification: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of EncounterServiceFacilityUpdate to a JSON object.
Constructor Details
#initialize(organization_name: OMIT, npi: OMIT, address: OMIT, secondary_identification: OMIT, additional_properties: nil) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 47 def initialize(organization_name: OMIT, npi: OMIT, address: OMIT, secondary_identification: OMIT, additional_properties: nil) @organization_name = organization_name if organization_name != OMIT @npi = npi if npi != OMIT @address = address if address != OMIT @secondary_identification = secondary_identification if secondary_identification != OMIT @additional_properties = additional_properties @_field_set = { "organization_name": organization_name, "npi": npi, "address": address, "secondary_identification": secondary_identification }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
27 28 29 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 27 def additional_properties @additional_properties end |
#address ⇒ CandidApiClient::Commons::Types::StreetAddressLongZip (readonly)
19 20 21 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 19 def address @address end |
#npi ⇒ String (readonly)
16 17 18 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 16 def npi @npi end |
#organization_name ⇒ String (readonly)
12 13 14 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 12 def organization_name @organization_name end |
#secondary_identification ⇒ String (readonly)
25 26 27 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 25 def secondary_identification @secondary_identification end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdate
Deserialize a JSON object to an instance of EncounterServiceFacilityUpdate
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 68 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) organization_name = struct["organization_name"] npi = struct["npi"] if parsed_json["address"].nil? address = nil else address = parsed_json["address"].to_json address = CandidApiClient::Commons::Types::StreetAddressLongZip.from_json(json_object: address) end secondary_identification = struct["secondary_identification"] new( organization_name: organization_name, npi: npi, address: address, secondary_identification: secondary_identification, additional_properties: struct ) end |
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given
hash and check each fields type against the current object's property
definitions.
102 103 104 105 106 107 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 102 def self.validate_raw(obj:) obj.organization_name&.is_a?(String) != false || raise("Passed value for field obj.organization_name is not the expected type, validation failed.") obj.npi&.is_a?(String) != false || raise("Passed value for field obj.npi is not the expected type, validation failed.") obj.address.nil? || CandidApiClient::Commons::Types::StreetAddressLongZip.validate_raw(obj: obj.address) obj.secondary_identification&.is_a?(String) != false || raise("Passed value for field obj.secondary_identification is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of EncounterServiceFacilityUpdate to a JSON object
92 93 94 |
# File 'lib/candidhealth/service_facility/types/encounter_service_facility_update.rb', line 92 def to_json(*_args) @_field_set&.to_json end |