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

#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



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

def self.type
  return "betaGroups"
end

Instance Method Details

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



43
44
45
46
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 43

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



57
58
59
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 57

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

#fetch_buildsObject



61
62
63
64
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 61

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: “”]



38
39
40
41
# File 'spaceship/lib/spaceship/connect_api/models/beta_group.rb', line 38

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



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

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