Class: Spaceship::ConnectAPI::BundleIdCapability
- Inherits:
-
Object
- Object
- Spaceship::ConnectAPI::BundleIdCapability
- Includes:
- Model
- Defined in:
- spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb
Defined Under Namespace
Modules: Options, Settings, Type
Instance Attribute Summary collapse
-
#capability_type ⇒ Object
Returns the value of attribute capability_type.
-
#settings ⇒ Object
Returns the value of attribute settings.
Attributes included from Model
Class Method Summary collapse
-
.all(client: nil, bundle_id_id:, limit: nil) ⇒ Object
API.
- .create(client: nil, bundle_id_id:, capability_type:, settings: []) ⇒ Object
- .type ⇒ Object
Instance Method Summary collapse
- #delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
-
#is_type?(type) ⇒ Boolean
Helpers.
Methods included from Model
#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes
Instance Attribute Details
#capability_type ⇒ Object
Returns the value of attribute capability_type.
7 8 9 |
# File 'spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb', line 7 def capability_type @capability_type end |
#settings ⇒ Object
Returns the value of attribute settings.
8 9 10 |
# File 'spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb', line 8 def settings @settings end |
Class Method Details
.all(client: nil, bundle_id_id:, limit: nil) ⇒ Object
API
118 119 120 121 122 |
# 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: []) ⇒ Object
124 125 126 127 128 |
# 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 ⇒ Object
100 101 102 |
# File 'spaceship/lib/spaceship/connect_api/models/bundle_id_capability.rb', line 100 def self.type return "bundleIdCapabilities" end |
Instance Method Details
#delete!(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
130 131 132 133 |
# 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) ⇒ Boolean
Helpers
108 109 110 111 112 |
# 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 |