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

Version Path
fastlane-2.226.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.225.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.224.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.223.1 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.223.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.222.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.221.1 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.221.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.220.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.219.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.218.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-security-patched-2.216.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.217.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.216.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.215.1 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.215.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-mercafacil-2.214.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.214.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.213.0 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb
fastlane-2.212.2 spaceship/lib/spaceship/connect_api/models/custom_app_organization.rb