Class: Spaceship::ConnectAPI::BetaTester
- Inherits:
-
Object
- Object
- Spaceship::ConnectAPI::BetaTester
- Includes:
- Model
- Defined in:
- spaceship/lib/spaceship/connect_api/models/beta_tester.rb
Instance Attribute Summary collapse
-
#apps ⇒ Object
Returns the value of attribute apps.
-
#beta_groups ⇒ Object
Returns the value of attribute beta_groups.
-
#beta_tester_metrics ⇒ Object
Returns the value of attribute beta_tester_metrics.
-
#builds ⇒ Object
Returns the value of attribute builds.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#invitation ⇒ Object
Returns the value of attribute invitation.
-
#invite_type ⇒ Object
Returns the value of attribute invite_type.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
Attributes included from Model
Class Method Summary collapse
-
.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
API.
- .find(client: nil, email: nil, includes: nil) ⇒ Object
- .type ⇒ Object
Instance Method Summary collapse
- #delete_from_apps(client: nil, apps: nil) ⇒ Object
- #delete_from_beta_groups(client: nil, beta_groups: nil) ⇒ Object
Methods included from Model
#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes
Instance Attribute Details
#apps ⇒ Object
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_groups ⇒ Object
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_metrics ⇒ Object
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 |
#builds ⇒ Object
Returns the value of attribute builds.
16 17 18 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 16 def builds @builds end |
#email ⇒ Object
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_name ⇒ Object
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 |
#invitation ⇒ Object
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_type ⇒ Object
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_name ⇒ Object
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(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
API
39 40 41 42 43 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 39 def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) client ||= Spaceship::ConnectAPI resps = client.get_beta_testers(filter: filter, includes: includes).all_pages return resps.flat_map(&:to_models) end |
.find(client: nil, email: nil, includes: nil) ⇒ Object
45 46 47 48 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 45 def self.find(client: nil, email: nil, includes: nil) client ||= Spaceship::ConnectAPI return all(client: client, filter: { email: email }, includes: includes).first end |
.type ⇒ Object
31 32 33 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 31 def self.type return "betaTesters" end |
Instance Method Details
#delete_from_apps(client: nil, apps: nil) ⇒ Object
50 51 52 53 54 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 50 def delete_from_apps(client: nil, apps: nil) client ||= Spaceship::ConnectAPI app_ids = apps.map(&:id) return client.delete_beta_tester_from_apps(beta_tester_id: id, app_ids: app_ids) end |
#delete_from_beta_groups(client: nil, beta_groups: nil) ⇒ Object
56 57 58 59 60 |
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 56 def delete_from_beta_groups(client: nil, beta_groups: nil) client ||= Spaceship::ConnectAPI beta_group_ids = beta_groups.map(&:id) return client.delete_beta_tester_from_beta_groups(beta_tester_id: id, beta_group_ids: beta_group_ids) end |