Class: PushPay::RecurringPayment

Inherits:
Base
  • Object
show all
Defined in:
lib/pushpay/recurring_payment.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(payment_token, merchant_key: nil) ⇒ Object

Get a single recurring payment by token



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

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

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

List recurring payments for a merchant



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

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

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

List recurring payments across an organization



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

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

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

List payments linked to a recurring payment schedule



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

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