Class: Pluggy::Services::BillService
- Inherits:
-
BaseService
- Object
- BaseService
- Pluggy::Services::BillService
- Defined in:
- lib/pluggy/services/other_services.rb
Instance Method Summary collapse
-
#list(account_id:) ⇒ Object
GET /bills.
- #retrieve(id) ⇒ Object
-
#transactions(bill, **options) ⇒ Object
Convenience mirroring Bill#transactions.
Methods inherited from BaseService
Constructor Details
This class inherits a constructor from Pluggy::Services::BaseService
Instance Method Details
#list(account_id:) ⇒ Object
GET /bills. Scoped to one credit-card account.
37 38 39 40 41 42 |
# File 'lib/pluggy/services/other_services.rb', line 37 def list(account_id:) require_args!(account_id: account_id) result = list_request("/bills", klass: Resources::Bill, accountId: account_id) annotate_cycles!(result) result end |
#retrieve(id) ⇒ Object
44 45 46 47 |
# File 'lib/pluggy/services/other_services.rb', line 44 def retrieve(id) require_args!(id: id) object_request(:get, "/bills/#{id}", klass: Resources::Bill) end |
#transactions(bill, **options) ⇒ Object
Convenience mirroring Bill#transactions.
50 51 52 53 |
# File 'lib/pluggy/services/other_services.rb', line 50 def transactions(bill, **) bill = retrieve(bill) unless bill.is_a?(Resources::Bill) bill.transactions(**) end |