Sha256: 5f986e230102d7329bf58472ed214997cb63a07b64c6c0a07f414a23e86835c5

Contents?: true

Size: 374 Bytes

Versions: 2

Compression:

Stored size: 374 Bytes

Contents

module Etsy
  class Transaction
    include Model

    attribute :id, :from => :transaction_id
    attribute :buyer_id, :from => :buyer_user_id
    attributes :quantity, :listing_id

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

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

  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
tailored-etsy-0.2.2 lib/etsy/transaction.rb
etsy-0.2.1 lib/etsy/transaction.rb