Skip to content

Commit 4a7a1e7

Browse files
SP-527 Make Python SDK at parity with API
1 parent c56cc84 commit 4a7a1e7

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/bitpay/client.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Class Client
33
package Bitpay
44
author Antonio Buedo
5-
version 14.3.2203
5+
version 4.0.0
66
See bitpay.com/api for more information.
77
"""
88
import os
@@ -50,14 +50,18 @@ class Client:
5050
* See bitpay.com/api for more information.
5151
"""
5252

53-
__guid_generator = None
54-
__bitpay_client = None
55-
__token_container = None
53+
__bitpay_client = BitPayClient
54+
__token_container = TokenContainer
55+
__guid_generator = GuidGenerator
5656

57-
def __init__(self, bitpay_client, token_container, guid_generator):
57+
def __init__(
58+
self, bitpay_client: BitPayClient, token_container: TokenContainer, guid_generator: GuidGenerator = None
59+
):
5860
try:
5961
self.__bitpay_client = bitpay_client
6062
self.__token_container = token_container
63+
if guid_generator is None:
64+
guid_generator = GuidGenerator()
6165
self.__guid_generator = guid_generator
6266
except Exception as exe:
6367
raise BitPayException("failed to initiate client: " + str(exe))

src/bitpay/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ class Config(Enum):
55
TEST_URL = "https://test.bitpay.com/"
66
PROD_URL = "https://bitpay.com/"
77
BITPAY_API_VERSION = "2.0.0"
8-
BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v3.4.2203"
8+
BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v4.0.2203"
99
BITPAY_API_FRAME = "std"
1010
BITPAY_API_FRAME_VERSION = "1.0.0"

0 commit comments

Comments
 (0)