Class: Spaceship::Tunes::AppReviewAttachment

Inherits:
TunesBase show all
Defined in:
spaceship/lib/spaceship/tunes/app_review_attachment.rb

Overview

Represents an image hosted on App Store Connect. Used for app store review attachment file.

Constant Summary collapse

HOST_URL =
"https://iosapps-ssl.itunes.apple.com/itunes-assets"

Instance Attribute Summary collapse

Attributes inherited from Base

#client, #raw_data

Instance Method Summary collapse

Methods inherited from TunesBase

client

Methods inherited from Base

attr_accessor, attr_mapping, attributes, #attributes, factory, #initialize, #inspect, mapping_module, method_missing, set_client, #to_s

Constructor Details

This class inherits a constructor from Spaceship::Base

Instance Attribute Details

#asset_tokenObject

Returns the value of attribute asset_token.



9
10
11
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 9

def asset_token
  @asset_token
end

#original_file_nameObject

Returns the value of attribute original_file_name.



11
12
13
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 11

def original_file_name
  @original_file_name
end

#type_of_fileObject

Returns the value of attribute type_of_file.



15
16
17
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 15

def type_of_file
  @type_of_file
end

#urlObject

Returns the value of attribute url.



13
14
15
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 13

def url
  @url
end

Instance Method Details

#reset!(attrs = {}) ⇒ Object



24
25
26
27
28
29
30
31
32
33
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 24

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

#setupObject



35
36
37
38
# File 'spaceship/lib/spaceship/tunes/app_review_attachment.rb', line 35

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