Sha256: 96690af6ce368d29aa488e0cfaf6b5007fec3af4164fdc9e3418458a37b35855
Contents?: true
Size: 1.15 KB
Versions: 91
Compression:
Stored size: 1.15 KB
Contents
require_relative '../model' module Spaceship class ConnectAPI class CustomAppOrganization include Spaceship::ConnectAPI::Model attr_accessor :device_enrollment_program_id attr_accessor :name attr_mapping({ "deviceEnrollmentProgramId" => "device_enrollment_program_id", "name" => "name" }) def self.type return "customAppOrganizations" end # # API # 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 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 def delete! Spaceship::ConnectAPI.delete_custom_app_organization(custom_app_organization_id: id) end end end end
Version data entries
91 entries across 91 versions & 4 rubygems