Class: CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate
- Inherits:
-
Object
- Object
- CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate
- Defined in:
- lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #emr_payer_crosswalk ⇒ CandidApiClient::Commons::Types::EmrPayerCrosswalk readonly
-
#group_number ⇒ String
readonly
Box 11 on the CMS-1500 claim form.
- #image_url_back ⇒ String readonly
- #image_url_front ⇒ String readonly
- #insurance_type ⇒ CandidApiClient::Commons::Types::InsuranceTypeCode readonly
- #member_id ⇒ String readonly
- #payer_id ⇒ String readonly
- #payer_name ⇒ String readonly
-
#plan_name ⇒ String
readonly
Box 11c on the CMS-1500 claim form.
- #plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode readonly
- #rx_bin ⇒ String readonly
- #rx_pcn ⇒ String readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate
Deserialize a JSON object to an instance of InsuranceCardCreate.
-
.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(member_id:, payer_name:, payer_id:, rx_bin: OMIT, rx_pcn: OMIT, image_url_front: OMIT, image_url_back: OMIT, emr_payer_crosswalk: OMIT, group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of InsuranceCardCreate to a JSON object.
Constructor Details
#initialize(member_id:, payer_name:, payer_id:, rx_bin: OMIT, rx_pcn: OMIT, image_url_front: OMIT, image_url_back: OMIT, emr_payer_crosswalk: OMIT, group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, additional_properties: nil) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 60 def initialize(member_id:, payer_name:, payer_id:, rx_bin: OMIT, rx_pcn: OMIT, image_url_front: OMIT, image_url_back: OMIT, emr_payer_crosswalk: OMIT, group_number: OMIT, plan_name: OMIT, plan_type: OMIT, insurance_type: OMIT, additional_properties: nil) @member_id = member_id @payer_name = payer_name @payer_id = payer_id @rx_bin = rx_bin if rx_bin != OMIT @rx_pcn = rx_pcn if rx_pcn != OMIT @image_url_front = image_url_front if image_url_front != OMIT @image_url_back = image_url_back if image_url_back != OMIT @emr_payer_crosswalk = emr_payer_crosswalk if emr_payer_crosswalk != OMIT @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 @additional_properties = additional_properties @_field_set = { "member_id": member_id, "payer_name": payer_name, "payer_id": payer_id, "rx_bin": rx_bin, "rx_pcn": rx_pcn, "image_url_front": image_url_front, "image_url_back": image_url_back, "emr_payer_crosswalk": emr_payer_crosswalk, "group_number": group_number, "plan_name": plan_name, "plan_type": plan_type, "insurance_type": insurance_type }.reject do |_k, v| v == OMIT end end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
39 40 41 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 39 def additional_properties @additional_properties end |
#emr_payer_crosswalk ⇒ CandidApiClient::Commons::Types::EmrPayerCrosswalk (readonly)
29 30 31 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 29 def emr_payer_crosswalk @emr_payer_crosswalk end |
#group_number ⇒ String (readonly)
Returns Box 11 on the CMS-1500 claim form.
31 32 33 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 31 def group_number @group_number end |
#image_url_back ⇒ String (readonly)
27 28 29 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 27 def image_url_back @image_url_back end |
#image_url_front ⇒ String (readonly)
25 26 27 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 25 def image_url_front @image_url_front end |
#insurance_type ⇒ CandidApiClient::Commons::Types::InsuranceTypeCode (readonly)
37 38 39 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 37 def insurance_type @insurance_type end |
#member_id ⇒ String (readonly)
15 16 17 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 15 def member_id @member_id end |
#payer_id ⇒ String (readonly)
19 20 21 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 19 def payer_id @payer_id end |
#payer_name ⇒ String (readonly)
17 18 19 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 17 def payer_name @payer_name end |
#plan_name ⇒ String (readonly)
Returns Box 11c on the CMS-1500 claim form.
33 34 35 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 33 def plan_name @plan_name end |
#plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode (readonly)
35 36 37 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 35 def plan_type @plan_type end |
#rx_bin ⇒ String (readonly)
21 22 23 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 21 def rx_bin @rx_bin end |
#rx_pcn ⇒ String (readonly)
23 24 25 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 23 def rx_pcn @rx_pcn end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::InsuranceCards::V2::Types::InsuranceCardCreate
Deserialize a JSON object to an instance of InsuranceCardCreate
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 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 97 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) member_id = struct["member_id"] payer_name = struct["payer_name"] payer_id = struct["payer_id"] rx_bin = struct["rx_bin"] rx_pcn = struct["rx_pcn"] image_url_front = struct["image_url_front"] image_url_back = struct["image_url_back"] emr_payer_crosswalk = struct["emr_payer_crosswalk"] group_number = struct["group_number"] plan_name = struct["plan_name"] plan_type = struct["plan_type"] insurance_type = struct["insurance_type"] new( member_id: member_id, payer_name: payer_name, payer_id: payer_id, rx_bin: rx_bin, rx_pcn: rx_pcn, image_url_front: image_url_front, image_url_back: image_url_back, emr_payer_crosswalk: emr_payer_crosswalk, group_number: group_number, plan_name: plan_name, plan_type: plan_type, insurance_type: insurance_type, 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.
141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 141 def self.validate_raw(obj:) obj.member_id.is_a?(String) != false || raise("Passed value for field obj.member_id is not the expected type, validation failed.") obj.payer_name.is_a?(String) != false || raise("Passed value for field obj.payer_name is not the expected type, validation failed.") obj.payer_id.is_a?(String) != false || raise("Passed value for field obj.payer_id is not the expected type, validation failed.") obj.rx_bin&.is_a?(String) != false || raise("Passed value for field obj.rx_bin is not the expected type, validation failed.") obj.rx_pcn&.is_a?(String) != false || raise("Passed value for field obj.rx_pcn is not the expected type, validation failed.") obj.image_url_front&.is_a?(String) != false || raise("Passed value for field obj.image_url_front is not the expected type, validation failed.") obj.image_url_back&.is_a?(String) != false || raise("Passed value for field obj.image_url_back is not the expected type, validation failed.") obj.emr_payer_crosswalk&.is_a?(CandidApiClient::Commons::Types::EmrPayerCrosswalk) != false || raise("Passed value for field obj.emr_payer_crosswalk is not the expected type, validation failed.") 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.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of InsuranceCardCreate to a JSON object
131 132 133 |
# File 'lib/candidhealth/insurance_cards/v_2/types/insurance_card_create.rb', line 131 def to_json(*_args) @_field_set&.to_json end |