Skip to content

Commit 874c4bd

Browse files
committed
SP-943 Change payment_subtotals and payment_totals to Decimal
1 parent 2ebabb3 commit 874c4bd

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
Invoice
33
"""
4-
4+
from decimal import *
55
from typing import List, Union, Dict
66
from pydantic import Field
77
from .buyer import Buyer
@@ -41,8 +41,8 @@ class Invoice(BitPayModel):
4141
item_code: Union[str, None] = None
4242
physical: Union[bool, None] = False
4343
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
44+
payment_subtotals: Union[Dict[str, Decimal], None] = None
45+
payment_totals: Union[Dict[str, Decimal], None] = None
4646
payment_display_totals: Union[Dict[str, str], None] = None
4747
payment_display_subtotals: Union[Dict[str, str], None] = None
4848
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)