Skip to content

Commit 3c798de

Browse files
authored
Merge pull request #111 from bobbrodie/SP-943
SP-943 Python SDK should handle scientific notation
2 parents 2ebabb3 + a612bd1 commit 3c798de

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "bitpay"
7-
version = "6.0.2"
7+
version = "6.0.3"
88
authors = [
99
{ name="Antonio Buedo", email="[email protected]" },
1010
]

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_v6.0.2"
8+
BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v6.0.3"
99
BITPAY_API_FRAME = "std"
1010
BITPAY_API_FRAME_VERSION = "1.0.0"

src/bitpay/models/invoice/invoice.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Invoice
33
"""
44

5+
from decimal import *
56
from typing import List, Union, Dict
67
from pydantic import Field
78
from .buyer import Buyer
@@ -41,8 +42,8 @@ class Invoice(BitPayModel):
4142
item_code: Union[str, None] = None
4243
physical: Union[bool, None] = False
4344
payment_currencies: Union[List[str], None] = None
44-
payment_subtotals: Union[Dict[str, int], None] = None
45-
payment_totals: Union[Dict[str, int], None] = None
45+
payment_subtotals: Union[Dict[str, Decimal], None] = None
46+
payment_totals: Union[Dict[str, Decimal], None] = None
4647
payment_display_totals: Union[Dict[str, str], None] = None
4748
payment_display_subtotals: Union[Dict[str, str], None] = None
4849
payment_codes: Union[Dict[str, Dict[str, str]], None] = None

src/bitpay/models/invoice/invoice_webhook.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from decimal import *
12
from typing import Union, Dict
23

34
from bitpay.models.bitpay_model import BitPayModel
@@ -14,8 +15,8 @@ class InvoiceWebhook(BitPayModel):
1415
id: Union[str, None] = None
1516
invoice_time: Union[str, None] = None
1617
order_id: Union[str, None] = None
17-
payment_subtotals: Union[Dict[str, int], None] = None
18-
payment_totals: Union[Dict[str, int], None] = None
18+
payment_subtotals: Union[Dict[str, Decimal], None] = None
19+
payment_totals: Union[Dict[str, Decimal], None] = None
1920
pos_data: Union[str, None] = None
2021
price: Union[float, None] = None
2122
status: Union[str, None] = None

0 commit comments

Comments
 (0)