Class: BtcPay::Client::Api::StorePaymentRequests

Inherits:
Base
  • Object
show all
Defined in:
lib/btcpay/client/api/store_payment_requests.rb

Constant Summary collapse

PATH =
'/stores/:store_id/payment-requests'

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

This class inherits a constructor from BtcPay::Client::Service

Instance Method Details

#all(store_id, **opts) ⇒ Object Also known as: index



10
11
12
# File 'lib/btcpay/client/api/store_payment_requests.rb', line 10

def all(store_id, **opts)
  client.get(store_path(store_id), options: opts)
end

#create(store_id, payload, **opts) ⇒ Object



17
18
19
# File 'lib/btcpay/client/api/store_payment_requests.rb', line 17

def create(store_id, payload, **opts)
  client.post(store_path(store_id), payload: payload, options: opts)
end

#delete(store_id, request_id, **opts) ⇒ Object



29
30
31
# File 'lib/btcpay/client/api/store_payment_requests.rb', line 29

def delete(store_id, request_id, **opts)
  client.delete(store_path(store_id, request_id), options: opts)
end

#get(store_id, request_id, **opts) ⇒ Object Also known as: find



22
23
24
# File 'lib/btcpay/client/api/store_payment_requests.rb', line 22

def get(store_id, request_id, **opts)
  client.get(store_path(store_id, request_id), options: opts)
end

#update(store_id, request_id, payload, **opts) ⇒ Object



34
35
36
# File 'lib/btcpay/client/api/store_payment_requests.rb', line 34

def update(store_id, request_id, payload, **opts)
  client.put(store_path(store_id, request_id), payload: payload, options: opts)
end