Sha256: bf16581edcbdd3fa5f0b831978698ee8167fe5c447e188ebc9430dd15de7fcd5

Contents?: true

Size: 1.06 KB

Versions: 22

Compression:

Stored size: 1.06 KB

Contents

module Spaceship::TestFlight
  class Tester < Base
    # @return (String) The identifier of this tester, provided by iTunes Connect
    # @example
    #   "60f858b4-60a8-428a-963a-f943a3d68d17"
    attr_accessor :tester_id

    # @return (String) The email of this tester
    # @example
    #   "tester@spaceship.com"
    attr_accessor :email

    attr_mapping(
      'id' => :tester_id,
      'email' => :email
    )

    # @return (Array) Returns all beta testers available for this account
    def self.all(app_id: nil)
      client.testers_for_app(app_id: app_id).map { |data| self.new(data) }
    end

    # @return (Spaceship::TestFlight::Tester) Returns the tester matching the parameter
    #   as either the Tester id or email
    # @param email (String) (required): Value used to filter the tester, case insensitive
    def self.find(app_id: nil, email: nil)
      self.all(app_id: app_id).find { |tester| tester.email == email }
    end

    def remove_from_app!(app_id: nil)
      client.delete_tester_from_app(app_id: app_id, tester_id: self.tester_id)
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
fastlane-2.29.0 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170509010055 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170508010014 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170507010054 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170506010047 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.28.9 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170505010029 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170504010033 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.28.8 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170503010035 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170502010055 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170501010050 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170430010051 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.28.7 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170429010036 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.28.6 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170428010037 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170427010043 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.28.5 spaceship/lib/spaceship/test_flight/tester.rb
fastlane-2.29.0.beta.20170426010043 spaceship/lib/spaceship/test_flight/tester.rb