Class: CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions

Inherits:
Object
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(states:, zip_codes:, license_types:, facility_type_codes:, network_types:, payer_plan_group_ids:, modifiers:, payer_uuid: OMIT, organization_billing_provider_id: OMIT, cpt_code: OMIT, additional_properties: nil) ⇒ CandidApiClient::FeeSchedules::V3::Types::OptionalDimensions

Parameters:



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
78
79
80
81
82
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 53

def initialize(states:, zip_codes:, license_types:, facility_type_codes:, network_types:,
               payer_plan_group_ids:, 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
  @payer_plan_group_ids = payer_plan_group_ids
  @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,
    "payer_plan_group_ids": payer_plan_group_ids,
    "cpt_code": cpt_code,
    "modifiers": modifiers
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



34
35
36
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 34

def additional_properties
  @additional_properties
end

#cpt_codeString (readonly)

Returns:

  • (String)


30
31
32
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 30

def cpt_code
  @cpt_code
end

#facility_type_codesSet<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_typesSet<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

#modifiersSet<CandidApiClient::Commons::Types::ProcedureModifier> (readonly)



32
33
34
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 32

def modifiers
  @modifiers
end

#network_typesSet<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_idString (readonly)

Returns:

  • (String)


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_plan_group_idsSet<String> (readonly)

Returns:

  • (Set<String>)


28
29
30
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 28

def payer_plan_group_ids
  @payer_plan_group_ids
end

#payer_uuidString (readonly)

Returns:

  • (String)


14
15
16
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 14

def payer_uuid
  @payer_uuid
end

#statesSet<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_codesSet<String> (readonly)

Returns:

  • (Set<String>)


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

Parameters:

  • json_object (String)

Returns:



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
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 88

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
  if parsed_json["payer_plan_group_ids"].nil?
    payer_plan_group_ids = nil
  else
    payer_plan_group_ids = parsed_json["payer_plan_group_ids"].to_json
    payer_plan_group_ids = Set.new(payer_plan_group_ids)
  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,
    payer_plan_group_ids: payer_plan_group_ids,
    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.

Parameters:

  • obj (Object)

Returns:

  • (Void)


164
165
166
167
168
169
170
171
172
173
174
175
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 164

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.payer_plan_group_ids.is_a?(Set) != false || raise("Passed value for field obj.payer_plan_group_ids 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

Returns:

  • (String)


154
155
156
# File 'lib/candidhealth/fee_schedules/v_3/types/optional_dimensions.rb', line 154

def to_json(*_args)
  @_field_set&.to_json
end