Class: SynapsePay::DepositEndpoint

Inherits:
APIEndpoint show all
Defined in:
lib/synapse_pay/endpoints/deposit_endpoint.rb

Instance Attribute Summary

Attributes inherited from APIEndpoint

#client

Instance Method Summary collapse

Methods inherited from APIEndpoint

#initialize

Constructor Details

This class inherits a constructor from SynapsePay::APIEndpoint

Instance Method Details

#all(params = {}, headers = {}) ⇒ Object



4
5
6
7
8
# File 'lib/synapse_pay/endpoints/deposit_endpoint.rb', line 4

def all(params={}, headers={})
  method = APIMethod.new(:post, "/deposit/show", params, headers, self)
  json = @client.execute(method)
  APIList.new(:Deposit, json[:deposits], method, @client)
end

#create(params = {}, headers = {}) ⇒ Object



10
11
12
13
14
# File 'lib/synapse_pay/endpoints/deposit_endpoint.rb', line 10

def create(params={}, headers={})
  method = APIMethod.new(:post, "/deposit/add", params, headers, self)
  json = @client.execute(method)
  Deposit.new(json[:deposit], method, @client)
end

#micro(params = {}, headers = {}) ⇒ Object



16
17
18
19
20
# File 'lib/synapse_pay/endpoints/deposit_endpoint.rb', line 16

def micro(params={}, headers={})
  method = APIMethod.new(:post, "/deposit/micro", params, headers, self)
  json = @client.execute(method)
  APIList.new(:Deposit, json[:deposits], method, @client)
end