class Spaceship::TestFlight::Tester

Attributes

email[RW]

@return (String) The email of this tester @example

"tester@spaceship.com"
first_name[RW]

@return (String) The first name of this tester @example

"Cary"
groups[RW]
last_name[RW]

@return (String) The last name of this tester @example

"Bennett"
latest_install_info[RW]

@return (Hash) @example {

"latestInstalledAppAdamId": "1222374686",
"latestInstalledBuildId": "20739770",
"latestInstalledDate": "1496866405755",
"latestInstalledShortVersion": "1.0",
"latestInstalledVersion": "68"

}

latest_installed_date[RW]
session_count[RW]

@return (Integer) Number of sessions

status[RW]

@return (String) @example

"invited"
"installed"
status_mod_time[RW]

@return (Integer) Date of the last modification of the status (e.g. invite sent)

tester_id[RW]

@return (String) The identifier of this tester, provided by App Store Connect @example

"60f858b4-60a8-428a-963a-f943a3d68d17"

Public Class Methods

all(app_id: nil) click to toggle source

@return (Array) Returns all beta testers available for this account

# File spaceship/lib/spaceship/test_flight/tester.rb, line 81
def self.all(app_id: nil)
  client.testers_for_app(app_id: app_id).map { |data| self.new(data) }
end
create_app_level_tester(app_id: nil, first_name: nil, last_name: nil, email: nil) click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 116
def self.create_app_level_tester(app_id: nil, first_name: nil, last_name: nil, email: nil)
  client.create_app_level_tester(app_id: app_id,
                                 first_name: first_name,
                                 last_name: last_name,
                                 email: email)
end
find(app_id: nil, email: nil) click to toggle source

*DEPRECATED: Use `Spaceship::TestFlight::Tester.search` method instead*

# File spaceship/lib/spaceship/test_flight/tester.rb, line 86
def self.find(app_id: nil, email: nil)
  testers = self.search(app_id: app_id, text: email, is_email_exact_match: true)
  return testers.first
end
remove_testers_from_testflight(app_id: nil, tester_ids: nil) click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 112
def self.remove_testers_from_testflight(app_id: nil, tester_ids: nil)
  client.remove_testers_from_testflight(app_id: app_id, tester_ids: tester_ids)
end

Public Instance Methods

pretty_install_date() click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 74
def pretty_install_date
  return nil unless latest_installed_date

  Time.at((latest_installed_date / 1000)).strftime("%Y-%m-%d %H:%M")
end
remove_from_app!(app_id: nil) click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 123
def remove_from_app!(app_id: nil)
  client.delete_tester_from_app(app_id: app_id, tester_id: self.tester_id)
end
remove_from_testflight!(app_id: nil) click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 127
def remove_from_testflight!(app_id: nil)
  client.remove_testers_from_testflight(app_id: app_id, tester_ids: [self.tester_id])
end
resend_invite(app_id: nil) click to toggle source
# File spaceship/lib/spaceship/test_flight/tester.rb, line 131
def resend_invite(app_id: nil)
  client.resend_invite_to_external_tester(app_id: app_id, tester_id: self.tester_id)
end