class SynapsePayments::Subscriptions
Public Class Methods
new(client)
click to toggle source
# File lib/synapse_payments/subscriptions.rb, line 4 def initialize(client) @client = client end
Public Instance Methods
all()
click to toggle source
# File lib/synapse_payments/subscriptions.rb, line 8 def all @client.get(path: '/subscriptions') end
create(url:, scope:)
click to toggle source
# File lib/synapse_payments/subscriptions.rb, line 12 def create(url:, scope:) data = { url: url, scope: scope } @client.post(path: "/subscriptions", json: data) end
find(id)
click to toggle source
# File lib/synapse_payments/subscriptions.rb, line 21 def find(id) @client.get(path: "/subscriptions/#{id}") end
update(id, data)
click to toggle source
# File lib/synapse_payments/subscriptions.rb, line 25 def update(id, data) @client.patch(path: "/subscriptions/#{id}", json: data) end