Class: CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup
- Inherits:
-
Object
- Object
- CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup
- Defined in:
- lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
- #payer_uuid ⇒ String readonly
- #plan_group_name ⇒ String readonly
- #plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode readonly
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup
Deserialize a JSON object to an instance of MutablePayerPlanGroup.
-
.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(plan_group_name:, payer_uuid:, plan_type:, additional_properties: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of MutablePayerPlanGroup to a JSON object.
Constructor Details
#initialize(plan_group_name:, payer_uuid:, plan_type:, additional_properties: nil) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup
31 32 33 34 35 36 37 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 31 def initialize(plan_group_name:, payer_uuid:, plan_type:, additional_properties: nil) @plan_group_name = plan_group_name @payer_uuid = payer_uuid @plan_type = plan_type @additional_properties = additional_properties @_field_set = { "plan_group_name": plan_group_name, "payer_uuid": payer_uuid, "plan_type": plan_type } end |
Instance Attribute Details
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
19 20 21 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 19 def additional_properties @additional_properties end |
#payer_uuid ⇒ String (readonly)
15 16 17 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 15 def payer_uuid @payer_uuid end |
#plan_group_name ⇒ String (readonly)
13 14 15 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 13 def plan_group_name @plan_group_name end |
#plan_type ⇒ CandidApiClient::Commons::Types::SourceOfPaymentCode (readonly)
17 18 19 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 17 def plan_type @plan_type end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::PayerPlanGroups::V1::Types::MutablePayerPlanGroup
Deserialize a JSON object to an instance of MutablePayerPlanGroup
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 43 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) plan_group_name = struct["plan_group_name"] payer_uuid = struct["payer_uuid"] plan_type = struct["plan_type"] new( plan_group_name: plan_group_name, payer_uuid: payer_uuid, plan_type: plan_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.
69 70 71 72 73 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 69 def self.validate_raw(obj:) obj.plan_group_name.is_a?(String) != false || raise("Passed value for field obj.plan_group_name is not the expected type, validation failed.") obj.payer_uuid.is_a?(String) != false || raise("Passed value for field obj.payer_uuid 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.") end |
Instance Method Details
#to_json(*_args) ⇒ String
Serialize an instance of MutablePayerPlanGroup to a JSON object
59 60 61 |
# File 'lib/candidhealth/payer_plan_groups/v_1/types/mutable_payer_plan_group.rb', line 59 def to_json(*_args) @_field_set&.to_json end |