Sha256: b0ac54ebcc73bff734aa6dd480dee0b93c6b8a3ba5cedad266bba304e311060c

Contents?: true

Size: 976 Bytes

Versions: 2

Compression:

Stored size: 976 Bytes

Contents

require_relative 'member'

module Spaceship
  module Tunes
    class Members < TunesBase
      class << self
        def all
          response = client.members
          return_members = []
          response.each  do |member|
            return_members << Tunes::Member.factory(member)
          end
          return_members
        end

        def find(email)
          all.each do |member|
            if member.email_address == email
              return member
            end
          end
          return nil
        end

        def create!(firstname: nil, lastname: nil, email_address: nil, roles: [], apps: [])
          client.create_member!(firstname: firstname, lastname: lastname, email_address: email_address, roles: roles, apps: apps)
        end

        def update_member_roles!(member, roles: [], apps: [])
          client.update_member_roles!(member, roles: roles, apps: apps)
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 spaceship/lib/spaceship/tunes/members.rb
fastlane_hotfix-2.165.0 spaceship/lib/spaceship/tunes/members.rb