Class: CandyCheck::AppStore::SubscriptionVerification
- Inherits:
-
Verification
- Object
- Verification
- CandyCheck::AppStore::SubscriptionVerification
- Defined in:
- lib/candy_check/app_store/subscription_verification.rb
Overview
Verifies a latest_receipt_info block against a verification server. The call return either an ReceiptCollection or a VerificationFailure
Constant Summary
Constants inherited from Verification
Instance Attribute Summary
Attributes inherited from Verification
#endpoint_url, #receipt_data, #secret
Instance Method Summary collapse
-
#call! ⇒ ReceiptCollection, VerificationFailure
Performs the verification against the remote server.
-
#initialize(endpoint_url, receipt_data, secret = nil, product_ids = nil) ⇒ SubscriptionVerification
constructor
Builds a fresh verification run.
Constructor Details
#initialize(endpoint_url, receipt_data, secret = nil, product_ids = nil) ⇒ SubscriptionVerification
Builds a fresh verification run
11 12 13 14 15 16 17 18 19 |
# File 'lib/candy_check/app_store/subscription_verification.rb', line 11 def initialize( endpoint_url, receipt_data, secret = nil, product_ids = nil ) super(endpoint_url, receipt_data, secret) @product_ids = product_ids end |
Instance Method Details
#call! ⇒ ReceiptCollection, VerificationFailure
Performs the verification against the remote server
24 25 26 27 28 29 30 31 |
# File 'lib/candy_check/app_store/subscription_verification.rb', line 24 def call! verify! if valid? build_collection(@response["latest_receipt_info"]) else VerificationFailure.fetch(@response["status"]) end end |