-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathtransactions.py
More file actions
34 lines (26 loc) · 969 Bytes
/
transactions.py
File metadata and controls
34 lines (26 loc) · 969 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
from client.resource import Resource
class Transactions(Resource):
def all(self, query={}):
return self.with_endpoint('api').request_get(
'transactions', query
)
def create(self, transactions):
return self.with_endpoint('transactions').request_post(
'transactions', data={'transactions': transactions}
)
def get(self, transaction_id):
return self.with_endpoint('api').request_get(
f'transactions/{transaction_id}'
)
def all_unconfirmed(self, query={}):
return self.with_endpoint('api').request_get(
'transactions/unconfirmed', query
)
def get_unconfirmed(self, transaction_id):
return self.with_endpoint('api').request_get(
f'transactions/unconfirmed/{transaction_id}'
)
def configuration(self):
return self.with_endpoint('transactions').request_get(
'configuration'
)