class Spaceship::ConnectAPI::BundleId
Attributes
bundle_id_capabilities[RW]
identifier[RW]
name[RW]
platform[RW]
seed_id[RW]
Public Class Methods
all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
click to toggle source
API
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 42 def self.all(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) client ||= Spaceship::ConnectAPI resps = client.get_bundle_ids(filter: filter, includes: includes).all_pages return resps.flat_map(&:to_models) end
create(client: nil, name: nil, platform: nil, identifier: nil, seed_id: nil)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 60 def self.create(client: nil, name: nil, platform: nil, identifier: nil, seed_id: nil) client ||= Spaceship::ConnectAPI resp = client.post_bundle_id(name: name, platform: platform, identifier: identifier, seed_id: seed_id) return resp.to_models.first end
find(identifier, includes: nil, client: nil)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 48 def self.find(identifier, includes: nil, client: nil) client ||= Spaceship::ConnectAPI return all(client: client, filter: { identifier: identifier }, includes: includes).find do |app| app.identifier == identifier end end
get(client: nil, bundle_id_id: nil, includes: nil)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 55 def self.get(client: nil, bundle_id_id: nil, includes: nil) client ||= Spaceship::ConnectAPI return client.get_bundle_id(bundle_id_id: bundle_id_id, includes: includes).first end
type()
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 24 def self.type return "bundleIds" end
Public Instance Methods
create_capability(capability_type, settings: [], client: nil)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 76 def create_capability(capability_type, settings: [], client: nil) raise "capability_type is required " if capability_type.nil? client ||= Spaceship::ConnectAPI resp = client.post_bundle_id_capability(bundle_id_id: id, capability_type: capability_type, settings: settings) return resp.to_models.first end
get_capabilities(client: nil, includes: nil)
click to toggle source
BundleIdsCapabilities
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 70 def get_capabilities(client: nil, includes: nil) client ||= Spaceship::ConnectAPI resp = client.get_bundle_id_capabilities(bundle_id_id: id, includes: includes) return resp.to_models end
supports_catalyst?()
click to toggle source
Helpers
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 32 def supports_catalyst? return bundle_id_capabilities.any? do |capability| capability.is_type?(Spaceship::ConnectAPI::BundleIdCapability::Type::MARZIPAN) end end
update_capability(capability_type, enabled: false, settings: [], client: nil)
click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id.rb, line 84 def update_capability(capability_type, enabled: false, settings: [], client: nil) raise "capability_type is required " if capability_type.nil? client ||= Spaceship::ConnectAPI resp = client.patch_bundle_id_capability(bundle_id_id: id, seed_id: seed_id, enabled: enabled, capability_type: capability_type, settings: settings) return resp.to_models.first end