Class: Spaceship::ConnectAPI::CustomAppOrganization
- Inherits:
-
Object
- Object
- Spaceship::ConnectAPI::CustomAppOrganization
- Includes:
- Model
- Defined in:
- spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
Instance Attribute Summary collapse
-
#device_enrollment_program_id ⇒ Object
Returns the value of attribute device_enrollment_program_id.
-
#name ⇒ Object
Returns the value of attribute name.
Attributes included from Model
Class Method Summary collapse
-
.all(app_id: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
API.
- .create(app_id: nil, device_enrollment_program_id: nil, name: nil) ⇒ Object
- .type ⇒ Object
Instance Method Summary collapse
Methods included from Model
#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes
Instance Attribute Details
#device_enrollment_program_id ⇒ Object
Returns the value of attribute device_enrollment_program_id.
7 8 9 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 7 def device_enrollment_program_id @device_enrollment_program_id end |
#name ⇒ Object
Returns the value of attribute name.
8 9 10 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 8 def name @name end |
Class Method Details
.all(app_id: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
API
23 24 25 26 27 28 29 30 31 32 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 23 def self.all(app_id: nil, filter: {}, includes: nil, limit: nil, sort: nil) resps = Spaceship::ConnectAPI.get_custom_app_organization( app_id: app_id, filter: filter, includes: includes, limit: nil, sort: nil ).all_pages return resps.flat_map(&:to_models) end |
.create(app_id: nil, device_enrollment_program_id: nil, name: nil) ⇒ Object
34 35 36 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 34 def self.create(app_id: nil, device_enrollment_program_id: nil, name: nil) return Spaceship::ConnectAPI.post_custom_app_organization(app_id: app_id, device_enrollment_program_id: device_enrollment_program_id, name: name).first end |
.type ⇒ Object
15 16 17 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 15 def self.type return "customAppOrganizations" end |
Instance Method Details
#delete! ⇒ Object
38 39 40 |
# File 'spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb', line 38 def delete! Spaceship::ConnectAPI.delete_custom_app_organization(custom_app_organization_id: id) end |