Class: Spaceship::Tunes::AppSubmission
- Defined in:
- spaceship/lib/spaceship/tunes/app_submission.rb
Overview
Represents a submission for review of an App Store Connect Application This class handles the submission of all review information and documents
Instance Attribute Summary collapse
-
#add_id_info_limits_tracking ⇒ Boolean
deprecated
Deprecated.
Setted automatically by
add_id_info_uses_idfa
usage -
#add_id_info_serves_ads ⇒ Boolean
Ad ID Info - Serves ads.
-
#add_id_info_tracks_action ⇒ Boolean
Ad ID Info - Tracks actions.
-
#add_id_info_tracks_install ⇒ Boolean
Ad ID Info - Tracks installs.
-
#add_id_info_uses_idfa ⇒ Boolean
Ad ID Info - Uses idfa.
-
#application ⇒ Spaceship::Tunes::Application
A reference to the application this submission is for.
-
#content_rights_contains_third_party_content ⇒ Boolean
Content Rights - Contains third party content.
-
#content_rights_has_rights ⇒ Boolean
Content Rights - Has rights of content.
-
#export_compliance_app_type ⇒ String
Export Compliance - App type.
-
#export_compliance_available_on_french_store ⇒ Boolean
Export Compliance - Available on French Store.
-
#export_compliance_ccat_file ⇒ Not Yet Implemented
Export Compliance - CCAT File.
-
#export_compliance_compliance_required ⇒ Boolean
Export Compliance - Compliance Required.
-
#export_compliance_contains_proprietary_cryptography ⇒ Boolean
Export Compliance - Contains proprietary cryptography.
-
#export_compliance_contains_third_party_cryptography ⇒ Boolean
Export Compliance - Contains third-party cryptography.
-
#export_compliance_encryption_updated ⇒ Boolean
Export Compliance - Encryption Updated.
-
#export_compliance_is_exempt ⇒ Boolean
Export Compliance - Is exempt.
-
#export_compliance_platform ⇒ String
Export Compliance - Platform.
-
#export_compliance_uses_encryption ⇒ Boolean
Export Compliance - Uses encryption.
-
#platform ⇒ String
The platform of the device.
-
#submitted_for_review ⇒ Boolean
Submitted for Review.
-
#version ⇒ AppVersion
The version to use for this submission.
Attributes inherited from Base
Class Method Summary collapse
- .create(application, version, platform: nil) ⇒ Object
-
.factory(attrs) ⇒ Object
Create a new object based on a hash.
Instance Method Summary collapse
-
#complete! ⇒ Object
Save and complete the app submission.
- #setup ⇒ Object
Methods inherited from TunesBase
Methods inherited from Base
attr_accessor, attr_mapping, #attributes, attributes, #initialize, #inspect, mapping_module, method_missing, set_client, #to_s
Constructor Details
This class inherits a constructor from Spaceship::Base
Instance Attribute Details
#add_id_info_limits_tracking ⇒ Boolean
Setted automatically by add_id_info_uses_idfa
usage
DEPRECATED: Use add_id_info_uses_idfa
instead.
28 29 30 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 28 def add_id_info_limits_tracking @add_id_info_limits_tracking end |
#add_id_info_serves_ads ⇒ Boolean
Returns Ad ID Info - Serves ads.
31 32 33 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 31 def add_id_info_serves_ads @add_id_info_serves_ads end |
#add_id_info_tracks_action ⇒ Boolean
Returns Ad ID Info - Tracks actions.
34 35 36 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 34 def add_id_info_tracks_action @add_id_info_tracks_action end |
#add_id_info_tracks_install ⇒ Boolean
Returns Ad ID Info - Tracks installs.
37 38 39 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 37 def add_id_info_tracks_install @add_id_info_tracks_install end |
#add_id_info_uses_idfa ⇒ Boolean
Returns Ad ID Info - Uses idfa.
40 41 42 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 40 def add_id_info_uses_idfa @add_id_info_uses_idfa end |
#application ⇒ Spaceship::Tunes::Application
Returns A reference to the application this submission is for.
10 11 12 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 10 def application @application end |
#content_rights_contains_third_party_content ⇒ Boolean
Returns Content Rights - Contains third party content.
43 44 45 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 43 def content_rights_contains_third_party_content @content_rights_contains_third_party_content end |
#content_rights_has_rights ⇒ Boolean
Returns Content Rights - Has rights of content.
46 47 48 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 46 def content_rights_has_rights @content_rights_has_rights end |
#export_compliance_app_type ⇒ String
Returns Export Compliance - App type.
67 68 69 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 67 def export_compliance_app_type @export_compliance_app_type end |
#export_compliance_available_on_french_store ⇒ Boolean
Returns Export Compliance - Available on French Store.
49 50 51 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 49 def export_compliance_available_on_french_store @export_compliance_available_on_french_store end |
#export_compliance_ccat_file ⇒ Not Yet Implemented
Returns Export Compliance - CCAT File.
52 53 54 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 52 def export_compliance_ccat_file @export_compliance_ccat_file end |
#export_compliance_compliance_required ⇒ Boolean
Returns Export Compliance - Compliance Required.
73 74 75 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 73 def export_compliance_compliance_required @export_compliance_compliance_required end |
#export_compliance_contains_proprietary_cryptography ⇒ Boolean
Returns Export Compliance - Contains proprietary cryptography.
55 56 57 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 55 def export_compliance_contains_proprietary_cryptography @export_compliance_contains_proprietary_cryptography end |
#export_compliance_contains_third_party_cryptography ⇒ Boolean
Returns Export Compliance - Contains third-party cryptography.
58 59 60 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 58 def export_compliance_contains_third_party_cryptography @export_compliance_contains_third_party_cryptography end |
#export_compliance_encryption_updated ⇒ Boolean
Returns Export Compliance - Encryption Updated.
70 71 72 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 70 def export_compliance_encryption_updated @export_compliance_encryption_updated end |
#export_compliance_is_exempt ⇒ Boolean
Returns Export Compliance - Is exempt.
61 62 63 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 61 def export_compliance_is_exempt @export_compliance_is_exempt end |
#export_compliance_platform ⇒ String
Returns Export Compliance - Platform.
76 77 78 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 76 def export_compliance_platform @export_compliance_platform end |
#export_compliance_uses_encryption ⇒ Boolean
Returns Export Compliance - Uses encryption.
64 65 66 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 64 def export_compliance_uses_encryption @export_compliance_uses_encryption end |
#platform ⇒ String
Returns The platform of the device. This is usually “ios”.
18 19 20 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 18 def platform @platform end |
#submitted_for_review ⇒ Boolean
Returns Submitted for Review.
21 22 23 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 21 def submitted_for_review @submitted_for_review end |
#version ⇒ AppVersion
Returns The version to use for this submission.
13 14 15 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 13 def version @version end |
Class Method Details
.create(application, version, platform: nil) ⇒ Object
123 124 125 126 127 128 129 130 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 123 def create(application, version, platform: nil) attrs = client.prepare_app_submissions(application.apple_id, application.edit_version(platform: platform).version_id) attrs[:application] = application attrs[:version] = version attrs[:platform] = platform return self.factory(attrs) end |
.factory(attrs) ⇒ Object
Create a new object based on a hash. This is used to create a new object based on the server response.
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 105 def factory(attrs) # fill content rights section if iTC returns nil if attrs["contentRights"].nil? attrs["contentRights"] = { "containsThirdPartyContent" => { "value" => nil }, "hasRights" => { "value" => nil } } end obj = self.new(attrs) return obj end |
Instance Method Details
#complete! ⇒ Object
Save and complete the app submission
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 134 def complete! raw_data_clone = raw_data.dup if self.content_rights_has_rights.nil? || self.content_rights_contains_third_party_content.nil? raw_data_clone.set(["contentRights"], nil) end raw_data_clone.delete(:version) raw_data_clone.delete(:application) # Check whether the application makes use of IDFA or not # and automatically set the mandatory limitsTracking value in the request JSON accordingly. if !self.add_id_info_uses_idfa.nil? && self.add_id_info_uses_idfa == true # Application uses IDFA, before sending for submission limitsTracking key in the request JSON must be set to true (agreement). raw_data_clone.set( ["adIdInfo", "limitsTracking", "value"], true ) end client.send_app_submission(application.apple_id, application.edit_version(platform: platform).version_id, raw_data_clone) @submitted_for_review = true end |
#setup ⇒ Object
156 157 158 |
# File 'spaceship/lib/spaceship/tunes/app_submission.rb', line 156 def setup @submitted_for_review = false end |