Class: Spaceship::Portal::AppGroup
- Inherits:
-
Spaceship::PortalBase
- Object
- Base
- Spaceship::PortalBase
- Spaceship::Portal::AppGroup
- Defined in:
- spaceship/lib/spaceship/portal/app_group.rb
Overview
Represents an app group of the Apple Dev Portal
Instance Attribute Summary collapse
-
#app_group_id ⇒ String
The identifier of this app group, provided by the Dev Portal.
-
#group_id ⇒ String
The identifier assigned to this group.
-
#name ⇒ String
The name of this group.
-
#prefix ⇒ String
The prefix assigned to this group.
-
#status ⇒ String
Status of the group.
Attributes inherited from Base
Class Method Summary collapse
-
.all ⇒ Array
Returns all app groups available for this account.
-
.create!(group_id: nil, name: nil) ⇒ AppGroup
Creates a new App Group on the Apple Dev Portal.
-
.find(group_id) ⇒ AppGroup
Find a specific App Group group_id.
Instance Method Summary collapse
-
#delete! ⇒ AppGroup
Delete this app group.
Methods inherited from Spaceship::PortalBase
Methods inherited from Base
attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #setup, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#app_group_id ⇒ String
Returns The identifier of this app group, provided by the Dev Portal.
30 31 32 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 30 def app_group_id @app_group_id end |
#group_id ⇒ String
Returns The identifier assigned to this group.
10 11 12 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 10 def group_id @group_id end |
#name ⇒ String
Returns The name of this group.
20 21 22 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 20 def name @name end |
#prefix ⇒ String
Returns The prefix assigned to this group.
15 16 17 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 15 def prefix @prefix end |
#status ⇒ String
Returns Status of the group.
25 26 27 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 25 def status @status end |
Class Method Details
.all ⇒ Array
Returns all app groups available for this account
42 43 44 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 42 def all client.app_groups.map { |group| self.factory(group) } end |
.create!(group_id: nil, name: nil) ⇒ AppGroup
Creates a new App Group on the Apple Dev Portal
51 52 53 54 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 51 def create!(group_id: nil, name: nil) new_group = client.create_app_group!(name, group_id) self.new(new_group) end |
.find(group_id) ⇒ AppGroup
Find a specific App Group group_id
58 59 60 61 62 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 58 def find(group_id) all.find do |group| group.group_id == group_id end end |
Instance Method Details
#delete! ⇒ AppGroup
Delete this app group
67 68 69 70 |
# File 'spaceship/lib/spaceship/portal/app_group.rb', line 67 def delete! client.delete_app_group!(app_group_id) self end |