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, #reverse_attr_map

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

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

Instance Attribute Details

#appsObject

Returns the value of attribute apps.



27
28
29
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 27

def apps
  @apps
end

#beta_groupsObject

Returns the value of attribute beta_groups.



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

def beta_groups
  @beta_groups
end

#beta_tester_metricsObject

Returns the value of attribute beta_tester_metrics.



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

def beta_tester_metrics
  @beta_tester_metrics
end

#beta_tester_stateObject

Returns the value of attribute beta_tester_state.



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

def beta_tester_state
  @beta_tester_state
end

#buildsObject

Returns the value of attribute builds.



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

def builds
  @builds
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

#installed_cf_bundle_short_version_stringObject

Returns the value of attribute installed_cf_bundle_short_version_string.



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

def installed_cf_bundle_short_version_string
  @installed_cf_bundle_short_version_string
end

#installed_cf_bundle_versionObject

Returns the value of attribute installed_cf_bundle_version.



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

def installed_cf_bundle_version
  @installed_cf_bundle_version
end

#installed_deviceObject

Returns the value of attribute installed_device.



17
18
19
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 17

def installed_device
  @installed_device
end

#installed_device_platformObject

Returns the value of attribute installed_device_platform.



22
23
24
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 22

def installed_device_platform
  @installed_device_platform
end

#installed_os_versionObject

Returns the value of attribute installed_os_version.



18
19
20
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 18

def installed_os_version
  @installed_os_version
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

#is_deletedObject

Returns the value of attribute is_deleted.



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

def is_deleted
  @is_deleted
end

#last_modified_dateObject

Returns the value of attribute last_modified_date.



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

def last_modified_date
  @last_modified_date
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

#latest_expiring_cf_bundle_short_version_stringObject

Returns the value of attribute latest_expiring_cf_bundle_short_version_string.



20
21
22
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 20

def latest_expiring_cf_bundle_short_version_string
  @latest_expiring_cf_bundle_short_version_string
end

#latest_expiring_cf_bundle_version_stringObject

Returns the value of attribute latest_expiring_cf_bundle_version_string.



21
22
23
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 21

def latest_expiring_cf_bundle_version_string
  @latest_expiring_cf_bundle_version_string
end

#latest_installed_deviceObject

Returns the value of attribute latest_installed_device.



23
24
25
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 23

def latest_installed_device
  @latest_installed_device
end

#latest_installed_device_platformObject

Returns the value of attribute latest_installed_device_platform.



25
26
27
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 25

def latest_installed_device_platform
  @latest_installed_device_platform
end

#latest_installed_os_versionObject

Returns the value of attribute latest_installed_os_version.



24
25
26
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 24

def latest_installed_os_version
  @latest_installed_os_version
end

#number_of_installed_devicesObject

Returns the value of attribute number_of_installed_devices.



19
20
21
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 19

def number_of_installed_devices
  @number_of_installed_devices
end

#remove_after_dateObject

Returns the value of attribute remove_after_date.



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

def remove_after_date
  @remove_after_date
end

Class Method Details

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

API



67
68
69
70
71
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 67

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



73
74
75
76
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 73

def self.find(client: nil, email: nil, includes: nil)
  client ||= Spaceship::ConnectAPI
  return all(client: client, filter: { email: email }, includes: includes).first
end

.typeObject



59
60
61
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 59

def self.type
  return "betaTesters"
end

Instance Method Details

#delete_from_apps(client: nil, apps: nil) ⇒ Object



78
79
80
81
82
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 78

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



84
85
86
87
88
# File 'spaceship/lib/spaceship/connect_api/models/beta_tester.rb', line 84

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