Class: Spaceship::ConnectAPI::CustomAppOrganization

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb

Instance Attribute Summary collapse

Attributes included from Model

#id, #reverse_attr_map

Class Method Summary collapse

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_idObject

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

#nameObject

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

.typeObject



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