Class: CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions
- Inherits:
-
Object
- Object
- CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions
- Defined in:
- lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb
Overview
A dimensions object where all properties are optional.
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #cpt_code ⇒ String readonly
- #facility_type_codes ⇒ Set<CandidApiClient::Commons::Types::FacilityTypeCode> readonly
- #license_types ⇒ Set<CandidApiClient::OrganizationProviders::V2::Types::LicenseType> readonly
- #modifiers ⇒ Set<CandidApiClient::Commons::Types::ProcedureModifier> readonly
- #network_types ⇒ Set<CandidApiClient::Commons::Types::NetworkType> readonly
- #organization_billing_provider_id ⇒ String readonly
- #payer_uuid ⇒ String readonly
- #states ⇒ Set<CandidApiClient::Commons::Types::State> readonly
- #zip_codes ⇒ Set<String> readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions
Deserialize a JSON object to an instance of OptionalDimensions.
-
.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(states:, zip_codes:, license_types:, facility_type_codes:, network_types:, modifiers:, payer_uuid: OMIT, organization_billing_provider_id: OMIT, cpt_code: OMIT, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of OptionalDimensions to a JSON object.
Constructor Details
#initialize(states:, zip_codes:, license_types:, facility_type_codes:, network_types:, modifiers:, payer_uuid: OMIT, organization_billing_provider_id: OMIT, cpt_code: OMIT, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 50 def initialize(states:, zip_codes:, license_types:, facility_type_codes:, network_types:, modifiers:, payer_uuid: OMIT, organization_billing_provider_id: OMIT, cpt_code: OMIT, additional_properties: nil) @payer_uuid = payer_uuid if payer_uuid != OMIT if organization_billing_provider_id != OMIT @organization_billing_provider_id = organization_billing_provider_id end @states = states @zip_codes = zip_codes @license_types = license_types @facility_type_codes = facility_type_codes @network_types = network_types @cpt_code = cpt_code if cpt_code != OMIT @modifiers = modifiers @additional_properties = additional_properties @_field_set = { "payer_uuid": payer_uuid, "organization_billing_provider_id": organization_billing_provider_id, "states": states, "zip_codes": zip_codes, "license_types": license_types, "facility_type_codes": facility_type_codes, "network_types": network_types, "cpt_code": cpt_code, "modifiers": modifiers }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
32 33 34 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 32 def additional_properties @additional_properties end |
#cpt_code ⇒ String (readonly)
28 29 30 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 28 def cpt_code @cpt_code end |
#facility_type_codes ⇒ Set<CandidApiClient::Commons::Types::FacilityTypeCode> (readonly)
24 25 26 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 24 def facility_type_codes @facility_type_codes end |
#license_types ⇒ Set<CandidApiClient::OrganizationProviders::V2::Types::LicenseType> (readonly)
22 23 24 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 22 def license_types @license_types end |
#modifiers ⇒ Set<CandidApiClient::Commons::Types::ProcedureModifier> (readonly)
30 31 32 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 30 def modifiers @modifiers end |
#network_types ⇒ Set<CandidApiClient::Commons::Types::NetworkType> (readonly)
26 27 28 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 26 def network_types @network_types end |
#organization_billing_provider_id ⇒ String (readonly)
16 17 18 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 16 def organization_billing_provider_id @organization_billing_provider_id end |
#payer_uuid ⇒ String (readonly)
14 15 16 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 14 def payer_uuid @payer_uuid end |
#states ⇒ Set<CandidApiClient::Commons::Types::State> (readonly)
18 19 20 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 18 def states @states end |
#zip_codes ⇒ Set<String> (readonly)
20 21 22 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 20 def zip_codes @zip_codes end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions
Deserialize a JSON object to an instance of OptionalDimensions
83 84 85 86 87 88 89 90 91 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 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 83 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) payer_uuid = struct["payer_uuid"] organization_billing_provider_id = struct["organization_billing_provider_id"] if parsed_json["states"].nil? states = nil else states = parsed_json["states"].to_json states = Set.new(states) end if parsed_json["zip_codes"].nil? zip_codes = nil else zip_codes = parsed_json["zip_codes"].to_json zip_codes = Set.new(zip_codes) end if parsed_json["license_types"].nil? license_types = nil else license_types = parsed_json["license_types"].to_json license_types = Set.new(license_types) end if parsed_json["facility_type_codes"].nil? facility_type_codes = nil else facility_type_codes = parsed_json["facility_type_codes"].to_json facility_type_codes = Set.new(facility_type_codes) end if parsed_json["network_types"].nil? network_types = nil else network_types = parsed_json["network_types"].to_json network_types = Set.new(network_types) end cpt_code = struct["cpt_code"] if parsed_json["modifiers"].nil? modifiers = nil else modifiers = parsed_json["modifiers"].to_json modifiers = Set.new(modifiers) end new( payer_uuid: payer_uuid, organization_billing_provider_id: organization_billing_provider_id, states: states, zip_codes: zip_codes, license_types: license_types, facility_type_codes: facility_type_codes, network_types: network_types, cpt_code: cpt_code, modifiers: modifiers, 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.
152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 152 def self.validate_raw(obj:) obj.payer_uuid&.is_a?(String) != false || raise("Passed value for field obj.payer_uuid is not the expected type, validation failed.") obj.organization_billing_provider_id&.is_a?(String) != false || raise("Passed value for field obj.organization_billing_provider_id is not the expected type, validation failed.") obj.states.is_a?(Set) != false || raise("Passed value for field obj.states is not the expected type, validation failed.") obj.zip_codes.is_a?(Set) != false || raise("Passed value for field obj.zip_codes is not the expected type, validation failed.") obj.license_types.is_a?(Set) != false || raise("Passed value for field obj.license_types is not the expected type, validation failed.") obj.facility_type_codes.is_a?(Set) != false || raise("Passed value for field obj.facility_type_codes is not the expected type, validation failed.") obj.network_types.is_a?(Set) != false || raise("Passed value for field obj.network_types is not the expected type, validation failed.") obj.cpt_code&.is_a?(String) != false || raise("Passed value for field obj.cpt_code is not the expected type, validation failed.") obj.modifiers.is_a?(Set) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of OptionalDimensions to a JSON object
142 143 144 |
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 142 def to_json(*_args) @_field_set&.to_json end |