Class: Button::Merchants

Inherits:
Resource show all
Defined in:
lib/button/resources/merchants.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 available merchants

Parameters:

  • [String] (Hash)

    a customizable set of options

  • [ISO-4217 (Hash)

    a customizable set of options

Returns:



15
16
17
18
19
20
21
# File 'lib/button/resources/merchants.rb', line 15

def all(opts = {})
  query = {}
  query['status'] = opts[:status] if opts[:status]
  query['currency'] = opts[:currency] if opts[:currency]

  api_get('/v1/merchants', query)
end