Module: Oja

Defined in:
lib/oja.rb,
lib/oja/cli.rb,
lib/oja/mock.rb,
lib/oja/receipt.rb,
lib/oja/request.rb,
lib/oja/response.rb,
lib/oja/json_receipt.rb,
lib/oja/option_parser.rb

Defined Under Namespace

Classes: CLI, JSONReceipt, Mock, OptionParser, Receipt, Request, Response

Class Method Summary collapse

Class Method Details

.verify(*args) ⇒ Object

Verify a receipt data with the App Store. You can either pass the receipt and password as two arguments or as a option hash.

Receipt data should be raw, not Base64 encoded. It usually begins with ‘{ “signature” = ’.

Example:

Oja.verify(receipt_data, password)
Oja.verify(:data => receipt_data, :password => password)


15
16
17
18
# File 'lib/oja.rb', line 15

def self.verify(*args)
  receipt = Oja::Receipt.new(argument_hash(*args, [:data, :password]))
  receipt.verify
end

.verify_filename(*args) ⇒ Object

Verify a receipt file with the App Store. You can either pass the filename and password as two arguments or as a option hash.

Example:

Oja.verify_filename(filename, password)
Oja.verify(:filename => filename, :password => password)


26
27
28
29
# File 'lib/oja.rb', line 26

def self.verify_filename(*args)
  receipt = Oja::Receipt.new(argument_hash(*args, [:filename, :password]))
  receipt.verify
end