class Spaceship::Tunes::AppVersionHistory
Represents a read only version of an iTunes Connect Versions State History
Attributes
application[RW]
@return (Spaceship::Tunes::Application
) A reference to the application
this version is for
items[R]
@return ([Spaceship::Tunes::AppVersionStatesHistory]) the array of version states
version_id[R]
@return (String
) The platform value of this version.
version_string[R]
@return (String
) The version in string format (e.g. “1.0”)
Public Class Methods
factory(attrs)
click to toggle source
Create a new object based on a hash. This is used to create a new object based on the server response.
# File lib/spaceship/tunes/app_version_history.rb, line 27 def factory(attrs) obj = self.new(attrs) return obj end
Public Instance Methods
setup()
click to toggle source
Private methods
# File lib/spaceship/tunes/app_version_history.rb, line 39 def setup # Properly parse the AppStatus items = raw_data['items'] @items = map_items(items) if items end
Private Instance Methods
fetch_items()
click to toggle source
# File lib/spaceship/tunes/app_version_history.rb, line 53 def fetch_items items = client.version_states_history(application.apple_id, application.platform, version_id)['items'] map_items(items) end
map_items(items)
click to toggle source
# File lib/spaceship/tunes/app_version_history.rb, line 47 def map_items(items) items.map do |attrs| Tunes::AppVersionStatesHistory.factory(attrs) end end