Sha256: e1400f6a3524d97019e94e8a7f68195217a054806c49a66355998edbcd8f7d12

Contents?: true

Size: 1.45 KB

Versions: 282

Compression:

Stored size: 1.45 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"

      # 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
        }

        mapping.each do |itc_status, readable_status|
          return readable_status if itc_status == text
        end

        return nil
      end
    end
  end
end

Version data entries

282 entries across 282 versions & 1 rubygems

Version Path
fastlane-2.48.0.beta.20170721010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.48.0.beta.20170720010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.48.0.beta.20170719010002 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.48.0.beta.20170718010002 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170717010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170716010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170715010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170714010002 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170713010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.1 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170712010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.47.0.beta.20170711010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170710010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170709010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170708010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170707010003 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170706133903 spaceship/lib/spaceship/tunes/iap_status.rb
fastlane-2.46.0.beta.20170706133802 spaceship/lib/spaceship/tunes/iap_status.rb