Skip to content

Commit

Permalink
Remove deprecated attributes from apps requests (#21187)
Browse files Browse the repository at this point in the history
* Remove prices from ESSENTIAL_INCLUDES closes #21125

* Fix spec

* Fix violations

* Fix stubs
  • Loading branch information
giginet committed Apr 16, 2023
1 parent 0c06ab0 commit f7e0075
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spaceship/lib/spaceship/connect_api/models/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ module EducationDiscountType
"contentRightsDeclaration" => "content_rights_declaration",

"appStoreVersions" => "app_store_versions",
# This attribute is already deprecated. It will be removed in a future release.
"prices" => "prices"
})

ESSENTIAL_INCLUDES = [
"appStoreVersions",
"prices"
"appStoreVersions"
].join(",")

def self.type
Expand Down
2 changes: 1 addition & 1 deletion spaceship/lib/spaceship/tunes/tunes_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def applications
# if it needs to
#
# https://github.com/fastlane/fastlane/pull/20480
r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices")
r = request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions")
response = Spaceship::ConnectAPI::Response.new(
body: r.body,
status: r.status,
Expand Down
4 changes: 2 additions & 2 deletions spaceship/spec/connect_api/testflight/testflight_stubbing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ def stub_apps
stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps").
to_return(status: 200, body: read_fixture_file('apps.json'), headers: { 'Content-Type' => 'application/json' })

stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions,prices").
stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?include=appStoreVersions").
to_return(status: 200, body: read_fixture_file('apps.json'), headers: { 'Content-Type' => 'application/json' })

stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?filter%5BbundleId%5D=com.joshholtz.FastlaneTest&include=appStoreVersions,prices").
stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps?filter%5BbundleId%5D=com.joshholtz.FastlaneTest&include=appStoreVersions").
to_return(status: 200, body: read_fixture_file('apps.json'), headers: { 'Content-Type' => 'application/json' })

stub_request(:get, "https://appstoreconnect.apple.com/iris/v1/apps/123456789").
Expand Down

0 comments on commit f7e0075

Please sign in to comment.