Class: PR::Pin::Repositories::Ledger

Inherits:
Object
  • Object
show all
Defined in:
lib/pr/pin/repositories/ledger.rb

Instance Method Summary collapse

Instance Method Details

#for_subscription(subscription_token, page: 1, per_page: nil) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/pr/pin/repositories/ledger.rb', line 7

def for_subscription(subscription_token, page: 1, per_page: nil)
  relation = root.for_subscription(subscription_token).with_params(
    page: page,
    per_page: per_page
  )

  API::PaginatedResult.wrap(relation) { relation.paginate }
end