Class: SynapsePayments::Nodes
- Inherits:
-
Object
- Object
- SynapsePayments::Nodes
- Defined in:
- lib/synapse_payments/nodes.rb
Instance Method Summary collapse
- #all ⇒ Object
- #create(data) ⇒ Object
- #delete(id) ⇒ Object
- #find(id) ⇒ Object
-
#initialize(client, user_id, oauth_key, fingerprint) ⇒ Nodes
constructor
A new instance of Nodes.
- #update(id, data) ⇒ Object
Constructor Details
#initialize(client, user_id, oauth_key, fingerprint) ⇒ Nodes
Returns a new instance of Nodes.
4 5 6 7 8 9 |
# 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 |
Instance Method Details
#all ⇒ Object
11 12 13 |
# 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) ⇒ Object
19 20 21 |
# 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) ⇒ Object
23 24 25 |
# 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) ⇒ Object
15 16 17 |
# 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) ⇒ Object
27 28 29 |
# 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 |