Class: Tikkie::Api::Responses::PaymentRequests
- Includes:
- Enumerable, Pagination
- Defined in:
- lib/tikkie/api/responses/payment_requests.rb
Overview
Response when requesting payment requests (list).
Instance Attribute Summary
Attributes included from Pagination
#elements, #limit, #offset, #total_elements
Attributes inherited from Base
Instance Method Summary collapse
- #each(&block) ⇒ Object
-
#initialize(response, options = {}) ⇒ PaymentRequests
constructor
A new instance of PaymentRequests.
Methods included from Pagination
Methods inherited from Base
#error?, #errors, #response_code, #success?, #trace_id
Constructor Details
#initialize(response, options = {}) ⇒ PaymentRequests
Returns a new instance of PaymentRequests.
11 12 13 14 15 16 17 18 |
# File 'lib/tikkie/api/responses/payment_requests.rb', line 11 def initialize(response, = {}) super(response) @offset = [:offset] @limit = [:limit] @total_elements = data[:totalElements] @elements = payment_requests.count end |
Instance Method Details
#each(&block) ⇒ Object
20 21 22 |
# File 'lib/tikkie/api/responses/payment_requests.rb', line 20 def each(&block) payment_requests.each(&block) end |