class SynergyWholesale::Types::AuRegistrant

Public Class Methods

build(attributes) click to toggle source
# File lib/synergy_wholesale/types/au_registrant.rb, line 13
def self.build(attributes)
  new(
    {
      registrant_name:     attributes[:registrant_name],
      registrant_id:       attributes[:registrant_id],
      registrant_id_type:  { id_type: attributes[:registrant_id_type] },
      eligibility_type:    { organisation_type: attributes[:eligibility_type] },
      eligibility_name:    attributes[:eligibility_name],
      eligibility_id_type: { id_type: attributes[:eligibility_id_type] },
      eligibility_id:      attributes[:eligibility_id]
    }
  )
end

Public Instance Methods

to_param() click to toggle source
# File lib/synergy_wholesale/types/au_registrant.rb, line 27
def to_param
  {
    'registrantName'    => registrant_name,
    'registrantID'      => registrant_id,
    'registrantIDType'  => registrant_id_type.to_s,
    'eligibilityID'     => eligibility_id,
    'eligibilityIDType' => eligibility_id_type.to_s,
    'eligibilityName'   => eligibility_name,
    'eligibilityType'   => eligibility_type.to_s
  }
end