class AppleReceipt::Receipt

Receipt represents an Apple receipt.

Attributes

certificate[R]
data[R]
signature[R]
version[R]

Public Class Methods

new(raw_receipt) click to toggle source
# File lib/apple_receipt/receipt.rb, line 12
def initialize(raw_receipt)
  receipt_decoded = Base64.decode64(raw_receipt)
  @version,
    @signature,
    @certificate,
    @data = ReceiptParser.parse(receipt_decoded)
end

Public Instance Methods

purchase_info() click to toggle source
# File lib/apple_receipt/receipt.rb, line 20
def purchase_info
  @purchase_info ||= NextStepParser.parse(data)
end
valid?() click to toggle source
# File lib/apple_receipt/receipt.rb, line 24
def valid?
  Validator.new(self).valid?
end