spaceship/lib/spaceship/client.rb in fastlane_hotfix-2.165.0 vs spaceship/lib/spaceship/client.rb in fastlane_hotfix-2.165.1
- old
+ new
@@ -144,10 +144,11 @@
# invalid content provider id
#
available_teams = teams.collect do |team|
{
team_id: (team["contentProvider"] || {})["contentProviderId"],
+ public_team_id: (team["contentProvider"] || {})["contentProviderPublicId"],
team_name: (team["contentProvider"] || {})["name"]
}
end
result = available_teams.find do |available_team|
@@ -158,13 +159,22 @@
error_string = "Could not set team ID to '#{team_id}', only found the following available teams:\n\n#{available_teams.map { |team| "- #{team[:team_id]} (#{team[:team_name]})" }.join("\n")}\n"
raise Tunes::Error.new, error_string
end
response = request(:post) do |req|
- req.url("ra/v2/session/webSession")
+ req.url("https://appstoreconnect.apple.com/olympus/v1/providerSwitchRequests")
req.body = {
- contentProviderId: team_id,
- dsId: user_detail_data.ds_id # https://github.com/fastlane/fastlane/issues/6711
+ "data": {
+ "type": "providerSwitchRequests",
+ "relationships": {
+ "provider": {
+ "data": {
+ "type": "providers",
+ "id": result[:public_team_id]
+ }
+ }
+ }
+ }
}.to_json
req.headers['Content-Type'] = 'application/json'
end
handle_itc_response(response.body)