fastlane 2.156.0 → 2.157.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +74 -74
  3. data/deliver/lib/deliver.rb +1 -0
  4. data/deliver/lib/deliver/app_screenshot_iterator.rb +26 -29
  5. data/deliver/lib/deliver/detect_values.rb +4 -1
  6. data/deliver/lib/deliver/languages.rb +7 -0
  7. data/deliver/lib/deliver/loader.rb +4 -5
  8. data/deliver/lib/deliver/runner.rb +6 -5
  9. data/deliver/lib/deliver/upload_screenshots.rb +36 -18
  10. data/fastlane/lib/fastlane/actions/{.git_commit.rb.swp → .ensure_git_status_clean.rb.swp} +0 -0
  11. data/{spaceship/lib/spaceship/.spaceauth_runner.rb.swp → fastlane/lib/fastlane/actions/.hockey.rb.swp} +0 -0
  12. data/{spaceship/lib/spaceship/.client.rb.swp → fastlane/lib/fastlane/actions/.slack.rb.swp} +0 -0
  13. data/fastlane/lib/fastlane/actions/.update_project_provisioning.rb.swp +0 -0
  14. data/fastlane/lib/fastlane/actions/app_store_build_number.rb +11 -8
  15. data/fastlane/lib/fastlane/actions/app_store_connect_api_key.rb +120 -0
  16. data/fastlane/lib/fastlane/actions/commit_version_bump.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +2 -0
  18. data/fastlane/lib/fastlane/actions/docs/upload_to_testflight.md +17 -1
  19. data/fastlane/lib/fastlane/actions/download_dsyms.rb +87 -68
  20. data/fastlane/lib/fastlane/actions/set_changelog.rb +1 -2
  21. data/fastlane/lib/fastlane/actions/sonar.rb +5 -0
  22. data/fastlane/lib/fastlane/actions/spaceship_stats.rb +73 -0
  23. data/fastlane/lib/fastlane/actions/upload_to_testflight.rb +4 -0
  24. data/fastlane/lib/fastlane/version.rb +1 -1
  25. data/fastlane/swift/Deliverfile.swift +1 -1
  26. data/fastlane/swift/DeliverfileProtocol.swift +1 -1
  27. data/fastlane/swift/Fastlane.swift +78 -18
  28. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/project.xcworkspace/xcuserdata/josh.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  29. data/fastlane/swift/Gymfile.swift +1 -1
  30. data/fastlane/swift/GymfileProtocol.swift +1 -1
  31. data/fastlane/swift/Matchfile.swift +1 -1
  32. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  33. data/fastlane/swift/Precheckfile.swift +1 -1
  34. data/fastlane/swift/PrecheckfileProtocol.swift +1 -1
  35. data/fastlane/swift/Scanfile.swift +1 -1
  36. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  37. data/fastlane/swift/Screengrabfile.swift +1 -1
  38. data/fastlane/swift/ScreengrabfileProtocol.swift +1 -1
  39. data/fastlane/swift/Snapshotfile.swift +1 -1
  40. data/fastlane/swift/SnapshotfileProtocol.swift +1 -1
  41. data/fastlane_core/lib/fastlane_core/command_executor.rb +1 -0
  42. data/fastlane_core/lib/fastlane_core/itunes_transporter.rb +71 -42
  43. data/gym/lib/gym/error_handler.rb +1 -1
  44. data/match/lib/match/spaceship_ensure.rb +5 -5
  45. data/{fastlane/lib/fastlane/.erb_template_helper.rb.swp → pilot/lib/pilot/.manager.rb.swp} +0 -0
  46. data/pilot/lib/pilot/build_manager.rb +15 -4
  47. data/pilot/lib/pilot/manager.rb +15 -5
  48. data/pilot/lib/pilot/options.rb +16 -0
  49. data/produce/lib/produce/itunes_connect.rb +1 -2
  50. data/screengrab/lib/screengrab/runner.rb +29 -10
  51. data/sigh/lib/assets/resign.sh +9 -6
  52. data/sigh/lib/sigh/runner.rb +3 -4
  53. data/spaceship/lib/spaceship.rb +4 -0
  54. data/spaceship/lib/spaceship/client.rb +3 -0
  55. data/spaceship/lib/spaceship/connect_api.rb +1 -15
  56. data/spaceship/lib/spaceship/{.DS_Store → connect_api/.DS_Store} +0 -0
  57. data/spaceship/lib/spaceship/connect_api/api_client.rb +270 -0
  58. data/spaceship/lib/spaceship/connect_api/client.rb +150 -213
  59. data/spaceship/lib/spaceship/connect_api/file_uploader.rb +2 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app.rb +5 -5
  61. data/spaceship/lib/spaceship/connect_api/models/app_price_point.rb +26 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +7 -1
  63. data/spaceship/lib/spaceship/connect_api/provisioning/client.rb +8 -17
  64. data/spaceship/lib/spaceship/connect_api/provisioning/provisioning.rb +75 -64
  65. data/spaceship/lib/spaceship/connect_api/spaceship.rb +98 -0
  66. data/spaceship/lib/spaceship/connect_api/testflight/client.rb +8 -17
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +288 -277
  68. data/spaceship/lib/spaceship/connect_api/token.rb +46 -5
  69. data/spaceship/lib/spaceship/connect_api/token_refresh_middleware.rb +24 -0
  70. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +8 -17
  71. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +725 -706
  72. data/spaceship/lib/spaceship/connect_api/users/client.rb +8 -17
  73. data/spaceship/lib/spaceship/connect_api/users/users.rb +28 -17
  74. data/spaceship/lib/spaceship/stats_middleware.rb +65 -0
  75. metadata +33 -24
  76. data/spaceship/lib/spaceship/.two_step_or_factor_client.rb.swp +0 -0
@@ -1,245 +1,182 @@
1
- require_relative '../client'
2
- require_relative './response'
1
+ require_relative './token'
2
+ require_relative './provisioning/provisioning'
3
+ require_relative './testflight/testflight'
4
+ require_relative './tunes/tunes'
5
+ require_relative './users/users'
3
6
 
4
7
  module Spaceship
5
8
  class ConnectAPI
6
- class Client < Spaceship::Client
9
+ class Client
7
10
  attr_accessor :token
11
+ attr_accessor :tunes_client
12
+ attr_accessor :portal_client
8
13
 
9
- #####################################################
10
- # @!group Client Init
11
- #####################################################
12
-
13
- # Instantiates a client with cookie session or a JWT token.
14
- def initialize(cookie: nil, current_team_id: nil, token: nil)
15
- if token.nil?
16
- super(cookie: cookie, current_team_id: current_team_id, timeout: 1200)
17
- else
18
- options = {
19
- request: {
20
- timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i,
21
- open_timeout: (ENV["SPACESHIP_TIMEOUT"] || 300).to_i
22
- }
23
- }
24
- @token = token
25
- @current_team_id = current_team_id
26
-
27
- hostname = "https://api.appstoreconnect.apple.com/v1/"
28
-
29
- @client = Faraday.new(hostname, options) do |c|
30
- c.response(:json, content_type: /\bjson$/)
31
- c.response(:plist, content_type: /\bplist$/)
32
- c.use(FaradayMiddleware::RelsMiddleware)
33
- c.adapter(Faraday.default_adapter)
34
- c.headers["Authorization"] = "Bearer #{token.text}"
35
-
36
- if ENV['SPACESHIP_DEBUG']
37
- # for debugging only
38
- # This enables tracking of networking requests using Charles Web Proxy
39
- c.proxy = "https://127.0.0.1:8888"
40
- c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE
41
- elsif ENV["SPACESHIP_PROXY"]
42
- c.proxy = ENV["SPACESHIP_PROXY"]
43
- c.ssl[:verify_mode] = OpenSSL::SSL::VERIFY_NONE if ENV["SPACESHIP_PROXY_SSL_VERIFY_NONE"]
44
- end
45
-
46
- if ENV["DEBUG"]
47
- puts("To run spaceship through a local proxy, use SPACESHIP_DEBUG")
48
- end
49
- end
50
- end
51
- end
52
-
53
- def self.hostname
54
- return nil
55
- end
56
-
14
+ # Initializes client with Apple's App Store Connect JWT auth key.
57
15
  #
58
- # Helpers
16
+ # This method will automatically use the key id, issuer id, and filepath from environment
17
+ # variables if not given.
59
18
  #
60
-
61
- def web_session?
62
- return @token.nil?
63
- end
64
-
65
- def build_params(filter: nil, includes: nil, limit: nil, sort: nil, cursor: nil)
66
- params = {}
67
-
68
- filter = filter.delete_if { |k, v| v.nil? } if filter
69
-
70
- params[:filter] = filter if filter && !filter.empty?
71
- params[:include] = includes if includes
72
- params[:limit] = limit if limit
73
- params[:sort] = sort if sort
74
- params[:cursor] = cursor if cursor
75
-
76
- return params
19
+ # All three parameters are needed to authenticate.
20
+ #
21
+ # @param key_id (String) (optional): The key id
22
+ # @param issuer_id (String) (optional): The issuer id
23
+ # @param filepath (String) (optional): The filepath
24
+ #
25
+ # @raise InvalidUserCredentialsError: raised if authentication failed
26
+ #
27
+ # @return (Spaceship::ConnectAPI::Client) The client the login method was called for
28
+ def self.auth(key_id: nil, issuer_id: nil, filepath: nil)
29
+ token = Spaceship::ConnectAPI::Token.create(key_id: key_id, issuer_id: issuer_id, filepath: filepath)
30
+ return ConnectAPI::Client.new(token: token)
77
31
  end
78
32
 
79
- def get(url_or_path, params = nil)
80
- response = with_asc_retry do
81
- request(:get) do |req|
82
- req.url(url_or_path)
83
- req.options.params_encoder = Faraday::NestedParamsEncoder
84
- req.params = params if params
85
- req.headers['Content-Type'] = 'application/json'
86
- end
33
+ # Authenticates with Apple's web services. This method has to be called once
34
+ # to generate a valid session.
35
+ #
36
+ # This method will automatically use the username from the Appfile (if available)
37
+ # and fetch the password from the Keychain (if available)
38
+ #
39
+ # @param user (String) (optional): The username (usually the email address)
40
+ # @param password (String) (optional): The password
41
+ # @param use_portal (Boolean) (optional): Whether to log in to Spaceship::Portal or not
42
+ # @param use_tunes (Boolean) (optional): Whether to log in to Spaceship::Tunes or not
43
+ # @param portal_team_id (String) (optional): The Spaceship::Portal team id
44
+ # @param tunes_team_id (String) (optional): The Spaceship::Tunes team id
45
+ # @param team_name (String) (optional): The team name
46
+ #
47
+ # @raise InvalidUserCredentialsError: raised if authentication failed
48
+ #
49
+ # @return (Spaceship::ConnectAPI::Client) The client the login method was called for
50
+ def self.login(user = nil, password = nil, use_portal: true, use_tunes: true, portal_team_id: nil, tunes_team_id: nil, team_name: nil)
51
+ portal_client = Spaceship::Portal.login(user, password) if use_portal
52
+ tunes_client = Spaceship::Tunes.login(user, password) if use_tunes
53
+
54
+ # Check if environment variables are set for Spaceship::Portal or Spaceship::Tunes to select team
55
+ portal_team_id ||= ENV['FASTLANE_TEAM_ID']
56
+ portal_team_name = team_name || ENV['FASTLANE_TEAM_NAME']
57
+ tunes_team_id ||= ENV['FASTLANE_ITC_TEAM_ID']
58
+ tunes_team_name = team_name || ENV['FASTLANE_ITC_TEAM_NAME']
59
+
60
+ # The clients will automatically select the first team if none is given
61
+ if portal_client && (!portal_team_id.to_s.strip.empty? || !portal_team_name.to_s.strip.empty?)
62
+ portal_client.select_team(team_id: portal_team_id, team_name: portal_team_name)
87
63
  end
88
- handle_response(response)
89
- end
90
-
91
- def post(url_or_path, body, tries: 5)
92
- response = with_asc_retry(tries) do
93
- request(:post) do |req|
94
- req.url(url_or_path)
95
- req.body = body.to_json
96
- req.headers['Content-Type'] = 'application/json'
97
- end
64
+ if tunes_client && (!tunes_team_id.to_s.strip.empty? || !tunes_team_name.to_s.strip.empty?)
65
+ tunes_client.select_team(team_id: tunes_team_id, team_name: tunes_team_name)
98
66
  end
99
- handle_response(response)
67
+
68
+ return ConnectAPI::Client.new(tunes_client: tunes_client, portal_client: portal_client)
100
69
  end
101
70
 
102
- def patch(url_or_path, body)
103
- response = with_asc_retry do
104
- request(:patch) do |req|
105
- req.url(url_or_path)
106
- req.body = body.to_json
107
- req.headers['Content-Type'] = 'application/json'
108
- end
109
- end
110
- handle_response(response)
71
+ def initialize(cookie: nil, current_team_id: nil, token: nil, tunes_client: nil, portal_client: nil)
72
+ @token = token
73
+
74
+ # If using web session...
75
+ # Spaceship::Tunes is needed for TestFlight::API, Tunes::API, and Users::API
76
+ # Spaceship::Portal is needed for Provisioning::API
77
+ @tunes_client = tunes_client
78
+ @portal_client = portal_client
79
+
80
+ # Extending this instance to add API endpoints from these modules
81
+ # Each of these modules adds a new setter method for an instance
82
+ # of an ConnectAPI::APIClient
83
+ # These get set in set_indvidual_clients
84
+ self.extend(Spaceship::ConnectAPI::TestFlight::API)
85
+ self.extend(Spaceship::ConnectAPI::Tunes::API)
86
+ self.extend(Spaceship::ConnectAPI::Provisioning::API)
87
+ self.extend(Spaceship::ConnectAPI::Users::API)
88
+
89
+ set_indvidual_clients(
90
+ cookie: cookie,
91
+ current_team_id: current_team_id,
92
+ token: token,
93
+ tunes_client: @tunes_client,
94
+ portal_client: @portal_client
95
+ )
111
96
  end
112
97
 
113
- def delete(url_or_path, params = nil, body = nil)
114
- response = with_asc_retry do
115
- request(:delete) do |req|
116
- req.url(url_or_path)
117
- req.options.params_encoder = Faraday::NestedParamsEncoder if params
118
- req.params = params if params
119
- req.body = body.to_json if body
120
- req.headers['Content-Type'] = 'application/json' if body
98
+ def in_house?
99
+ if token
100
+ if token.in_house.nil?
101
+ message = [
102
+ "Cannot determine if team is App Store or Enterprise via the App Store Connect API (yet)",
103
+ "Set 'in_house' on your Spaceship::ConnectAPI::Token",
104
+ "Or set 'in_house' in your App Store Connect API key JSON file",
105
+ "Or set the 'SPACESHIP_CONNECT_API_IN_HOUSE' environment variable to 'true'",
106
+ "View more info in the docs at https://docs.fastlane.tools/app-store-connect-api/"
107
+ ]
108
+ raise message.join('\n')
121
109
  end
110
+ return !!token.in_house
111
+ elsif @portal_client
112
+ return @portal_client.in_house?
113
+ else
114
+ raise "No App Store Connect API token or Portal Client set"
122
115
  end
123
- handle_response(response)
124
116
  end
125
117
 
126
- protected
127
-
128
- def with_asc_retry(tries = 5, &_block)
129
- tries = 1 if Object.const_defined?("SpecHelper")
130
- response = yield
118
+ def select_team(portal_team_id: nil, tunes_team_id: nil, team_name: nil)
119
+ @portal_client.select_team(team_id: portal_team_id, team_name: team_name) unless @portal_client.nil?
120
+ @tunes_client.select_team(team_id: tunes_team_id, team_name: team_name) unless @tunes_client.nil?
121
+
122
+ # Updating the tunes and portal clients requires resetting
123
+ # of the clients in the API modules
124
+ set_indvidual_clients(
125
+ cookie: nil,
126
+ current_team_id: nil,
127
+ token: nil,
128
+ tunes_client: tunes_client,
129
+ portal_client: portal_client
130
+ )
131
+ end
131
132
 
132
- status = response.status if response
133
+ private
133
134
 
134
- if [500, 504].include?(status)
135
- msg = "Timeout received! Retrying after 3 seconds (remaining: #{tries})..."
136
- raise msg
135
+ def set_indvidual_clients(cookie: nil, current_team_id: nil, token: nil, tunes_client: nil, portal_client: nil)
136
+ # This was added by Spaceship::ConnectAPI::TestFlight::API and is required
137
+ # to be set for API methods to have a client to send request on
138
+ if cookie || token || tunes_client
139
+ self.test_flight_request_client = Spaceship::ConnectAPI::TestFlight::Client.new(
140
+ cookie: cookie,
141
+ current_team_id: current_team_id,
142
+ token: token,
143
+ another_client: tunes_client
144
+ )
137
145
  end
138
146
 
139
- return response
140
- rescue => error
141
- tries -= 1
142
- puts(error) if Spaceship::Globals.verbose?
143
- if tries.zero?
144
- return response
145
- else
146
- retry
147
+ # This was added by Spaceship::ConnectAPI::Tunes::API and is required
148
+ # to be set for API methods to have a client to send request on
149
+ if cookie || token || tunes_client
150
+ self.tunes_request_client = Spaceship::ConnectAPI::Tunes::Client.new(
151
+ cookie: cookie,
152
+ current_team_id: current_team_id,
153
+ token: token,
154
+ another_client: tunes_client
155
+ )
147
156
  end
148
- end
149
157
 
150
- def handle_response(response)
151
- if (200...300).cover?(response.status) && (response.body.nil? || response.body.empty?)
152
- return
158
+ # This was added by Spaceship::ConnectAPI::Provisioning::API and is required
159
+ # to be set for API methods to have a client to send request on
160
+ if cookie || token || portal_client
161
+ self.provisioning_request_client = Spaceship::ConnectAPI::Provisioning::Client.new(
162
+ cookie: cookie,
163
+ current_team_id: current_team_id,
164
+ token: token,
165
+ another_client: portal_client
166
+ )
153
167
  end
154
168
 
155
- raise InternalServerError, "Server error got #{response.status}" if (500...600).cover?(response.status)
156
-
157
- unless response.body.kind_of?(Hash)
158
- raise UnexpectedResponse, response.body
169
+ # This was added by Spaceship::ConnectAPI::Users::API and is required
170
+ # to be set for API methods to have a client to send request on
171
+ if cookie || token || tunes_client
172
+ self.users_request_client = Spaceship::ConnectAPI::Users::Client.new(
173
+ cookie: cookie,
174
+ current_team_id: current_team_id,
175
+ token: token,
176
+ another_client: tunes_client
177
+ )
159
178
  end
160
-
161
- raise UnexpectedResponse, response.body['error'] if response.body['error']
162
-
163
- raise UnexpectedResponse, handle_errors(response) if response.body['errors']
164
-
165
- raise UnexpectedResponse, "Temporary App Store Connect error: #{response.body}" if response.body['statusCode'] == 'ERROR'
166
-
167
- store_csrf_tokens(response)
168
-
169
- return Spaceship::ConnectAPI::Response.new(body: response.body, status: response.status, client: self)
170
- end
171
-
172
- def handle_errors(response)
173
- # Example error format
174
- # {
175
- # "errors":[
176
- # {
177
- # "id":"cbfd8674-4802-4857-bfe8-444e1ea36e32",
178
- # "status":"409",
179
- # "code":"STATE_ERROR",
180
- # "title":"The request cannot be fulfilled because of the state of another resource.",
181
- # "detail":"Submit for review errors found.",
182
- # "meta":{
183
- # "associatedErrors":{
184
- # "/v1/appScreenshots/":[
185
- # {
186
- # "id":"23d1734f-b81f-411a-98e4-6d3e763d54ed",
187
- # "status":"409",
188
- # "code":"STATE_ERROR.SCREENSHOT_REQUIRED.APP_WATCH_SERIES_4",
189
- # "title":"App screenshot missing (APP_WATCH_SERIES_4)."
190
- # },
191
- # {
192
- # "id":"db993030-0a93-48e9-9fd7-7e5676633431",
193
- # "status":"409",
194
- # "code":"STATE_ERROR.SCREENSHOT_REQUIRED.APP_WATCH_SERIES_4",
195
- # "title":"App screenshot missing (APP_WATCH_SERIES_4)."
196
- # }
197
- # ],
198
- # "/v1/builds/d710b6fa-5235-4fe4-b791-2b80d6818db0":[
199
- # {
200
- # "id":"e421fe6f-0e3b-464b-89dc-ba437e7bb77d",
201
- # "status":"409",
202
- # "code":"ENTITY_ERROR.ATTRIBUTE.REQUIRED",
203
- # "title":"The provided entity is missing a required attribute",
204
- # "detail":"You must provide a value for the attribute 'usesNonExemptEncryption' with this request",
205
- # "source":{
206
- # "pointer":"/data/attributes/usesNonExemptEncryption"
207
- # }
208
- # }
209
- # ]
210
- # }
211
- # }
212
- # }
213
- # ]
214
- # }
215
-
216
- return response.body['errors'].map do |error|
217
- messages = [[error['title'], error['detail']].compact.join(" - ")]
218
-
219
- meta = error["meta"] || {}
220
- associated_errors = meta["associatedErrors"] || {}
221
-
222
- messages + associated_errors.values.flatten.map do |associated_error|
223
- [[associated_error["title"], associated_error["detail"]].compact.join(" - ")]
224
- end
225
- end.flatten.join("\n")
226
- end
227
-
228
- private
229
-
230
- def local_variable_get(binding, name)
231
- if binding.respond_to?(:local_variable_get)
232
- binding.local_variable_get(name)
233
- else
234
- binding.eval(name.to_s)
235
- end
236
- end
237
-
238
- def provider_id
239
- return team_id if self.provider.nil?
240
- self.provider.provider_id
241
179
  end
242
180
  end
243
181
  end
244
- # rubocop:enable Metrics/ClassLength
245
182
  end
@@ -4,6 +4,8 @@ require 'faraday_middleware'
4
4
 
5
5
  require 'spaceship/globals'
6
6
 
7
+ require 'openssl'
8
+
7
9
  module Spaceship
8
10
  class ConnectAPI
9
11
  module FileUploader
@@ -192,7 +192,7 @@ module Spaceship
192
192
  .last
193
193
  end
194
194
 
195
- def get_live_app_store_version(platform: nil, includes: nil)
195
+ def get_live_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
196
196
  platform ||= Spaceship::ConnectAPI::Platform::IOS
197
197
  filter = {
198
198
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE,
@@ -201,7 +201,7 @@ module Spaceship
201
201
  return get_app_store_versions(filter: filter, includes: includes).first
202
202
  end
203
203
 
204
- def get_edit_app_store_version(platform: nil, includes: nil)
204
+ def get_edit_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
205
205
  platform ||= Spaceship::ConnectAPI::Platform::IOS
206
206
  filter = {
207
207
  appStoreState: [
@@ -221,7 +221,7 @@ module Spaceship
221
221
  .last
222
222
  end
223
223
 
224
- def get_in_review_app_store_version(platform: nil, includes: nil)
224
+ def get_in_review_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
225
225
  platform ||= Spaceship::ConnectAPI::Platform::IOS
226
226
  filter = {
227
227
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::IN_REVIEW,
@@ -230,7 +230,7 @@ module Spaceship
230
230
  return get_app_store_versions(filter: filter, includes: includes).first
231
231
  end
232
232
 
233
- def get_pending_release_app_store_version(platform: nil, includes: nil)
233
+ def get_pending_release_app_store_version(platform: nil, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES)
234
234
  platform ||= Spaceship::ConnectAPI::Platform::IOS
235
235
  filter = {
236
236
  appStoreState: Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PENDING_DEVELOPER_RELEASE,
@@ -239,7 +239,7 @@ module Spaceship
239
239
  return get_app_store_versions(filter: filter, includes: includes).first
240
240
  end
241
241
 
242
- def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
242
+ def get_app_store_versions(filter: {}, includes: Spaceship::ConnectAPI::AppStoreVersion::ESSENTIAL_INCLUDES, limit: nil, sort: nil)
243
243
  resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
244
244
  return resps.flat_map(&:to_models)
245
245
  end
@@ -0,0 +1,26 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppPricePoint
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :customer_price
8
+
9
+ attr_accessor :proceeds
10
+
11
+ attr_accessor :price_tier
12
+ attr_accessor :territory
13
+
14
+ attr_mapping({
15
+ "customerPrice" => "customer_price",
16
+ "proceeds" => "proceeds",
17
+ "priceTier" => "price_tier",
18
+ "territory" => "territory"
19
+ })
20
+
21
+ def self.type
22
+ return "appPricePoints"
23
+ end
24
+ end
25
+ end
26
+ end