Sha256: 72390f80b71b2b534a91ea9b805fc65cd7c0d84fdb5ba43a8507548f5b5f85a9

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

require_relative 'base'
require_relative 'test_info'
require_relative 'beta_review_info'

module Spaceship::TestFlight
  class AppTestInfo < Base
    # AppTestInfo wraps a test_info and beta_review_info in the format required to manage test_info
    # for an application. Note that this structure, although looking similar to build test_info
    # is test information about the application

    attr_accessor :test_info
    attr_accessor :beta_review_info

    def self.find(app_id: nil)
      raw_app_test_info = client.get_app_test_info(app_id: app_id)
      self.new(raw_app_test_info)
    end

    def test_info
      Spaceship::TestFlight::TestInfo.new(raw_data['details'])
    end

    def test_info=(value)
      raw_data.set(['details'], value.raw_data)
    end

    def beta_review_info
      Spaceship::TestFlight::BetaReviewInfo.new(raw_data['betaReviewInfo'])
    end

    def beta_review_info=(value)
      raw_data.set(['betaReviewInfo'], value.raw_data)
    end

    # saves the changes to the App Test Info object to TestFlight
    def save_for_app!(app_id: nil)
      client.put_app_test_info(app_id: app_id, app_test_info: self)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 spaceship/lib/spaceship/test_flight/app_test_info.rb
fastlane_hotfix-2.165.0 spaceship/lib/spaceship/test_flight/app_test_info.rb
fastlane_hotfix-2.187.0 spaceship/lib/spaceship/test_flight/app_test_info.rb