Class: Skala::Adapter
- Inherits:
-
Object
- Object
- Skala::Adapter
- Defined in:
- lib/skala/adapter.rb
Direct Known Subclasses
Defined Under Namespace
Classes: AuthenticateUser, BadRequestError, CreateUserHoldRequest, DeleteUserHoldRequest, Error, GetRecordHoldableItems, GetRecordItems, GetRecords, GetUser, GetUserFormerLoans, GetUserHoldRequests, GetUserInterLibraryLoans, GetUserLoans, GetUserTransactions, Operation, RenewUserLoan, RenewUserLoans, RequestFailedError, Search, UpdateUser
Instance Method Summary collapse
-
#authenticate_user(*args) ⇒ Object
user(s).
-
#create_user_hold_request(*args) ⇒ Object
user hold request(s).
- #delete_user_hold_request(*args) ⇒ Object
- #get_record_holdable_items(*args) ⇒ Object
-
#get_record_items(*args) ⇒ Object
record item(s).
-
#get_records(*args) ⇒ Object
records.
- #get_user(*args) ⇒ Object
-
#get_user_cash(*args) ⇒ Object
user cash.
-
#get_user_former_loans(*args) ⇒ Object
user loan(s).
- #get_user_hold_requests(*args) ⇒ Object
-
#get_user_inter_library_loans(*args) ⇒ Object
user inter library loans.
- #get_user_loans(*args) ⇒ Object
-
#get_user_transactions(*args) ⇒ Object
user transactions.
- #renew_user_loan(*args) ⇒ Object
- #renew_user_loans(*args) ⇒ Object
-
#search(request, *args) ⇒ Object
TODO: all others are ‘typed’, e.g.
- #update_user(*args) ⇒ Object
Instance Method Details
#authenticate_user(*args) ⇒ Object
user(s)
59 60 61 |
# File 'lib/skala/adapter.rb', line 59 def authenticate_user(*args) self.class::AuthenticateUser.new(self).call(*args) end |
#create_user_hold_request(*args) ⇒ Object
user hold request(s)
81 82 83 |
# File 'lib/skala/adapter.rb', line 81 def create_user_hold_request(*args) self.class::CreateUserHoldRequest.new(self).call(*args) end |
#delete_user_hold_request(*args) ⇒ Object
85 86 87 |
# File 'lib/skala/adapter.rb', line 85 def delete_user_hold_request(*args) self.class::DeleteUserHoldRequest.new(self).call(*args) end |
#get_record_holdable_items(*args) ⇒ Object
52 53 54 |
# File 'lib/skala/adapter.rb', line 52 def get_record_holdable_items(*args) self.class::GetRecordHoldableItems.new(self).call(*args) end |
#get_record_items(*args) ⇒ Object
record item(s)
48 49 50 |
# File 'lib/skala/adapter.rb', line 48 def get_record_items(*args) self.class::GetRecordItems.new(self).call(*args) end |
#get_records(*args) ⇒ Object
records
41 42 43 |
# File 'lib/skala/adapter.rb', line 41 def get_records(*args) self.class::GetRecords.new(self).call(*args) end |
#get_user(*args) ⇒ Object
63 64 65 |
# File 'lib/skala/adapter.rb', line 63 def get_user(*args) self.class::GetUser.new(self).call(*args) end |
#get_user_cash(*args) ⇒ Object
user cash
74 75 76 |
# File 'lib/skala/adapter.rb', line 74 def get_user_cash(*args) self.class::GetUserCash.new(self).call(*args) end |
#get_user_former_loans(*args) ⇒ Object
user loan(s)
103 104 105 |
# File 'lib/skala/adapter.rb', line 103 def get_user_former_loans(*args) self.class::GetUserFormerLoans.new(self).call(*args) end |
#get_user_hold_requests(*args) ⇒ Object
89 90 91 |
# File 'lib/skala/adapter.rb', line 89 def get_user_hold_requests(*args) self.class::GetUserHoldRequests.new(self).call(*args) end |
#get_user_inter_library_loans(*args) ⇒ Object
user inter library loans
96 97 98 |
# File 'lib/skala/adapter.rb', line 96 def get_user_inter_library_loans(*args) self.class::GetUserInterLibraryLoans.new(self).call(*args) end |
#get_user_loans(*args) ⇒ Object
107 108 109 |
# File 'lib/skala/adapter.rb', line 107 def get_user_loans(*args) self.class::GetUserLoans.new(self).call(*args) end |
#get_user_transactions(*args) ⇒ Object
user transactions
122 123 124 |
# File 'lib/skala/adapter.rb', line 122 def get_user_transactions(*args) self.class::GetUserTransactions.new(self).call(*args) end |
#renew_user_loan(*args) ⇒ Object
111 112 113 |
# File 'lib/skala/adapter.rb', line 111 def renew_user_loan(*args) self.class::RenewUserLoan.new(self).call(*args) end |
#renew_user_loans(*args) ⇒ Object
115 116 117 |
# File 'lib/skala/adapter.rb', line 115 def renew_user_loans(*args) self.class::RenewUserLoans.new(self).call(*args) end |
#search(request, *args) ⇒ Object
TODO: all others are ‘typed’, e.g. get_user, get_record_items … should this be typed, too ?
33 34 35 36 |
# File 'lib/skala/adapter.rb', line 33 def search(request, *args) request = request.is_a?(Search::Request) ? request : Search::Request.new(request) self.class::Search.new(self).call(request, *args) end |
#update_user(*args) ⇒ Object
67 68 69 |
# File 'lib/skala/adapter.rb', line 67 def update_user(*args) self.class::UpdateUser.new(self).call(*args) end |