Sha256: d78c88904b54bcc9add70404bc3ee11ae3be1968ac544122c1c8a34c8afd68e5

Contents?: true

Size: 1.16 KB

Versions: 108

Compression:

Stored size: 1.16 KB

Contents

require_relative '../model'
module Spaceship
  class ConnectAPI
    class Device
      include Spaceship::ConnectAPI::Model

      attr_accessor :device_class
      attr_accessor :model
      attr_accessor :name
      attr_accessor :platform
      attr_accessor :status
      attr_accessor :udid
      attr_accessor :added_date

      attr_mapping({
        "deviceClass" => "device_class",
        "model" => "model",
        "name" => "name",
        "platform" => "platform",
        "status" => "status",
        "udid" => "udid",
        "addedDate" => "added_date"
      })

      module DeviceClass
        APPLE_WATCH = "APPLE_WATCH"
        IPAD = "IPAD"
        IPHONE = "IPHONE"
        IPOD = "IPOD"
        APPLE_TV = "APPLE_TV"
        MAC = "MAC"
      end

      module Status
        ENABLED = "ENABLED"
        DISABLED = "DISABLED"
      end

      def self.type
        return "devices"
      end

      #
      # API
      #

      def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
        resps = Spaceship::ConnectAPI.get_devices(filter: filter, includes: includes).all_pages
        return resps.map(&:to_models).flatten
      end
    end
  end
end

Version data entries

108 entries across 108 versions & 2 rubygems

Version Path
fastlane-2.132.0.beta.20190929200020 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190928200106 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190927200017 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190926200023 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190925200108 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190924200030 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190923200017 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190922200014 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190921200021 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190920200012 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190919200100 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190918200023 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190917200011 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190916200055 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190915200038 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190914200034 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190913200058 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.132.0.beta.20190912200052 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.131.0.beta.20190911200010 spaceship/lib/spaceship/connect_api/models/device.rb