class Nursys::License

Constants

ATTRIBUTES

Public Class Methods

find(transaction_id) click to toggle source
# File lib/nursys/license.rb, line 31
def find transaction_id
  response = Nursys::RetrieveNurseLookup.request(transaction_id)
  response[:nurse_lookup_response][:nurse_license_responses][:nurse_license_response][:success_flag] ?
      response[:nurse_lookup_response][:nurse_license_responses][:nurse_license_response][:nurse_licenses][:nurse_license] :
      response[:nurse_lookup_response][:nurse_license_responses][:nurse_license_response][:success_flag]
end
new(attributes={}) click to toggle source
# File lib/nursys/license.rb, line 13
def initialize attributes={}
  attributes.each { |k, v| self.send("#{k}=", v) }
end

Public Instance Methods

save() click to toggle source
# File lib/nursys/license.rb, line 17
def save
  response = Nursys::SubmitNurseLookup.request(self.to_hash)
  response[:submit_nurse_lookup_response][:transaction][:transaction_success_flag] ? response[:submit_nurse_lookup_response][:transaction][:transaction_id] : response[:submit_nurse_lookup_response][:transaction][:transaction_success_flag]
end
to_hash() click to toggle source
# File lib/nursys/license.rb, line 22
def to_hash
  hash = Hash.new
  ATTRIBUTES.each do |attr|
    hash[attr.to_s.keyify] = self.send(attr)
  end
  hash
end