class SynapsePayments::Nodes

Public Class Methods

new(client, user_id, oauth_key, fingerprint) click to toggle source
# File lib/synapse_payments/nodes.rb, line 4
def initialize(client, user_id, oauth_key, fingerprint)
  @client = client
  @user_id = user_id
  @oauth_key = oauth_key
  @fingerprint = fingerprint
end

Public Instance Methods

all() click to toggle source
# File lib/synapse_payments/nodes.rb, line 11
def all
  @client.get(path: "/users/#{@user_id}/nodes", oauth_key: @oauth_key, fingerprint: @fingerprint)
end
create(data) click to toggle source
# File lib/synapse_payments/nodes.rb, line 19
def create(data)
  @client.post(path: "/users/#{@user_id}/nodes", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
end
delete(id) click to toggle source
# File lib/synapse_payments/nodes.rb, line 23
def delete(id)
  @client.delete(path: "/users/#{@user_id}/nodes/#{id}", oauth_key: @oauth_key, fingerprint: @fingerprint)
end
find(id) click to toggle source
# File lib/synapse_payments/nodes.rb, line 15
def find(id)
  @client.get(path: "/users/#{@user_id}/nodes/#{id}", oauth_key: @oauth_key, fingerprint: @fingerprint)
end
update(id, data) click to toggle source
# File lib/synapse_payments/nodes.rb, line 27
def update(id, data)
  @client.patch(path: "/users/#{@user_id}/nodes/#{id}", oauth_key: @oauth_key, fingerprint: @fingerprint, json: data)
end