Class: Myfinance::Entities::WebhookCollection

Inherits:
Collection show all
Defined in:
lib/myfinance/entities/webhook_collection.rb

Overview

A wrapper to Myfinance webhook collection

Constant Summary

Constants inherited from Collection

Collection::PAGE_REGEX

Instance Attribute Summary

Attributes inherited from Collection

#collection, #headers, #response

Instance Method Summary collapse

Methods inherited from Collection

#build, build, #first_page, #initialize, #last_page, #next_page, #previous_page

Constructor Details

This class inherits a constructor from Myfinance::Entities::Collection

Instance Method Details

#build_collectionObject



7
8
9
10
11
12
13
# File 'lib/myfinance/entities/webhook_collection.rb', line 7

def build_collection
  response.parsed_body.each do |attributes|
    collection.push(
      Myfinance::Entities::Webhook.new(attributes["webhook"])
    )
  end
end