Class: ItunesReceiptDecoder::Decode::TransactionReceipt

Inherits:
Base
  • Object
show all
Defined in:
lib/itunes_receipt_decoder/decode/transaction_receipt.rb

Overview

ItunesReceiptDecoder::Decode::TransactionReceipt

Instance Attribute Summary

Attributes inherited from Base

#options, #raw_receipt

Instance Method Summary collapse

Methods inherited from Base

#initialize, #production?, #receipt, #sandbox?

Constructor Details

This class inherits a constructor from ItunesReceiptDecoder::Decode::Base

Instance Method Details

#decodeObject

Decodes the receipt



12
13
14
15
# File 'lib/itunes_receipt_decoder/decode/transaction_receipt.rb', line 12

def decode
  @receipt ||= purchase_info
  self
end

#environmentObject

Gets the environment from the payload



25
26
27
# File 'lib/itunes_receipt_decoder/decode/transaction_receipt.rb', line 25

def environment
  payload['environment']
end

#styleObject

Just returns :transaction



19
20
21
# File 'lib/itunes_receipt_decoder/decode/transaction_receipt.rb', line 19

def style
  :transaction
end