Class: Spaceship::ConnectAPI::BetaGroup

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/beta_group.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

#beta_testersObject

Returns the value of attribute beta_testers.



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

def beta_testers
  @beta_testers
end

#created_dateObject

Returns the value of attribute created_date.



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

def created_date
  @created_date
end

#has_access_to_all_buildsObject

Returns the value of attribute has_access_to_all_builds.



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

def has_access_to_all_builds
  @has_access_to_all_builds
end

#is_internal_groupObject

Returns the value of attribute is_internal_group.



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

def is_internal_group
  @is_internal_group
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

Returns the value of attribute public_link.



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

def public_link
  @public_link
end

Returns the value of attribute public_link_enabled.



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

def public_link_enabled
  @public_link_enabled
end

Returns the value of attribute public_link_id.



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

def public_link_id
  @public_link_id
end

Returns the value of attribute public_link_limit.



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

def public_link_limit
  @public_link_limit
end

Returns the value of attribute public_link_limit_enabled.



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

def public_link_limit_enabled
  @public_link_limit_enabled
end

Class Method Details

.typeObject



31
32
33
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 31

def self.type
  return "betaGroups"
end

Instance Method Details

#add_beta_testers(client: nil, beta_tester_ids:) ⇒ Object



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

def add_beta_testers(client: nil, beta_tester_ids:)
  client ||= Spaceship::ConnectAPI
  return client.add_beta_tester_to_group(beta_group_id: id, beta_tester_ids: beta_tester_ids)
end

#delete!Object



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

def delete!
  return Spaceship::ConnectAPI.delete_beta_group(group_id: id)
end

#fetch_buildsObject



63
64
65
66
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 63

def fetch_builds
  resps = Spaceship::ConnectAPI.get_builds_for_beta_group(group_id: id).all_pages
  return resps.flat_map(&:to_models)
end

#post_bulk_beta_tester_assignments(client: nil, beta_testers: nil) ⇒ Object

beta_testers - [“”, firstName: “”, lastName: “”]



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

def post_bulk_beta_tester_assignments(client: nil, beta_testers: nil)
  client ||= Spaceship::ConnectAPI
  return client.post_bulk_beta_tester_assignments(beta_group_id: id, beta_testers: beta_testers)
end

#update(client: nil, attributes: nil) ⇒ Object



50
51
52
53
54
55
56
57
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 50

def update(client: nil, attributes: nil)
  return if attributes.empty?

  client ||= Spaceship::ConnectAPI

  attributes = reverse_attr_mapping(attributes)
  return client.patch_group(group_id: id, attributes: attributes).first
end