fastlane 2.149.1 → 2.150.0.rc1

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/deliver/lib/deliver.rb +0 -1
  3. data/deliver/lib/deliver/app_screenshot.rb +26 -25
  4. data/deliver/lib/deliver/options.rb +6 -11
  5. data/deliver/lib/deliver/runner.rb +7 -4
  6. data/deliver/lib/deliver/setup.rb +5 -30
  7. data/deliver/lib/deliver/submit_for_review.rb +124 -87
  8. data/deliver/lib/deliver/upload_metadata.rb +284 -143
  9. data/deliver/lib/deliver/upload_price_tier.rb +15 -8
  10. data/deliver/lib/deliver/upload_screenshots.rb +86 -37
  11. data/fastlane/lib/fastlane/actions/docs/capture_ios_screenshots.md +1 -1
  12. data/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +3 -11
  13. data/fastlane/lib/fastlane/actions/docs/upload_to_play_store.md +3 -2
  14. data/fastlane/lib/fastlane/actions/download_dsyms.rb +7 -1
  15. data/fastlane/lib/fastlane/actions/google_play_track_release_names.rb +74 -0
  16. data/fastlane/lib/fastlane/actions/slack.rb +1 -1
  17. data/fastlane/lib/fastlane/actions/spm.rb +7 -0
  18. data/fastlane/lib/fastlane/actions/upload_symbols_to_crashlytics.rb +1 -32
  19. data/fastlane/lib/fastlane/lane.rb +3 -3
  20. data/fastlane/lib/fastlane/swift_fastlane_function.rb +8 -4
  21. data/fastlane/lib/fastlane/version.rb +1 -1
  22. data/fastlane/swift/ControlCommand.swift +1 -0
  23. data/fastlane/swift/Fastlane.swift +48 -12
  24. data/fastlane/swift/FastlaneSwiftRunner/FastlaneSwiftRunner.xcodeproj/xcshareddata/xcschemes/FastlaneRunner.xcscheme +3 -9
  25. data/fastlane/swift/LaneFileProtocol.swift +2 -5
  26. data/fastlane/swift/MatchfileProtocol.swift +1 -1
  27. data/fastlane/swift/RubyCommand.swift +29 -6
  28. data/fastlane/swift/RubyCommandable.swift +1 -0
  29. data/fastlane/swift/Runner.swift +85 -13
  30. data/fastlane/swift/ScanfileProtocol.swift +1 -1
  31. data/fastlane/swift/SnapshotfileProtocol.swift +3 -3
  32. data/fastlane/swift/SocketClient.swift +76 -45
  33. data/fastlane/swift/SocketClientDelegateProtocol.swift +1 -1
  34. data/fastlane/swift/SocketResponse.swift +1 -0
  35. data/fastlane_core/lib/fastlane_core/configuration/config_item.rb +1 -3
  36. data/fastlane_core/lib/fastlane_core/pkg_file_analyser.rb +7 -0
  37. data/frameit/lib/frameit/device_types.rb +100 -100
  38. data/produce/lib/produce/itunes_connect.rb +20 -20
  39. data/produce/lib/produce/options.rb +3 -3
  40. data/sigh/lib/assets/resign.sh +7 -7
  41. data/snapshot/lib/assets/SnapshotHelper.swift +5 -5
  42. data/snapshot/lib/assets/SnapshotHelperXcode8.swift +3 -3
  43. data/snapshot/lib/snapshot/options.rb +0 -1
  44. data/snapshot/lib/snapshot/reports_generator.rb +8 -1
  45. data/spaceship/lib/spaceship/.DS_Store +0 -0
  46. data/spaceship/lib/spaceship/connect_api.rb +21 -2
  47. data/spaceship/lib/spaceship/connect_api/client.rb +47 -11
  48. data/spaceship/lib/spaceship/connect_api/model.rb +1 -1
  49. data/spaceship/lib/spaceship/connect_api/models/age_rating_declaration.rb +109 -0
  50. data/spaceship/lib/spaceship/connect_api/models/app.rb +113 -3
  51. data/spaceship/lib/spaceship/connect_api/models/app_category.rb +94 -0
  52. data/spaceship/lib/spaceship/connect_api/models/app_info.rb +74 -0
  53. data/spaceship/lib/spaceship/connect_api/models/app_info_localization.rb +38 -0
  54. data/spaceship/lib/spaceship/connect_api/models/app_price.rb +22 -0
  55. data/spaceship/lib/spaceship/connect_api/models/app_price_tier.rb +12 -0
  56. data/spaceship/lib/spaceship/connect_api/models/app_review_attachment.rb +81 -0
  57. data/spaceship/lib/spaceship/connect_api/models/app_screenshot.rb +117 -0
  58. data/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb +101 -0
  59. data/spaceship/lib/spaceship/connect_api/models/app_store_review_detail.rb +51 -0
  60. data/spaceship/lib/spaceship/connect_api/models/app_store_version.rb +182 -0
  61. data/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb +70 -0
  62. data/spaceship/lib/spaceship/connect_api/models/app_store_version_phased_release.rb +36 -0
  63. data/spaceship/lib/spaceship/connect_api/models/app_store_version_submission.rb +26 -0
  64. data/spaceship/lib/spaceship/connect_api/models/build.rb +4 -0
  65. data/spaceship/lib/spaceship/connect_api/models/idfa_declaration.rb +40 -0
  66. data/spaceship/lib/spaceship/connect_api/models/reset_ratings_request.rb +26 -0
  67. data/spaceship/lib/spaceship/connect_api/testflight/testflight.rb +10 -3
  68. data/spaceship/lib/spaceship/connect_api/tunes/client.rb +33 -0
  69. data/spaceship/lib/spaceship/connect_api/tunes/tunes.rb +703 -0
  70. data/spaceship/lib/spaceship/spaceauth_runner.rb +2 -2
  71. data/supply/lib/supply/client.rb +19 -0
  72. data/supply/lib/supply/reader.rb +16 -0
  73. metadata +27 -24
  74. data/deliver/lib/deliver/upload_assets.rb +0 -27
  75. data/scan/lib/scan/.test_command_generator.rb.swp +0 -0
  76. data/snapshot/lib/snapshot/.test_command_generator_base.rb.swp +0 -0
@@ -13,13 +13,26 @@ module Spaceship
13
13
  attr_accessor :removed
14
14
  attr_accessor :is_aag
15
15
 
16
+ attr_accessor :content_rights_declaration
17
+
18
+ attr_accessor :app_store_versions
19
+
20
+ module ContentRightsDeclaration
21
+ USES_THIRD_PARTY_CONTENT = "USES_THIRD_PARTY_CONTENT"
22
+ DOES_NOT_USE_THIRD_PARTY_CONTENT = "DOES_NOT_USE_THIRD_PARTY_CONTENT"
23
+ end
24
+
16
25
  self.attr_mapping({
17
26
  "name" => "name",
18
27
  "bundleId" => "bundle_id",
19
28
  "sku" => "sku",
20
29
  "primaryLocale" => "primary_locale",
21
30
  "removed" => "removed",
22
- "isAAG" => "is_aag"
31
+ "isAAG" => "is_aag",
32
+
33
+ "contentRightsDeclaration" => "content_rights_declaration",
34
+
35
+ "appStoreVersions" => "app_store_versions"
23
36
  })
24
37
 
25
38
  def self.type
@@ -30,7 +43,7 @@ module Spaceship
30
43
  # Apps
31
44
  #
32
45
 
33
- def self.all(filter: {}, includes: nil, limit: nil, sort: nil)
46
+ def self.all(filter: {}, includes: "appStoreVersions", limit: nil, sort: nil)
34
47
  resps = Spaceship::ConnectAPI.get_apps(filter: filter, includes: includes, limit: limit, sort: sort).all_pages
35
48
  return resps.flat_map(&:to_models)
36
49
  end
@@ -41,12 +54,109 @@ module Spaceship
41
54
  end
42
55
  end
43
56
 
44
- def self.get(app_id: nil, includes: nil)
57
+ def self.create(name: nil, version_string: nil, sku: nil, primary_locale: nil, bundle_id: nil, platforms: nil)
58
+ Spaceship::ConnectAPI.post_app(name: name, version_string: version_string, sku: sku, primary_locale: primary_locale, bundle_id: bundle_id, platforms: platforms)
59
+ end
60
+
61
+ def self.get(app_id: nil, includes: "appStoreVersions")
45
62
  return Spaceship::ConnectAPI.get_app(app_id: app_id, includes: includes).first
46
63
  end
47
64
 
65
+ def update(attributes: nil)
66
+ return Spaceship::ConnectAPI.patch_app(app_id: id, attributes: attributes)
67
+ end
68
+
69
+ #
70
+ # App Info
71
+ #
72
+
73
+ def fetch_edit_app_info
74
+ states = [
75
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::PREPARE_FOR_SUBMISSION,
76
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::DEVELOPER_REJECTED,
77
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::REJECTED,
78
+ Spaceship::ConnectAPI::AppInfo::AppStoreState::METADATA_REJECTED
79
+ ]
80
+
81
+ resp = Spaceship::ConnectAPI.get_app_infos(app_id: id)
82
+ return resp.to_models.select do |model|
83
+ states.include?(model.app_store_state)
84
+ end.first
85
+ end
86
+
87
+ #
88
+ # App Pricing
89
+ #
90
+
91
+ def fetch_app_prices(filter: {}, includes: "priceTier", limit: nil, sort: nil)
92
+ filter ||= {}
93
+ filter[:app] = id
94
+ resp = Spaceship::ConnectAPI.get_app_prices(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
95
+ return resp.to_models
96
+ end
97
+
98
+ def update_app_price_tier(app_price_tier_id: nil)
99
+ resp = Spaceship::ConnectAPI.patch_app_app_prices(app_id: id, app_price_tier_id: app_price_tier_id)
100
+ return resp.first
101
+ end
102
+
103
+ #
104
+ # App Store Versions
105
+ #
106
+
107
+ # Will make sure the current edit_version matches the given version number
108
+ # This will either create a new version or change the version number
109
+ # from an existing version
110
+ # @return (Bool) Was something changed?
111
+ def ensure_version!(version_string, platform: nil)
112
+ app_store_version = get_edit_app_store_version(platform: platform)
113
+
114
+ if app_store_version
115
+ if version_string != app_store_version.version_string
116
+ attributes = { versionString: version_string }
117
+ app_store_version.update(attributes: attributes)
118
+ return true
119
+ end
120
+ return false
121
+ else
122
+ attributes = { versionString: version_string, platform: platform }
123
+ Spaceship::ConnectAPI.post_app_store_version(app_id: id, attributes: attributes)
124
+
125
+ return true
126
+ end
127
+ end
128
+
129
+ def get_live_app_store_version(platform: nil, includes: nil)
130
+ platform ||= Spaceship::ConnectAPI::Platform::IOS
131
+ filter = {
132
+ appStoreState: [Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::READY_FOR_SALE].join(","),
133
+ platform: platform
134
+ }
135
+ return get_app_store_versions(filter: filter, includes: includes).first
136
+ end
137
+
138
+ def get_edit_app_store_version(platform: nil, includes: nil)
139
+ platform ||= Spaceship::ConnectAPI::Platform::IOS
140
+ filter = {
141
+ appStoreState: [
142
+ Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::PREPARE_FOR_SUBMISSION,
143
+ Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::DEVELOPER_REJECTED,
144
+ Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::REJECTED,
145
+ Spaceship::ConnectAPI::AppStoreVersion::AppStoreState::METADATA_REJECTED
146
+ ].join(","),
147
+ platform: platform
148
+ }
149
+ return get_app_store_versions(filter: filter, includes: includes).first
150
+ end
151
+
152
+ def get_app_store_versions(filter: {}, includes: nil, limit: nil, sort: nil)
153
+ resps = Spaceship::ConnectAPI.get_app_store_versions(app_id: id, filter: filter, includes: includes, limit: limit, sort: sort).all_pages
154
+ return resps.flat_map(&:to_models)
155
+ end
156
+
48
157
  #
49
158
  # Beta Feedback
159
+ #
50
160
 
51
161
  def get_beta_feedback(filter: {}, includes: "tester,build,screenshots", limit: nil, sort: nil)
52
162
  filter ||= {}
@@ -0,0 +1,94 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppCategory
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :platforms
8
+
9
+ attr_mapping({
10
+ "platforms" => "platforms"
11
+ })
12
+
13
+ def self.type
14
+ return "appCategories"
15
+ end
16
+
17
+ LEGACY_CATEGORY_ITC_MAP = {
18
+ "Apps.Food_Drink" => "FOOD_AND_DRINK",
19
+ "Business" => "BUSINESS",
20
+ "Education" => "EDUCATION",
21
+ "SocialNetworking" => "SOCIAL_NETWORKING",
22
+ "Book" => "BOOKS",
23
+ "Sports" => "SPORTS",
24
+ "Finance" => "FINANCE",
25
+ "Reference" => "REFERENCE",
26
+ "Apps.GraphicsDesign" => "GRAPHICS_AND_DESIGN",
27
+ "Apps.DeveloperTools" => "DEVELOPER_TOOLS",
28
+ "Healthcare_Fitness" => "HEALTH_AND_FITNESS",
29
+ "Music" => "MUSIC",
30
+ "Weather" => "WEATHER",
31
+ "Travel" => "TRAVEL",
32
+ "Entertainment" => "ENTERTAINMENT",
33
+ "Stickers" => "STICKERS",
34
+ "Games" => "GAMES",
35
+ "Lifestyle" => "LIFESTYLE",
36
+ "Medical" => "MEDICAL",
37
+ "Apps.Newsstand" => "MAGAZINES_AND_NEWSPAPERS",
38
+ "Utilities" => "UTILITIES",
39
+ "Apps.Shopping" => "SHOPPING",
40
+ "Productivity" => "PRODUCTIVITY",
41
+ "News" => "NEWS",
42
+ "Photography" => "PHOTO_AND_VIDEO",
43
+ "Navigation" => "NAVIGATION"
44
+ }
45
+
46
+ LEGACY_SUBCATEGORY_ITC_MAP = {
47
+ "Apps.Stickers.Places" => "STICKERS_PLACES_AND_OBJECTS",
48
+ "Apps.Stickers.Emotions" => "STICKERS_EMOJI_AND_EXPRESSIONS",
49
+ "Apps.Stickers.BirthdaysAndCelebrations" => "STICKERS_CELEBRATIONS",
50
+ "Apps.Stickers.Celebrities" => "STICKERS_CELEBRITIES",
51
+ "Apps.Stickers.MoviesAndTV" => "STICKERS_MOVIES_AND_TV",
52
+ "Apps.Stickers.Sports" => "STICKERS_SPORTS_AND_ACTIVITIES",
53
+ "Apps.Stickers.FoodAndDrink" => "STICKERS_EATING_AND_DRINKING",
54
+ "Apps.Stickers.Characters" => "STICKERS_CHARACTERS",
55
+ "Apps.Stickers.Animals" => "STICKERS_ANIMALS",
56
+ "Apps.Stickers.Fashion" => "STICKERS_FASHION",
57
+ "Apps.Stickers.Art" => "STICKERS_ART",
58
+ "Apps.Stickers.Games" => "STICKERS_GAMING",
59
+ "Apps.Stickers.KidsAndFamily" => "STICKERS_KIDS_AND_FAMILY",
60
+ "Apps.Stickers.People" => "STICKERS_PEOPLE",
61
+ "Apps.Stickers.Music" => "STICKERS_MUSIC",
62
+
63
+ "Sports" => "GAMES_SPORTS",
64
+ "Word" => "GAMES_WORD",
65
+ "Music" => "GAMES_MUSIC",
66
+ "Adventure" => "GAMES_ADVENTURE",
67
+ "Action" => "GAMES_ACTION",
68
+ "RolePlaying" => "GAMES_ROLE_PLAYING",
69
+ "Arcade" => "GAMES_CASUAL",
70
+ "Board" => "GAMES_BOARD",
71
+ "Trivia" => "GAMES_TRIVIA",
72
+ "Card" => "GAMES_CARD",
73
+ "Puzzle" => "GAMES_PUZZLE",
74
+ "Casino" => "GAMES_CASINO",
75
+ "Strategy" => "GAMES_STRATEGY",
76
+ "Simulation" => "GAMES_SIMULATION",
77
+ "Racing" => "GAMES_RACING",
78
+ "Family" => "GAMES_FAMILY"
79
+ }
80
+
81
+ def self.map_category_from_itc(category)
82
+ category = category.gsub("MZGenre.", "")
83
+ return nil if category.empty?
84
+ LEGACY_CATEGORY_ITC_MAP[category] || category
85
+ end
86
+
87
+ def self.map_subcategory_from_itc(category)
88
+ category = category.gsub("MZGenre.", "")
89
+ return nil if category.empty?
90
+ LEGACY_SUBCATEGORY_ITC_MAP[category] || category
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,74 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppInfo
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :app_store_state
8
+ attr_accessor :app_store_age_rating
9
+ attr_accessor :brazil_age_rating
10
+ attr_accessor :kids_age_band
11
+
12
+ module AppStoreState
13
+ READY_FOR_SALE = "READY_FOR_SALE"
14
+ WAITING_FOR_REVIEW = "WAITING_FOR_REVIEW"
15
+ DEVELOPER_REJECTED = "DEVELOPER_REJECTED"
16
+ REJECTED = "REJECTED"
17
+ PREPARE_FOR_SUBMISSION = "PREPARE_FOR_SUBMISSION"
18
+ METADATA_REJECTED = "METADATA_REJECTED"
19
+ end
20
+
21
+ module AppStoreAgeRating
22
+ FOUR_PLUS = "FOUR_PLUS"
23
+ end
24
+
25
+ attr_mapping({
26
+ "appStoreState" => "app_store_state",
27
+ "appStoreAgeRating" => "app_store_age_rating",
28
+ "brazilAgeRating" => "brazil_age_rating",
29
+ "kidsAgeBand" => "kids_age_band"
30
+ })
31
+
32
+ def self.type
33
+ return "appInfos"
34
+ end
35
+
36
+ #
37
+ # API
38
+ #
39
+
40
+ def update(filter: {}, includes: nil, limit: nil, sort: nil)
41
+ Spaceship::ConnectAPI.patch_app_info(app_info_id: id)
42
+ end
43
+
44
+ def update_categories(primary_category_id: nil, secondary_category_id: nil, primary_subcategory_one_id: nil, primary_subcategory_two_id: nil, secondary_subcategory_one_id: nil, secondary_subcategory_two_id: nil)
45
+ Spaceship::ConnectAPI.patch_app_info_categories(
46
+ app_info_id: id,
47
+ primary_category_id: primary_category_id,
48
+ secondary_category_id: secondary_category_id,
49
+ primary_subcategory_one_id: primary_subcategory_one_id,
50
+ primary_subcategory_two_id: primary_subcategory_two_id,
51
+ secondary_subcategory_one_id: secondary_subcategory_one_id,
52
+ secondary_subcategory_two_id: secondary_subcategory_two_id
53
+ )
54
+ end
55
+
56
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
57
+ Spaceship::ConnectAPI.delete_app_info(app_info_id: id)
58
+ end
59
+
60
+ #
61
+ # App Info Localizations
62
+ #
63
+
64
+ def create_app_info_localization(attributes: nil)
65
+ resp = Spaceship::ConnectAPI.post_app_info_localization(app_info_id: id, attributes: attributes)
66
+ return resp.to_models.first
67
+ end
68
+
69
+ def get_app_info_localizations(filter: {}, includes: nil, limit: nil, sort: nil)
70
+ return Spaceship::ConnectAPI.get_app_info_localizations(app_info_id: id, filter: filter, includes: includes, limit: limit, sort: sort)
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,38 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppInfoLocalization
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :locale
8
+ attr_accessor :name
9
+ attr_accessor :subtitle
10
+ attr_accessor :privacy_policy_url
11
+ attr_accessor :privacy_policy_text
12
+
13
+ attr_mapping({
14
+ "locale" => "locale",
15
+ "name" => "name",
16
+ "subtitle" => "subtitle",
17
+ "privacyPolicyUrl" => "privacy_policy_url",
18
+ "privacyPolicyText" => "privacy_policy_text"
19
+ })
20
+
21
+ def self.type
22
+ return "appInfoLocalizations"
23
+ end
24
+
25
+ #
26
+ # API
27
+ #
28
+
29
+ def update(attributes: nil)
30
+ Spaceship::ConnectAPI.patch_app_info_localization(app_info_localization_id: id, attributes: attributes)
31
+ end
32
+
33
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
34
+ Spaceship::ConnectAPI.delete_app_info_localization(app_info_localization_id: id)
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,22 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppPrice
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :start_date
8
+
9
+ attr_accessor :price_tier
10
+
11
+ attr_mapping({
12
+ "startDate" => "start_date",
13
+
14
+ "priceTier" => "price_tier"
15
+ })
16
+
17
+ def self.type
18
+ return "appPrices"
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,12 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppPriceTier
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ def self.type
8
+ return "appPriceTiers"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,81 @@
1
+ require_relative '../model'
2
+ module Spaceship
3
+ class ConnectAPI
4
+ class AppReviewAttachment
5
+ include Spaceship::ConnectAPI::Model
6
+
7
+ attr_accessor :file_name
8
+ attr_accessor :source_file_checksum
9
+ attr_accessor :upload_operations
10
+ attr_accessor :asset_delivery_state
11
+ attr_accessor :uploaded
12
+
13
+ attr_mapping({
14
+ "fileName" => "file_name",
15
+ "sourceFileChecksum" => "source_file_checksum",
16
+ "uploadOperations" => "upload_operations",
17
+ "assetDeliveryState" => "asset_delivery_state",
18
+ "uploaded" => "uploaded"
19
+ })
20
+
21
+ def self.type
22
+ return "appReviewAttachments"
23
+ end
24
+
25
+ #
26
+ # API
27
+ #
28
+
29
+ def self.create(app_store_review_detail_id: nil, path: nil)
30
+ require 'faraday'
31
+
32
+ filename = File.basename(path)
33
+ filesize = File.size(path)
34
+ payload = File.binread(path)
35
+
36
+ post_attributes = {
37
+ fileSize: filesize,
38
+ fileName: filename
39
+ }
40
+
41
+ post_resp = Spaceship::ConnectAPI.post_app_review_attachment(app_store_review_detail_id: app_store_review_detail_id, attributes: post_attributes).to_models.first
42
+
43
+ # {
44
+ # "method": "PUT",
45
+ # "url": "https://some-url-apple-gives-us",
46
+ # "length": 57365,
47
+ # "offset": 0,
48
+ # "requestHeaders": [
49
+ # {
50
+ # "name": "Content-Type",
51
+ # "value": "image/png"
52
+ # }
53
+ # ]
54
+ # }
55
+ upload_operation = post_resp.upload_operations.first
56
+
57
+ headers = {}
58
+ upload_operation["requestHeaders"].each do |hash|
59
+ headers[hash["name"]] = hash["value"]
60
+ end
61
+
62
+ Faraday.put(
63
+ upload_operation["url"],
64
+ payload,
65
+ headers
66
+ )
67
+
68
+ patch_attributes = {
69
+ uploaded: true,
70
+ sourceFileChecksum: "checksum-holder"
71
+ }
72
+
73
+ Spaceship::ConnectAPI.patch_app_review_attachment(app_review_attachment_id: post_resp.id, attributes: patch_attributes).to_models.first
74
+ end
75
+
76
+ def delete!(filter: {}, includes: nil, limit: nil, sort: nil)
77
+ Spaceship::ConnectAPI.delete_app_review_attachment(app_review_attachment_id: id)
78
+ end
79
+ end
80
+ end
81
+ end