Class: CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase
- Inherits:
-
Object
- Object
- CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase
- Defined in:
- lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#group_number ⇒ String
readonly
Box 11 on the CMS-1500 claim form.
- #insurance_type ⇒ CandidApiClient::Commons::Types::InsuranceTypeCode readonly
- #payer_plan_group_id ⇒ String readonly
-
#plan_name ⇒ String
readonly
Box 11c on the CMS-1500 claim form.
- #plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase
Deserialize a JSON object to an instance of InsuranceCardBase.
-
.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(group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, payer_plan_group_id: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of InsuranceCardBase to a JSON object.
Constructor Details
#initialize(group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, payer_plan_group_id: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 38 def initialize(group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, payer_plan_group_id: OMIT, additional_properties: nil) @group_number = group_number if group_number != OMIT @plan_name = plan_name if plan_name != OMIT @plan_type = plan_type if plan_type != OMIT @insurance_type = insurance_type if insurance_type != OMIT @payer_plan_group_id = payer_plan_group_id if payer_plan_group_id != OMIT @additional_properties = additional_properties @_field_set = { "group_number": group_number, "plan_name": plan_name, "plan_type": plan_type, "insurance_type": insurance_type, "payer_plan_group_id": payer_plan_group_id }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
24 25 26 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 24 def additional_properties @additional_properties end |
#group_number ⇒ String (readonly)
Returns Box 11 on the CMS-1500 claim form.
14 15 16 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 14 def group_number @group_number end |
#insurance_type ⇒ CandidApiClient::Commons::Types::InsuranceTypeCode (readonly)
20 21 22 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 20 def insurance_type @insurance_type end |
#payer_plan_group_id ⇒ String (readonly)
22 23 24 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 22 def payer_plan_group_id @payer_plan_group_id end |
#plan_name ⇒ String (readonly)
Returns Box 11c on the CMS-1500 claim form.
16 17 18 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 16 def plan_name @plan_name end |
#plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode (readonly)
18 19 20 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 18 def plan_type @plan_type end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardBase
Deserialize a JSON object to an instance of InsuranceCardBase
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 61 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) group_number = struct["group_number"] plan_name = struct["plan_name"] plan_type = struct["plan_type"] insurance_type = struct["insurance_type"] payer_plan_group_id = struct["payer_plan_group_id"] new( group_number: group_number, plan_name: plan_name, plan_type: plan_type, insurance_type: insurance_type, payer_plan_group_id: payer_plan_group_id, 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.
91 92 93 94 95 96 97 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 91 def self.validate_raw(obj:) obj.group_number&.is_a?(String) != false || raise("Passed value for field obj.group_number is not the expected type, validation failed.") obj.plan_name&.is_a?(String) != false || raise("Passed value for field obj.plan_name is not the expected type, validation failed.") obj.plan_type&.is_a?(CandidApiClient::Commons::Types::SourceOfPaymentCode) != false || raise("Passed value for field obj.plan_type is not the expected type, validation failed.") obj.insurance_type&.is_a?(CandidApiClient::Commons::Types::InsuranceTypeCode) != false || raise("Passed value for field obj.insurance_type is not the expected type, validation failed.") obj.payer_plan_group_id&.is_a?(String) != false || raise("Passed value for field obj.payer_plan_group_id is not the expected type, validation failed.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of InsuranceCardBase to a JSON object
81 82 83 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_base.rb', line 81 def to_json(*_args) @_field_set&.to_json end |