class ChangeHealthcare::Eligibility::SwaggerClient::PlanDateInformation

Attributes

added[RW]
admission[RW]
benefit[RW]
benefit_begin[RW]
benefit_end[RW]
certification[RW]
cobra_begin[RW]
cobra_end[RW]
completion[RW]
coordination_of_benefits[RW]
date_of_death[RW]
date_of_last_update[RW]
discharge[RW]
effective_date_of_change[RW]
eligibility[RW]
eligibility_begin[RW]
eligibility_end[RW]
enrollment[RW]
issue[RW]
latest_visit_or_consultation[RW]
period_end[RW]
period_start[RW]
plan[RW]
plan_begin[RW]
plan_end[RW]
policy_effective[RW]
policy_expiration[RW]
premium_paid_to_date_begin[RW]
premium_paid_to_date_end[RW]
primary_care_provider[RW]
service[RW]
status[RW]

Public Class Methods

attribute_map() click to toggle source

Attribute mapping from ruby-style variable name to JSON key.

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 20
def self.attribute_map
  {
    'added': :added,
    'admission': :admission,
    'benefit': :benefit,
    'benefit_begin': :benefitBegin,
    'benefit_end': :benefitEnd,
    'certification': :certification,
    'cobra_begin': :cobraBegin,
    'cobra_end': :cobraEnd,
    'completion': :completion,
    'coordination_of_benefits': :coordinationOfBenefits,
    'date_of_death': :dateOfDeath,
    'date_of_last_update': :dateOfLastUpdate,
    'discharge': :discharge,
    'effective_date_of_change': :effectiveDateOfChange,
    'eligibility': :eligibility,
    'eligibility_begin': :eligibilityBegin,
    'eligibility_end': :eligibilityEnd,
    'enrollment': :enrollment,
    'issue': :issue,
    'latest_visit_or_consultation': :latestVisitOrConsultation,
    'period_end': :periodEnd,
    'period_start': :periodStart,
    'plan': :plan,
    'plan_begin': :planBegin,
    'plan_end': :planEnd,
    'policy_effective': :policyEffective,
    'policy_expiration': :policyExpiration,
    'premium_paid_to_date_begin': :premiumPaidToDateBegin,
    'premium_paid_to_date_end': :premiumPaidToDateEnd,
    'primary_care_provider': :primaryCareProvider,
    'service': :service,
    'status': :status
  }
end
new(attributes = {}) click to toggle source

Initializes the object @param [Hash] attributes Model attributes in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 97
def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.transform_keys(&:to_sym)

  self.added = attributes[:added] if attributes.key?(:added)

  self.admission = attributes[:admission] if attributes.key?(:admission)

  self.benefit = attributes[:benefit] if attributes.key?(:benefit)

  self.benefit_begin = attributes[:benefitBegin] if attributes.key?(:benefitBegin)

  self.benefit_end = attributes[:benefitEnd] if attributes.key?(:benefitEnd)

  self.certification = attributes[:certification] if attributes.key?(:certification)

  self.cobra_begin = attributes[:cobraBegin] if attributes.key?(:cobraBegin)

  self.cobra_end = attributes[:cobraEnd] if attributes.key?(:cobraEnd)

  self.completion = attributes[:completion] if attributes.key?(:completion)

  self.coordination_of_benefits = attributes[:coordinationOfBenefits] if attributes.key?(:coordinationOfBenefits)

  self.date_of_death = attributes[:dateOfDeath] if attributes.key?(:dateOfDeath)

  self.date_of_last_update = attributes[:dateOfLastUpdate] if attributes.key?(:dateOfLastUpdate)

  self.discharge = attributes[:discharge] if attributes.key?(:discharge)

  self.effective_date_of_change = attributes[:effectiveDateOfChange] if attributes.key?(:effectiveDateOfChange)

  self.eligibility = attributes[:eligibility] if attributes.key?(:eligibility)

  self.eligibility_begin = attributes[:eligibilityBegin] if attributes.key?(:eligibilityBegin)

  self.eligibility_end = attributes[:eligibilityEnd] if attributes.key?(:eligibilityEnd)

  self.enrollment = attributes[:enrollment] if attributes.key?(:enrollment)

  self.issue = attributes[:issue] if attributes.key?(:issue)

  self.latest_visit_or_consultation = attributes[:latestVisitOrConsultation] if attributes.key?(:latestVisitOrConsultation)

  self.period_end = attributes[:periodEnd] if attributes.key?(:periodEnd)

  self.period_start = attributes[:periodStart] if attributes.key?(:periodStart)

  self.plan = attributes[:plan] if attributes.key?(:plan)

  self.plan_begin = attributes[:planBegin] if attributes.key?(:planBegin)

  self.plan_end = attributes[:planEnd] if attributes.key?(:planEnd)

  self.policy_effective = attributes[:policyEffective] if attributes.key?(:policyEffective)

  self.policy_expiration = attributes[:policyExpiration] if attributes.key?(:policyExpiration)

  self.premium_paid_to_date_begin = attributes[:premiumPaidToDateBegin] if attributes.key?(:premiumPaidToDateBegin)

  self.premium_paid_to_date_end = attributes[:premiumPaidToDateEnd] if attributes.key?(:premiumPaidToDateEnd)

  self.primary_care_provider = attributes[:primaryCareProvider] if attributes.key?(:primaryCareProvider)

  self.service = attributes[:service] if attributes.key?(:service)

  self.status = attributes[:status] if attributes.key?(:status)
end
swagger_types() click to toggle source

Attribute type mapping.

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 58
def self.swagger_types
  {
    'added': :String,
    'admission': :String,
    'benefit': :String,
    'benefit_begin': :String,
    'benefit_end': :String,
    'certification': :String,
    'cobra_begin': :String,
    'cobra_end': :String,
    'completion': :String,
    'coordination_of_benefits': :String,
    'date_of_death': :String,
    'date_of_last_update': :String,
    'discharge': :String,
    'effective_date_of_change': :String,
    'eligibility': :String,
    'eligibility_begin': :String,
    'eligibility_end': :String,
    'enrollment': :String,
    'issue': :String,
    'latest_visit_or_consultation': :String,
    'period_end': :String,
    'period_start': :String,
    'plan': :String,
    'plan_begin': :String,
    'plan_end': :String,
    'policy_effective': :String,
    'policy_expiration': :String,
    'premium_paid_to_date_begin': :String,
    'premium_paid_to_date_end': :String,
    'primary_care_provider': :String,
    'service': :String,
    'status': :String
  }
end

Public Instance Methods

==(o) click to toggle source

Checks equality by comparing each attribute. @param [Object] Object to be compared

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 182
def ==(o)
  return true if equal?(o)

  self.class == o.class &&
    added == o.added &&
    admission == o.admission &&
    benefit == o.benefit &&
    benefit_begin == o.benefit_begin &&
    benefit_end == o.benefit_end &&
    certification == o.certification &&
    cobra_begin == o.cobra_begin &&
    cobra_end == o.cobra_end &&
    completion == o.completion &&
    coordination_of_benefits == o.coordination_of_benefits &&
    date_of_death == o.date_of_death &&
    date_of_last_update == o.date_of_last_update &&
    discharge == o.discharge &&
    effective_date_of_change == o.effective_date_of_change &&
    eligibility == o.eligibility &&
    eligibility_begin == o.eligibility_begin &&
    eligibility_end == o.eligibility_end &&
    enrollment == o.enrollment &&
    issue == o.issue &&
    latest_visit_or_consultation == o.latest_visit_or_consultation &&
    period_end == o.period_end &&
    period_start == o.period_start &&
    plan == o.plan &&
    plan_begin == o.plan_begin &&
    plan_end == o.plan_end &&
    policy_effective == o.policy_effective &&
    policy_expiration == o.policy_expiration &&
    premium_paid_to_date_begin == o.premium_paid_to_date_begin &&
    premium_paid_to_date_end == o.premium_paid_to_date_end &&
    primary_care_provider == o.primary_care_provider &&
    service == o.service &&
    status == o.status
end
_deserialize(type, value) click to toggle source

Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 257
def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = SwaggerClient.const_get(type).new
    temp_model.build_from_hash(value)
  end
end
_to_hash(value) click to toggle source

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 324
def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end
build_from_hash(attributes) click to toggle source

Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 235
def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize(Regexp.last_match(1), v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end
eql?(o) click to toggle source

@see the `==` method @param [Object] Object to be compared

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 222
def eql?(o)
  self == o
end
hash() click to toggle source

Calculates hash code according to all attributes. @return [Fixnum] Hash code

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 228
def hash
  [added, admission, benefit, benefit_begin, benefit_end, certification, cobra_begin, cobra_end, completion, coordination_of_benefits, date_of_death, date_of_last_update, discharge, effective_date_of_change, eligibility, eligibility_begin, eligibility_end, enrollment, issue, latest_visit_or_consultation, period_end, period_start, plan, plan_begin, plan_end, policy_effective, policy_expiration, premium_paid_to_date_begin, premium_paid_to_date_end, primary_care_provider, service, status].hash
end
list_invalid_properties() click to toggle source

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 170
def list_invalid_properties
  []
end
to_body() click to toggle source

to_body is an alias to to_hash (backward compatibility) @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 303
def to_body
  to_hash
end
to_hash() click to toggle source

Returns the object in the form of hash @return [Hash] Returns the object in the form of hash

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 309
def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = send(attr)
    next if value.nil?

    hash[param] = _to_hash(value)
  end
  hash
end
to_s() click to toggle source

Returns the string representation of the object @return [String] String presentation of the object

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 297
def to_s
  to_hash.to_s
end
valid?() click to toggle source

Check to see if the all the properties in the model are valid @return true if the model is valid

# File lib/change_healthcare/eligibility/swagger_client/models/plan_date_information.rb, line 176
def valid?
  true
end