Class: Spaceship::Portal::CloudContainer

Inherits:
Spaceship::PortalBase show all
Defined in:
spaceship/lib/spaceship/portal/cloud_container.rb

Overview

Represents an iCloud Container of the Apple Dev Portal

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #raw_data

Class Method Summary collapse

Methods inherited from Spaceship::PortalBase

client

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

#can_deleteBool



36
37
38
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 36

def can_delete
  @can_delete
end

#can_editBool



33
34
35
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 33

def can_edit
  @can_edit
end

#cloud_containerString

Returns The identifier of this iCloud container, provided by the Dev Portal.

Examples:

"2MAY7NPHAA"


30
31
32
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 30

def cloud_container
  @cloud_container
end

#identifierString

Returns The identifier assigned to this container.

Examples:

"iCloud.com.example.application"


10
11
12
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 10

def identifier
  @identifier
end

#nameString

Returns The name of this container.

Examples:

"iCloud com example application"


20
21
22
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 20

def name
  @name
end

#prefixString

Returns The prefix assigned to this container.

Examples:

"9J57U9392R"


15
16
17
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 15

def prefix
  @prefix
end

#statusString

Returns Status of the container.

Examples:

"current"


25
26
27
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 25

def status
  @status
end

Class Method Details

.allArray



50
51
52
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 50

def all
  client.cloud_containers.map { |container| self.factory(container) }
end

.create!(identifier: nil, name: nil) ⇒ CloudContainer

Creates a new iCloud Container on the Apple Dev Portal



59
60
61
62
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 59

def create!(identifier: nil, name: nil)
  new_container = client.create_cloud_container!(name, identifier)
  self.new(new_container)
end

.find(identifier) ⇒ CloudContainer

Find a specific iCloud Container identifier



66
67
68
69
70
# File 'spaceship/lib/spaceship/portal/cloud_container.rb', line 66

def find(identifier)
  all.find do |container|
    container.identifier == identifier
  end
end