Class: PushPay::Fund
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#create(params, organization_key: nil) ⇒ Object
Create a fund.
-
#delete(fund_key, organization_key: nil) ⇒ Object
Delete a fund.
-
#find(fund_key, organization_key: nil) ⇒ Object
Get a specific fund.
-
#list(merchant_key: nil, **params) ⇒ Object
List funds for a merchant.
-
#list_for_organization(organization_key: nil, **params) ⇒ Object
List funds for an organization.
-
#update(fund_key, params, organization_key: nil) ⇒ Object
Update a fund.
-
#update_status(fund_key, params, organization_key: nil) ⇒ Object
Change fund status (open/close).
Methods inherited from Base
Constructor Details
This class inherits a constructor from PushPay::Base
Instance Method Details
#create(params, organization_key: nil) ⇒ Object
Create a fund
21 22 23 |
# File 'lib/pushpay/fund.rb', line 21 def create(params, organization_key: nil) client.post("#{organization_path(organization_key)}/funds", params) end |
#delete(fund_key, organization_key: nil) ⇒ Object
Delete a fund
36 37 38 |
# File 'lib/pushpay/fund.rb', line 36 def delete(fund_key, organization_key: nil) client.delete("#{organization_path(organization_key)}/fund/#{fund_key}") end |
#find(fund_key, organization_key: nil) ⇒ Object
Get a specific fund
6 7 8 |
# File 'lib/pushpay/fund.rb', line 6 def find(fund_key, organization_key: nil) client.get("#{organization_path(organization_key)}/fund/#{fund_key}") end |
#list(merchant_key: nil, **params) ⇒ Object
List funds for a merchant
11 12 13 |
# File 'lib/pushpay/fund.rb', line 11 def list(merchant_key: nil, **params) client.get("#{merchant_path(merchant_key)}/funds", params) end |
#list_for_organization(organization_key: nil, **params) ⇒ Object
List funds for an organization
16 17 18 |
# File 'lib/pushpay/fund.rb', line 16 def list_for_organization(organization_key: nil, **params) client.get("#{organization_path(organization_key)}/funds", params) end |
#update(fund_key, params, organization_key: nil) ⇒ Object
Update a fund
26 27 28 |
# File 'lib/pushpay/fund.rb', line 26 def update(fund_key, params, organization_key: nil) client.put("#{organization_path(organization_key)}/fund/#{fund_key}", params) end |
#update_status(fund_key, params, organization_key: nil) ⇒ Object
Change fund status (open/close)
31 32 33 |
# File 'lib/pushpay/fund.rb', line 31 def update_status(fund_key, params, organization_key: nil) client.patch("#{organization_path(organization_key)}/fund/#{fund_key}", params) end |