lib/spaceship/tunes/application.rb in spaceship-0.7.0 vs lib/spaceship/tunes/application.rb in spaceship-0.9.0

- old
+ new

@@ -1,9 +1,8 @@ module Spaceship module Tunes class Application < TunesBase - # @return (String) The App identifier of this app, provided by iTunes Connect # @example # "1013943394" attr_accessor :apple_id @@ -114,11 +113,12 @@ # @return (Spaceship::AppVersion) Receive the version that can fully be edited def edit_version if raw_data['versions'].count == 1 v = raw_data['versions'].last - unless ['Prepare for Upload', 'prepareForUpload'].include?(v['state']) # this only applies for the initial version + # this only applies for the initial version + unless ['Prepare for Upload', 'Developer Rejected', 'Rejected', 'prepareForUpload'].include?(v['state']) return nil # only live version, user should create a new version end end Spaceship::AppVersion.find(self, self.apple_id, false) @@ -161,9 +161,19 @@ end client.create_version!(apple_id, version_number) # Future: implemented -reload method + end + + # set the price tier. This method doesn't require `save` to be called + def update_price_tier!(price_tier) + client.update_price_tier!(self.apple_id, price_tier) + end + + # The current price tier + def price_tier + client.price_tier(self.apple_id) end ##################################################### # @!group Builds #####################################################