Sha256: 2566131ed515a3e90a21f8f5cf3709bdfe21aa319b2f97492f572c91b55f3510

Contents?: true

Size: 615 Bytes

Versions: 2

Compression:

Stored size: 615 Bytes

Contents

module SynapsePayments
  class Nodes

    def initialize(client, user_id, oauth_key)
      @client = client
      @user_id = user_id
      @oauth_key = oauth_key
    end

    def all
      @client.get(path: "/users/#{@user_id}/nodes", oauth_key: @oauth_key)
    end

    def find(id)
      @client.get(path: "/users/#{@user_id}/nodes/#{id}", oauth_key: @oauth_key)
    end

    def create(data)
      @client.post(path: "/users/#{@user_id}/nodes", oauth_key: @oauth_key, json: data)
    end

    def delete(id)
      @client.delete(path: "/users/#{@user_id}/nodes/#{id}", oauth_key: @oauth_key)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
synapse_payments-0.1.1 lib/synapse_payments/nodes.rb
synapse_payments-0.1.0 lib/synapse_payments/nodes.rb