Module: Spaceship::Tunes::IAPStatus
- Defined in:
- spaceship/lib/spaceship/tunes/iap_status.rb
Overview
Defines the different states of an in-app purchase
As specified by Apple: developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/WorkingWithYourProductsStatus.html
Constant Summary collapse
- MISSING_METADATA =
IAP created, but missing screenshot/metadata
"Missing Metadata"
- READY_TO_SUBMIT =
You can edit the metadata, change screenshot and more. Need to submit.
"Ready to Submit"
- WAITING_FOR_REVIEW =
Waiting for Appleās Review
"Waiting For Review"
- IN_REVIEW =
Currently in Review
"In Review"
- APPROVED =
Approved (and currently available)
"Approved"
- DELETED =
Developer deleted
"Deleted"
- REJECTED =
In-app purchase rejected for whatever reason
"Rejected"
- DEVELOPER_REMOVED_FROM_SALE =
The developer took the app from the App Store
"Developer Removed From Sale"
Class Method Summary collapse
-
.get_from_string(text) ⇒ Object
Get the iap status matching based on a string (given by App Store Connect).
Class Method Details
.get_from_string(text) ⇒ Object
Get the iap status matching based on a string (given by App Store Connect)
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'spaceship/lib/spaceship/tunes/iap_status.rb', line 32 def self.get_from_string(text) mapping = { 'missingMetadata' => MISSING_METADATA, 'readyToSubmit' => READY_TO_SUBMIT, 'waitingForReview' => WAITING_FOR_REVIEW, 'inReview' => IN_REVIEW, 'readyForSale' => APPROVED, 'deleted' => DELETED, 'rejected' => REJECTED, 'developerRemovedFromSale' => DEVELOPER_REMOVED_FROM_SALE } mapping.each do |itc_status, readable_status| return readable_status if itc_status == text end return nil end |