Sha256: e2f09b6ad09877422d3471f98c08b5400cfed5b2aa45b6f3d5e8bb955f1d7414

Contents?: true

Size: 1.16 KB

Versions: 58

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.flat_map(&:to_models)
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
fastlane-2.162.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.161.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.160.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.159.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.158.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.157.4 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.157.3 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.157.2 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.157.1 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.157.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.156.1 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.156.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.155.3 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.155.2 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.155.1 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.155.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.154.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.153.1 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.153.0 spaceship/lib/spaceship/connect_api/models/device.rb
fastlane-2.152.0 spaceship/lib/spaceship/connect_api/models/device.rb