Class: Etsy::Transaction

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/etsy/transaction.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Model

included, #initialize, #result, #secret, #token

Class Method Details

.find_all_by_buyer_id(user_id, options = {}) ⇒ Object

Find all Transactions by the buyer_id



15
16
17
# File 'lib/etsy/transaction.rb', line 15

def self.find_all_by_buyer_id(user_id, options = {})
  get_all("/users/#{user_id}/transactions", options)
end

.find_all_by_shop_id(shop_id, options = {}) ⇒ Object



9
10
11
# File 'lib/etsy/transaction.rb', line 9

def self.find_all_by_shop_id(shop_id, options = {})
  get_all("/shops/#{shop_id}/transactions", options)
end

Instance Method Details

#buyerObject



19
20
21
# File 'lib/etsy/transaction.rb', line 19

def buyer
  @buyer ||= User.find(buyer_id)
end