Sha256: fc2039fc03190590a4e64b6999bd716db97c6e14ba144161ebafe486d032fbc0

Contents?: true

Size: 553 Bytes

Versions: 8

Compression:

Stored size: 553 Bytes

Contents

module RockRMS
  class Person
    def self.format(response)
      if response.is_a?(Array)
        response.map{|person| format_person(person) }
      else
        format_person(response)
      end
    end

    def self.format_person(person)
      {
        id:         person["Id"],
        name:       person["FullName"],
        email:      person["Email"],
        first_name: person["FirstName"],
        last_name:  person["LastName"],
        giving_id:  person["GivingId"],
        alias_id:   person["PrimaryAliasId"]
      }
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
rock_rms-0.0.8 lib/rock_rms/responses/person.rb
rock_rms-0.0.7 lib/rock_rms/responses/person.rb
rock_rms-0.0.6 lib/rock_rms/responses/person.rb
rock_rms-0.0.5 lib/rock_rms/responses/person.rb
rock_rms-0.0.4 lib/rock_rms/responses/person.rb
rock_rms-0.0.3 lib/rock_rms/responses/person.rb
rock_rms-0.0.2 lib/rock_rms/responses/person.rb
rock_rms-0.0.1 lib/rock_rms/responses/person.rb