Sha256: bb1cfb18f79de35c5c91d23ea413132cbc40378dd327768ccb6c321545eeb53e

Contents?: true

Size: 823 Bytes

Versions: 9

Compression:

Stored size: 823 Bytes

Contents

require 'open_pay_resource'

class Transfers < OpenPayResource

  def create(transfer, customer_id)
    customers=@api_hook.create(:customers)
    customers.create_transfer(customer_id, transfer)
  end

  def all(customer_id)
    customers=@api_hook.create(:customers)
    customers.all_transfers(customer_id)
  end

  def get(transfer, customer_id)
    customers=@api_hook.create(:customers)
    customers.get_transfer(customer_id, transfer)
  end

  def each(customer_id)
    customers=@api_hook.create(:customers)
    customers.each_transfer(customer_id) do |tran|
      yield tran
    end
  end

  def list(search_params, customer_id=nil)
    if customer_id
      customers=@api_hook.create(:customers)
      customers.list_transfers(customer_id, search_params)
    else
      super search_params
    end
  end

end



Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
openpay-2.0.1 lib/openpay/transfers.rb
openpay-2.0.0 lib/openpay/transfers.rb
openpay-2.0.0b lib/openpay/transfers.rb
openpay-1.0.10 lib/openpay/transfers.rb
openpay-1.0.8 lib/openpay/transfers.rb
openpay-1.0.7 lib/openpay/transfers.rb
openpay-1.0.6 lib/openpay/transfers.rb
openpay-1.0.5 lib/openpay/transfers.rb
openpay-1.0.4 lib/openpay/transfers.rb