class Spaceship::ConnectAPI::BundleIdCapability

Attributes

capability_type[RW]
settings[RW]

Public Class Methods

all(client: nil, bundle_id_id:, limit: nil) click to toggle source

API

# File spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb, line 118
def self.all(client: nil, bundle_id_id:, limit: nil)
  client ||= Spaceship::ConnectAPI
  resp = client.get_bundle_id_capabilities(bundle_id_id: bundle_id_id, limit: limit).all_pages
  return resp.flat_map(&:to_models)
end
create(client: nil, bundle_id_id:, capability_type:, settings: []) click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb, line 124
def self.create(client: nil, bundle_id_id:, capability_type:, settings: [])
  client ||= Spaceship::ConnectAPI
  resp = client.post_bundle_id_capability(bundle_id_id: bundle_id_id, capability_type: capability_type, settings: settings)
  return resp.to_models.first
end
type() click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb, line 100
def self.type
  return "bundleIdCapabilities"
end

Public Instance Methods

delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) click to toggle source
# File spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb, line 130
def delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil)
  client ||= Spaceship::ConnectAPI
  client.delete_bundle_id_capability(bundle_id_capability_id: id)
end
is_type?(type) click to toggle source

Helpers

# File spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb, line 108
def is_type?(type)
  # JWT session returns type under "capability_type" attribute
  # Web session returns type under "id" attribute but with "P7GJR49W72_" prefixed
  return capability_type == type || id.end_with?(type)
end