Sha256: 0f72254286bcd9e72a940bb3a03497eca3e4d987ce70ba6f06304afbb0e707ce

Contents?: true

Size: 1.1 KB

Versions: 255

Compression:

Stored size: 1.1 KB

Contents

require_relative 'tunes_base'

module Spaceship
  module Tunes
    # Represents an image hosted on App Store Connect. Used for app store review attachment file.
    class AppReviewAttachment < TunesBase
      HOST_URL = "https://iosapps-ssl.itunes.apple.com/itunes-assets"

      attr_accessor :asset_token

      attr_accessor :original_file_name

      attr_accessor :url

      attr_accessor :type_of_file

      attr_mapping(
        'assetToken' => :asset_token,
        'fileType' => :type_of_file,
        'url' => :url,
        'name' => :original_file_name
      )

      def reset!(attrs = {})
        update_raw_data!(
          {
            asset_token: nil,
            type_of_file: nil,
            url: nil,
            original_file_name: nil
          }.merge(attrs)
        )
      end

      def setup
        # Since September 2015 we don't get the url any more, so we have to manually build it
        self.url = "#{HOST_URL}/#{self.asset_token}"
      end

      private

      def update_raw_data!(hash)
        hash.each do |k, v|
          self.send("#{k}=", v)
        end
      end
    end
  end
end

Version data entries

255 entries across 255 versions & 5 rubygems

Version Path
fastlane-2.128.0.beta.20190715200056 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.128.0.beta.20190714200028 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.128.0.beta.20190713200107 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.128.0.beta.20190712200059 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.128.0.beta.20190711200117 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.1 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.128.0.beta.20190710200106 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190709200015 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190708200031 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane_iac_publish-0.1.4 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane_iac_publish-0.1.3 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane_iac_publish-0.1.2 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190707200017 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane_iac_publish-0.1.1 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190706200054 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190705200056 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190704200049 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane_iac_publish-0.1.0 spaceship/lib/spaceship/tunes/app_review_attachment.rb
fastlane-2.127.0.beta.20190703200032 spaceship/lib/spaceship/tunes/app_review_attachment.rb