Class: BtcPay::Client::Api::Store

Inherits:
Base show all
Defined in:
lib/btcpay/client/api/store.rb

Constant Summary collapse

PATH =
'/stores'

Instance Method Summary collapse

Methods inherited from Service

#initialize

Constructor Details

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

Instance Method Details

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



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

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

#create(payload, **opts) ⇒ Object



18
19
20
# File 'lib/btcpay/client/api/store.rb', line 18

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

#delete(store_id, **opts) ⇒ Object



35
36
37
# File 'lib/btcpay/client/api/store.rb', line 35

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

#get(store_id, **opts) ⇒ Object



23
24
25
# File 'lib/btcpay/client/api/store.rb', line 23

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

#invoicesObject

services



42
43
44
# File 'lib/btcpay/client/api/store.rb', line 42

def invoices
  @invoices ||= Api::StoreInvoices.new(client: client)
end

#payment_requestsObject



46
47
48
# File 'lib/btcpay/client/api/store.rb', line 46

def payment_requests
  @payment_requests ||= Api::StorePaymentRequests.new(client: client)
end

#payoutsObject



50
51
52
# File 'lib/btcpay/client/api/store.rb', line 50

def payouts
  @payouts ||= Api::StorePayouts.new(client: client)
end

#pull_paymentsObject



54
55
56
# File 'lib/btcpay/client/api/store.rb', line 54

def pull_payments
  @pull_payments ||= Api::StorePullPayments.new(client: client)
end

#update(store_id, payload, **opts) ⇒ Object Also known as: put



28
29
30
# File 'lib/btcpay/client/api/store.rb', line 28

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