Class: Skala::AlephAdapter::GetUserFormerLoans

Inherits:
Skala::Adapter::GetUserFormerLoans show all
Defined in:
lib/skala/aleph_adapter/get_user_former_loans.rb

Instance Attribute Summary

Attributes inherited from Skala::Adapter::Operation

#adapter

Instance Method Summary collapse

Methods inherited from Skala::Adapter::Operation

#initialize

Constructor Details

This class inherits a constructor from Skala::Adapter::Operation

Instance Method Details

#call(username, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/skala/aleph_adapter/get_user_former_loans.rb', line 7

def call(username, options = {})
  get_user_loans_result = get_user_loans(username, type: :history)

  self.class::Result.new(
    former_loans: get_user_loans_result.loans,
    source: get_user_loans_result.source
  )
end