Class: Tikkie::Api::Responses::PaymentRequests

Inherits:
Base
  • Object
show all
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

#data, #response

Instance Method Summary collapse

Methods included from Pagination

#more_elements?, #next_offset

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, options = {})
  super(response)

  @offset = options[:offset]
  @limit = options[: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