Class: Button::Transactions

Inherits:
Resource show all
Defined in:
lib/button/resources/transactions.rb

Overview

Constant Summary

Constants inherited from Resource

Resource::USER_AGENT

Instance Attribute Summary

Attributes inherited from Resource

#config

Instance Method Summary collapse

Methods inherited from Resource

#api_delete, #api_get, #api_post, #initialize, #timeout

Constructor Details

This class inherits a constructor from Button::Resource

Instance Method Details

#all(opts = {}) ⇒ Button::Response

Gets a list of transactions

Parameters:

  • [String] (Hash)

    a customizable set of options

  • [ISO-8601 (Hash)

    a customizable set of options

Returns:



17
18
19
20
21
22
23
24
25
# File 'lib/button/resources/transactions.rb', line 17

def all(opts = {})
  query = {}
  query['cursor'] = opts[:cursor] if opts[:cursor]
  query['start'] = opts[:start] if opts[:start]
  query['end'] = opts[:end] if opts[:end]
  query['time_field'] = opts[:time_field] if opts[:time_field]

  api_get('/v1/affiliation/transactions', query)
end