Class: Spaceship::Portal::AppService

Inherits:
Object
  • Object
show all
Defined in:
lib/spaceship/portal/app_service.rb

Overview

Represents a single application service (its state to be more precise) on the Apple Dev Portal

Defined Under Namespace

Modules: AppGroup, ApplePay, AssociatedDomains, Cloud, CloudKit, DataProtection, GameCenter, HealthKit, HomeKit, InAppPurchase, InterAppAudio, Passbook, PushNotification, SiriKit, VPNConfiguration, WirelessAccessory

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service_id, value) ⇒ AppService

Returns a new instance of AppService.


20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/spaceship/portal/app_service.rb', line 20

def initialize(service_id, value)
  @service_id = service_id
  @value = value

  if @service_id == "push"
    # Push notifications have a special URI
    @service_uri = "account/ios/identifiers/updatePushService.action"
  else
    # Default service URI
    @service_uri = "account/ios/identifiers/updateService.action"
  end
end

Instance Attribute Details

#service_idString

Returns The identifier used by the Dev Portal to represent this service.

Examples:

"homeKit"

Returns:

  • (String)

    The identifier used by the Dev Portal to represent this service


8
9
10
# File 'lib/spaceship/portal/app_service.rb', line 8

def service_id
  @service_id
end

#service_uriString

Returns The service URI for this service.

Examples:

"account/ios/identifiers/updateService.action"

Returns:

  • (String)

    The service URI for this service


18
19
20
# File 'lib/spaceship/portal/app_service.rb', line 18

def service_uri
  @service_uri
end

#valueObject

Returns The current value for this service.

Examples:

false

Returns:

  • (Object)

    The current value for this service


13
14
15
# File 'lib/spaceship/portal/app_service.rb', line 13

def value
  @value
end

Class Method Details

.app_groupObject


34
35
36
# File 'lib/spaceship/portal/app_service.rb', line 34

def app_group
  self::AppGroup
end

.apple_payObject


38
39
40
# File 'lib/spaceship/portal/app_service.rb', line 38

def apple_pay
  self::ApplePay
end

.associated_domainsObject


42
43
44
# File 'lib/spaceship/portal/app_service.rb', line 42

def associated_domains
  self::AssociatedDomains
end

.cloud_kitObject


70
71
72
# File 'lib/spaceship/portal/app_service.rb', line 70

def cloud_kit
  self::CloudKit
end

.data_protectionObject


46
47
48
# File 'lib/spaceship/portal/app_service.rb', line 46

def data_protection
  self::DataProtection
end

.game_centerObject


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

def game_center
  self::GameCenter
end

.health_kitObject


54
55
56
# File 'lib/spaceship/portal/app_service.rb', line 54

def health_kit
  self::HealthKit
end

.home_kitObject


58
59
60
# File 'lib/spaceship/portal/app_service.rb', line 58

def home_kit
  self::HomeKit
end

.icloudObject


66
67
68
# File 'lib/spaceship/portal/app_service.rb', line 66

def icloud
  self::Cloud
end

.in_app_purchaseObject


74
75
76
# File 'lib/spaceship/portal/app_service.rb', line 74

def in_app_purchase
  self::InAppPurchase
end

.inter_app_audioObject


78
79
80
# File 'lib/spaceship/portal/app_service.rb', line 78

def inter_app_audio
  self::InterAppAudio
end

.passbookObject


82
83
84
# File 'lib/spaceship/portal/app_service.rb', line 82

def passbook
  self::Passbook
end

.push_notificationObject


86
87
88
# File 'lib/spaceship/portal/app_service.rb', line 86

def push_notification
  self::PushNotification
end

.siri_kitObject


90
91
92
# File 'lib/spaceship/portal/app_service.rb', line 90

def siri_kit
  self::SiriKit
end

.vpn_configurationObject


94
95
96
# File 'lib/spaceship/portal/app_service.rb', line 94

def vpn_configuration
  self::VPNConfiguration
end

.wireless_accessoryObject


62
63
64
# File 'lib/spaceship/portal/app_service.rb', line 62

def wireless_accessory
  self::WirelessAccessory
end

Instance Method Details

#==(other) ⇒ Object


99
100
101
102
103
104
# File 'lib/spaceship/portal/app_service.rb', line 99

def ==(other)
  self.class == other.class &&
    self.service_id == other.service_id &&
    self.value == other.value &&
    self.service_uri == other.service_uri
end