Sha256: c8e4c4bfbbb285982521cb083bafe4d1ae2d8f19b53ef89e73e21f537a81ab7c

Contents?: true

Size: 1.6 KB

Versions: 16

Compression:

Stored size: 1.6 KB

Contents

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

        attr_accessor :first_name
        attr_accessor :last_name
        attr_accessor :email
        attr_accessor :invite_type
        attr_accessor :invitation

        attr_accessor :apps
        attr_accessor :beta_groups
        attr_accessor :beta_tester_metrics

        attr_mapping({
          "firstName" => "first_name",
          "lastName" => "last_name",
          "email" => "email",
          "inviteType" => "invite_type",
          "invitation" => "invitation",

          "apps" => "apps",
          "betaGroups" => "beta_groups",
          "betaTesterMetrics" => "beta_tester_metrics"
        })

        def self.type
          return "betaTesters"
        end

        #
        # API
        #

        def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
          return testflight_client.get_beta_testers(filter: filter, includes: includes)
        end

        def self.find(email: nil, includes: nil)
          return all(filter: { email: email }, includes: includes).first
        end

        def delete_from_apps(apps: nil)
          app_ids = apps.map(&:id)
          return testflight_client.delete_beta_tester_from_apps(beta_tester_id: id, app_ids: app_ids)
        end

        def delete_from_beta_groups(beta_groups: nil)
          beta_group_ids = beta_groups.map(&:id)
          return testflight_client.delete_beta_tester_from_beta_groups(beta_tester_id: id, beta_group_ids: beta_group_ids)
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
fastlane-2.126.0.beta.20190623200100 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190622200100 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190621200104 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190620200055 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190619200046 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190618200051 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190617200114 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190616200045 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190615200013 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190614200105 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190613200017 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190611200027 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190610200032 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190609200013 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190608200023 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb
fastlane-2.126.0.beta.20190607200028 spaceship/lib/spaceship/connect_api/testflight/models/beta_tester.rb