Class: Spaceship::ConnectAPI::AppStoreVersion
- Inherits:
-
Object
- Object
- Spaceship::ConnectAPI::AppStoreVersion
- Includes:
- Model
- Defined in:
- spaceship/lib/spaceship/connect_api/models/app_store_version.rb
Defined Under Namespace
Modules: AppStoreState, AppVersionState, ReleaseType, ReviewType
Constant Summary collapse
- ESSENTIAL_INCLUDES =
[ "appStoreVersionSubmission", "build" ].join(",")
Instance Attribute Summary collapse
-
#app_store_review_detail ⇒ Object
Returns the value of attribute app_store_review_detail.
-
#app_store_state ⇒ Object
Returns the value of attribute app_store_state.
-
#app_store_version_localizations ⇒ Object
Returns the value of attribute app_store_version_localizations.
-
#app_store_version_phased_release ⇒ Object
Returns the value of attribute app_store_version_phased_release.
-
#app_store_version_submission ⇒ Object
Returns the value of attribute app_store_version_submission.
-
#app_version_state ⇒ Object
Returns the value of attribute app_version_state.
-
#copyright ⇒ Object
Returns the value of attribute copyright.
-
#created_date ⇒ Object
Returns the value of attribute created_date.
-
#downloadable ⇒ Object
Returns the value of attribute downloadable.
-
#earliest_release_date ⇒ Object
2020-06-17T12:00:00-07:00.
-
#is_watch_only ⇒ Object
Returns the value of attribute is_watch_only.
-
#platform ⇒ Object
Returns the value of attribute platform.
-
#release_type ⇒ Object
Returns the value of attribute release_type.
-
#review_type ⇒ Object
Returns the value of attribute review_type.
-
#store_icon ⇒ Object
Returns the value of attribute store_icon.
-
#version_string ⇒ Object
Returns the value of attribute version_string.
-
#watch_store_icon ⇒ Object
Returns the value of attribute watch_store_icon.
Attributes included from Model
Class Method Summary collapse
-
.get(client: nil, app_store_version_id: nil, includes: nil, limit: nil, sort: nil) ⇒ Object
app,routingAppCoverage,resetRatingsRequest,appStoreVersionSubmission,appStoreVersionPhasedRelease,ageRatingDeclaration,appStoreReviewDetail,gameCenterConfiguration.
- .type ⇒ Object
Instance Method Summary collapse
- #can_reject? ⇒ Boolean
-
#create_app_store_review_detail(client: nil, attributes: nil) ⇒ Object
App Store Review Detail.
-
#create_app_store_version_localization(client: nil, attributes: nil) ⇒ Object
App Store Version Localizations.
- #create_app_store_version_phased_release(client: nil, attributes: nil) ⇒ Object
-
#create_app_store_version_release_request(client: nil) ⇒ Object
App Store Version Release Requests.
- #create_app_store_version_submission(client: nil) ⇒ Object
- #create_reset_ratings_request(client: nil) ⇒ Object
- #fetch_age_rating_declaration(client: nil) ⇒ Object deprecated Deprecated.
- #fetch_app_store_review_detail(client: nil, includes: "appStoreReviewAttachments") ⇒ Object
-
#fetch_app_store_version_phased_release(client: nil) ⇒ Object
App Store Version Phased Releases.
-
#fetch_app_store_version_submission(client: nil) ⇒ Object
App Store Version Submissions.
-
#fetch_reset_ratings_request(client: nil) ⇒ Object
Reset Ratings Requests.
- #get_app_store_version_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
-
#get_build(client: nil, build_id: nil) ⇒ Object
Build.
- #reject! ⇒ Object
- #select_build(client: nil, build_id: nil) ⇒ Object
- #update(client: nil, attributes: nil) ⇒ Object
Methods included from Model
#attr_mapping, included, #initialize, #reverse_attr_mapping, #to_json, #update_attributes
Instance Attribute Details
#app_store_review_detail ⇒ Object
Returns the value of attribute app_store_review_detail.
26 27 28 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 26 def app_store_review_detail @app_store_review_detail end |
#app_store_state ⇒ Object
Returns the value of attribute app_store_state.
12 13 14 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 12 def app_store_state @app_store_state end |
#app_store_version_localizations ⇒ Object
Returns the value of attribute app_store_version_localizations.
27 28 29 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 27 def app_store_version_localizations @app_store_version_localizations end |
#app_store_version_phased_release ⇒ Object
Returns the value of attribute app_store_version_phased_release.
25 26 27 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 25 def app_store_version_phased_release @app_store_version_phased_release end |
#app_store_version_submission ⇒ Object
Returns the value of attribute app_store_version_submission.
24 25 26 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 24 def app_store_version_submission @app_store_version_submission end |
#app_version_state ⇒ Object
Returns the value of attribute app_version_state.
13 14 15 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 13 def app_version_state @app_version_state end |
#copyright ⇒ Object
Returns the value of attribute copyright.
16 17 18 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 16 def copyright @copyright end |
#created_date ⇒ Object
Returns the value of attribute created_date.
21 22 23 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 21 def created_date @created_date end |
#downloadable ⇒ Object
Returns the value of attribute downloadable.
20 21 22 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 20 def downloadable @downloadable end |
#earliest_release_date ⇒ Object
2020-06-17T12:00:00-07:00
18 19 20 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 18 def earliest_release_date @earliest_release_date end |
#is_watch_only ⇒ Object
Returns the value of attribute is_watch_only.
19 20 21 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 19 def is_watch_only @is_watch_only end |
#platform ⇒ Object
Returns the value of attribute platform.
10 11 12 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 10 def platform @platform end |
#release_type ⇒ Object
Returns the value of attribute release_type.
17 18 19 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 17 def release_type @release_type end |
#review_type ⇒ Object
Returns the value of attribute review_type.
22 23 24 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 22 def review_type @review_type end |
#store_icon ⇒ Object
Returns the value of attribute store_icon.
14 15 16 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 14 def store_icon @store_icon end |
#version_string ⇒ Object
Returns the value of attribute version_string.
11 12 13 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 11 def version_string @version_string end |
#watch_store_icon ⇒ Object
Returns the value of attribute watch_store_icon.
15 16 17 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 15 def watch_store_icon @watch_store_icon end |
Class Method Details
.get(client: nil, app_store_version_id: nil, includes: nil, limit: nil, sort: nil) ⇒ Object
app,routingAppCoverage,resetRatingsRequest,appStoreVersionSubmission,appStoreVersionPhasedRelease,ageRatingDeclaration,appStoreReviewDetail,gameCenterConfiguration
129 130 131 132 133 134 135 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 129 def self.get(client: nil, app_store_version_id: nil, includes: nil, limit: nil, sort: nil) client ||= Spaceship::ConnectAPI return client.get_app_store_version( app_store_version_id: app_store_version_id, includes: includes ).first end |
.type ⇒ Object
109 110 111 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 109 def self.type return "appStoreVersions" end |
Instance Method Details
#can_reject? ⇒ Boolean
113 114 115 116 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 113 def can_reject? raise "No app_store_version_submission included" unless app_store_version_submission return app_store_version_submission.can_reject end |
#create_app_store_review_detail(client: nil, attributes: nil) ⇒ Object
App Store Review Detail
171 172 173 174 175 176 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 171 def create_app_store_review_detail(client: nil, attributes: nil) client ||= Spaceship::ConnectAPI attributes = Spaceship::ConnectAPI::AppStoreReviewDetail.reverse_attr_mapping(attributes) resp = client.post_app_store_review_detail(app_store_version_id: id, attributes: attributes) return resp.to_models.first end |
#create_app_store_version_localization(client: nil, attributes: nil) ⇒ Object
App Store Version Localizations
156 157 158 159 160 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 156 def create_app_store_version_localization(client: nil, attributes: nil) client ||= Spaceship::ConnectAPI resp = client.post_app_store_version_localization(app_store_version_id: id, attributes: attributes) return resp.to_models.first end |
#create_app_store_version_phased_release(client: nil, attributes: nil) ⇒ Object
194 195 196 197 198 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 194 def create_app_store_version_phased_release(client: nil, attributes: nil) client ||= Spaceship::ConnectAPI resp = client.post_app_store_version_phased_release(app_store_version_id: id, attributes: attributes) return resp.to_models.first end |
#create_app_store_version_release_request(client: nil) ⇒ Object
App Store Version Release Requests
220 221 222 223 224 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 220 def create_app_store_version_release_request(client: nil) client ||= Spaceship::ConnectAPI resp = client.post_app_store_version_release_request(app_store_version_id: id) return resp.to_models.first end |
#create_app_store_version_submission(client: nil) ⇒ Object
210 211 212 213 214 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 210 def create_app_store_version_submission(client: nil) client ||= Spaceship::ConnectAPI resp = client.post_app_store_version_submission(app_store_version_id: id) return resp.to_models.first end |
#create_reset_ratings_request(client: nil) ⇒ Object
252 253 254 255 256 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 252 def (client: nil) client ||= Spaceship::ConnectAPI resp = client.(app_store_version_id: id) return resp.to_models.first end |
#fetch_age_rating_declaration(client: nil) ⇒ Object
148 149 150 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 148 def (client: nil) raise 'AppStoreVersion no longer has AgeRatingDeclaration as of App Store Connect API 1.3 - Use AppInfo instead' end |
#fetch_app_store_review_detail(client: nil, includes: "appStoreReviewAttachments") ⇒ Object
178 179 180 181 182 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 178 def fetch_app_store_review_detail(client: nil, includes: "appStoreReviewAttachments") client ||= Spaceship::ConnectAPI resp = client.get_app_store_review_detail(app_store_version_id: id, includes: includes) return resp.to_models.first end |
#fetch_app_store_version_phased_release(client: nil) ⇒ Object
App Store Version Phased Releases
188 189 190 191 192 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 188 def fetch_app_store_version_phased_release(client: nil) client ||= Spaceship::ConnectAPI resp = client.get_app_store_version_phased_release(app_store_version_id: id) return resp.to_models.first end |
#fetch_app_store_version_submission(client: nil) ⇒ Object
App Store Version Submissions
204 205 206 207 208 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 204 def fetch_app_store_version_submission(client: nil) client ||= Spaceship::ConnectAPI resp = client.get_app_store_version_submission(app_store_version_id: id) return resp.to_models.first end |
#fetch_reset_ratings_request(client: nil) ⇒ Object
Reset Ratings Requests
246 247 248 249 250 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 246 def (client: nil) client ||= Spaceship::ConnectAPI resp = client.(app_store_version_id: id) return resp.to_models.first end |
#get_app_store_version_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) ⇒ Object
162 163 164 165 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 162 def get_app_store_version_localizations(client: nil, filter: {}, includes: nil, limit: nil, sort: nil) client ||= Spaceship::ConnectAPI return Spaceship::ConnectAPI::AppStoreVersionLocalization.all(client: client, app_store_version_id: id, filter: filter, includes: includes, limit: limit, sort: sort) end |
#get_build(client: nil, build_id: nil) ⇒ Object
Build
230 231 232 233 234 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 230 def get_build(client: nil, build_id: nil) client ||= Spaceship::ConnectAPI resp = client.get_build(app_store_version_id: id, build_id: build_id) return resp.to_models.first end |
#reject! ⇒ Object
118 119 120 121 122 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 118 def reject! return false unless can_reject? app_store_version_submission.delete! return true end |
#select_build(client: nil, build_id: nil) ⇒ Object
236 237 238 239 240 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 236 def select_build(client: nil, build_id: nil) client ||= Spaceship::ConnectAPI resp = client.patch_app_store_version_with_build(app_store_version_id: id, build_id: build_id) return resp.to_models.first end |
#update(client: nil, attributes: nil) ⇒ Object
137 138 139 140 141 |
# File 'spaceship/lib/spaceship/connect_api/models/app_store_version.rb', line 137 def update(client: nil, attributes: nil) client ||= Spaceship::ConnectAPI attributes = reverse_attr_mapping(attributes) return client.patch_app_store_version(app_store_version_id: id, attributes: attributes).first end |