class Etsy::Receipt

Public Class Methods

find(*identifiers_and_options) click to toggle source
# File lib/etsy/receipt.rb, line 14
def self.find(*identifiers_and_options)
  find_one_or_more('receipts', identifiers_and_options)
end
find_all_by_shop_id(shop_id, options = {}) click to toggle source
# File lib/etsy/receipt.rb, line 18
def self.find_all_by_shop_id(shop_id, options = {})
  get_all("/shops/#{shop_id}/receipts", options)
end
find_all_by_shop_id_and_status(shop_id, status, options = {}) click to toggle source
# File lib/etsy/receipt.rb, line 22
def self.find_all_by_shop_id_and_status(shop_id, status, options = {})
  get_all("/shops/#{shop_id}/receipts/#{status}", options)
end

Public Instance Methods

buyer() click to toggle source
# File lib/etsy/receipt.rb, line 30
def buyer
  @buyer ||= User.find(buyer_id)
end
created_at() click to toggle source
# File lib/etsy/receipt.rb, line 26
def created_at
  Time.at(created)
end
transactions() click to toggle source
# File lib/etsy/receipt.rb, line 34
def transactions
  unless @transactions
    options = {}
    options = options.merge(:access_token => token, :access_secret => secret) if (token && secret)
    @transactions = Transaction.find_all_by_receipt_id(id, options)
  end
  @transactions
end