Sha256: 364e46d435d0c5e54ce016138b288d99bf0d67cef0d1760ffc60c20c33513362

Contents?: true

Size: 1.63 KB

Versions: 320

Compression:

Stored size: 1.63 KB

Contents

module Spaceship
  module Tunes
    # Defines the different states of an in-app purchase
    #
    # As specified by Apple: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnectInAppPurchase_Guide/Chapters/WorkingWithYourProductsStatus.html
    module IAPStatus
      # IAP created, but missing screenshot/metadata
      MISSING_METADATA = "Missing Metadata"

      # You can edit the metadata, change screenshot and more. Need to submit.
      READY_TO_SUBMIT = "Ready to Submit"

      # Waiting for Apple's Review
      WAITING_FOR_REVIEW = "Waiting For Review"

      # Currently in Review
      IN_REVIEW = "In Review"

      # Approved (and currently available)
      APPROVED = "Approved"

      # Developer deleted
      DELETED = "Deleted"

      # In-app purchase rejected for whatever reason
      REJECTED = "Rejected"

      # The developer took the app from the App Store
      DEVELOPER_REMOVED_FROM_SALE = "Developer Removed From Sale"

      # Get the iap status matching based on a string (given by iTunes Connect)
      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
    end
  end
end

Version data entries

320 entries across 320 versions & 1 rubygems

Version Path
fastlane-2.86.0.beta.20180319050058 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180318050106 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180317050040 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180316050051 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180315050105 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180314050053 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180313050023 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180312050111 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180311050103 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180310050010 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.86.0.beta.20180309050025 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180308050114 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180307050101 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180306050019 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180305050037 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180304050031 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180303050048 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.85.0.beta.20180302050035 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.84.0 spaceship/lib/spaceship/tunes/iap_status.rb