Class: CandyCheck::CLI::Commands::PlayStore
- Defined in:
- lib/candy_check/cli/commands/play_store.rb
Overview
Command to verify an PlayStore purchase
Instance Method Summary collapse
-
#initialize(package_name, product_id, token, options) ⇒ PlayStore
constructor
Prepare a verification run from the terminal.
-
#run ⇒ Object
Print the result of the verification to the terminal.
Methods inherited from Base
Constructor Details
#initialize(package_name, product_id, token, options) ⇒ PlayStore
Prepare a verification run from the terminal
12 13 14 15 16 17 |
# File 'lib/candy_check/cli/commands/play_store.rb', line 12 def initialize(package_name, product_id, token, ) @package = package_name @product_id = product_id @token = token super() end |
Instance Method Details
#run ⇒ Object
Print the result of the verification to the terminal
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/candy_check/cli/commands/play_store.rb', line 20 def run verifier = CandyCheck::PlayStore::Verifier.new(authorization: ) result = verifier.verify_product_purchase( package_name: @package, product_id: @product_id, token: @token, ) out.print "#{result.class}:" out.pretty result end |