Class: PushPay::Batch

Inherits:
Base
  • Object
show all
Defined in:
lib/pushpay/batch.rb

Instance Attribute Summary

Attributes inherited from Base

#client

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PushPay::Base

Instance Method Details

#find(batch_key, merchant_key: nil) ⇒ Object

Get a specific batch



6
7
8
# File 'lib/pushpay/batch.rb', line 6

def find(batch_key, merchant_key: nil)
  client.get("#{merchant_path(merchant_key)}/batch/#{batch_key}")
end

#list(merchant_key: nil, **params) ⇒ Object

List batches for a merchant



11
12
13
# File 'lib/pushpay/batch.rb', line 11

def list(merchant_key: nil, **params)
  client.get("#{merchant_path(merchant_key)}/batches", params)
end

#list_for_organization(organization_key: nil, **params) ⇒ Object

List batches for an organization



16
17
18
# File 'lib/pushpay/batch.rb', line 16

def list_for_organization(organization_key: nil, **params)
  client.get("#{organization_path(organization_key)}/batches", params)
end

#payments(batch_key, merchant_key: nil, **params) ⇒ Object

Get payments within a batch



21
22
23
# File 'lib/pushpay/batch.rb', line 21

def payments(batch_key, merchant_key: nil, **params)
  client.get("#{merchant_path(merchant_key)}/batch/#{batch_key}/payments", params)
end