spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.95.0.beta.20180508050130 vs spaceship/lib/spaceship/tunes/tunes_client.rb in fastlane-2.95.0.beta.20180509050014

- old
+ new

@@ -518,9 +518,13 @@ def update_price_tier!(app_id, price_tier) r = request(:get, "ra/apps/#{app_id}/pricing/intervals") data = parse_response(r, 'data') + # preOrder isn't needed for for the request and has some + # values that can cause a failure (invalid dates) so we are removing it + data.delete('preOrder') + first_price = (data["pricingIntervalsFieldTO"]["value"] || []).count == 0 # first price data["pricingIntervalsFieldTO"]["value"] ||= [] data["pricingIntervalsFieldTO"]["value"] << {} if data["pricingIntervalsFieldTO"]["value"].count == 0 data["pricingIntervalsFieldTO"]["value"].first["tierStem"] = price_tier.to_s