lib/spaceship/tunes/app_version.rb in spaceship-0.24.1 vs lib/spaceship/tunes/app_version.rb in spaceship-0.25.0
- old
+ new
@@ -235,11 +235,11 @@
# 'UNRESTRICTED_WEB_ACCESS' => 0,
# 'GAMBLING_CONTESTS' => 0
# })
#
# Available Values
- # https://github.com/KrauseFx/deliver/blob/master/Reference.md
+ # https://github.com/fastlane/fastlane/blob/master/deliver/Reference.md
def update_rating(hash)
raise "Must be a hash" unless hash.kind_of?(Hash)
hash.each do |key, value|
to_edit = self.raw_data['ratings']['nonBooleanDescriptors'].find do |current|
@@ -453,9 +453,21 @@
end
end
def release!
client.release!(self.application.apple_id, self.version_id)
+ end
+
+ #####################################################
+ # @!group Promo codes
+ #####################################################
+ def generate_promocodes!(quantity)
+ data = client.generate_app_version_promocodes!(
+ app_id: self.application.apple_id,
+ version_id: self.version_id,
+ quantity: quantity
+ )
+ Tunes::AppVersionGeneratedPromocodes.factory(data)
end
# These methods takes care of properly parsing values that
# are not returned in the right format, e.g. boolean as string
def release_on_approval