Class: Spaceship::ConnectAPI::BetaTester

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/beta_tester.rb

Instance Attribute Summary collapse

Attributes included from Model

#id

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

#attr_mapping, included, #initialize, #to_json, #update_attributes

Instance Attribute Details

#appsObject

Returns the value of attribute apps


13
14
15
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 13

def apps
  @apps
end

#beta_groupsObject

Returns the value of attribute beta_groups


14
15
16
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 14

def beta_groups
  @beta_groups
end

#beta_tester_metricsObject

Returns the value of attribute beta_tester_metrics


15
16
17
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 15

def beta_tester_metrics
  @beta_tester_metrics
end

#emailObject

Returns the value of attribute email


9
10
11
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 9

def email
  @email
end

#first_nameObject

Returns the value of attribute first_name


7
8
9
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 7

def first_name
  @first_name
end

#invitationObject

Returns the value of attribute invitation


11
12
13
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 11

def invitation
  @invitation
end

#invite_typeObject

Returns the value of attribute invite_type


10
11
12
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 10

def invite_type
  @invite_type
end

#last_nameObject

Returns the value of attribute last_name


8
9
10
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 8

def last_name
  @last_name
end

Class Method Details

.all(filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object

API


37
38
39
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 37

def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
  return Spaceship::ConnectAPI.get_beta_testers(filter: filter, includes: includes)
end

.find(email: nil, includes: nil) ⇒ Object


41
42
43
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 41

def self.find(email: nil, includes: nil)
  return all(filter: { email: email }, includes: includes).first
end

.typeObject


29
30
31
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 29

def self.type
  return "betaTesters"
end

Instance Method Details

#delete_from_apps(apps: nil) ⇒ Object


45
46
47
48
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 45

def delete_from_apps(apps: nil)
  app_ids = apps.map(&:id)
  return Spaceship::ConnectAPI.delete_beta_tester_from_apps(beta_tester_id: id, app_ids: app_ids)
end

#delete_from_beta_groups(beta_groups: nil) ⇒ Object


50
51
52
53
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 50

def delete_from_beta_groups(beta_groups: nil)
  beta_group_ids = beta_groups.map(&:id)
  return Spaceship::ConnectAPI.delete_beta_tester_from_beta_groups(beta_tester_id: id, beta_group_ids: beta_group_ids)
end