Skip to content

Commit

Permalink
Merge pull request #111 from bobbrodie/SP-943
Browse files Browse the repository at this point in the history
SP-943 Python SDK should handle scientific notation
  • Loading branch information
bobbrodie authored May 20, 2024
2 parents 2ebabb3 + a612bd1 commit 3c798de
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "bitpay"
version = "6.0.2"
version = "6.0.3"
authors = [
{ name="Antonio Buedo", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/bitpay/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ class Config(Enum):
TEST_URL = "https://test.bitpay.com/"
PROD_URL = "https://bitpay.com/"
BITPAY_API_VERSION = "2.0.0"
BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v6.0.2"
BITPAY_PLUGIN_INFO = "BitPay_Python_Client_v6.0.3"
BITPAY_API_FRAME = "std"
BITPAY_API_FRAME_VERSION = "1.0.0"
5 changes: 3 additions & 2 deletions src/bitpay/models/invoice/invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Invoice
"""

from decimal import *
from typing import List, Union, Dict
from pydantic import Field
from .buyer import Buyer
Expand Down Expand Up @@ -41,8 +42,8 @@ class Invoice(BitPayModel):
item_code: Union[str, None] = None
physical: Union[bool, None] = False
payment_currencies: Union[List[str], None] = None
payment_subtotals: Union[Dict[str, int], None] = None
payment_totals: Union[Dict[str, int], None] = None
payment_subtotals: Union[Dict[str, Decimal], None] = None
payment_totals: Union[Dict[str, Decimal], None] = None
payment_display_totals: Union[Dict[str, str], None] = None
payment_display_subtotals: Union[Dict[str, str], None] = None
payment_codes: Union[Dict[str, Dict[str, str]], None] = None
Expand Down
5 changes: 3 additions & 2 deletions src/bitpay/models/invoice/invoice_webhook.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from decimal import *
from typing import Union, Dict

from bitpay.models.bitpay_model import BitPayModel
Expand All @@ -14,8 +15,8 @@ class InvoiceWebhook(BitPayModel):
id: Union[str, None] = None
invoice_time: Union[str, None] = None
order_id: Union[str, None] = None
payment_subtotals: Union[Dict[str, int], None] = None
payment_totals: Union[Dict[str, int], None] = None
payment_subtotals: Union[Dict[str, Decimal], None] = None
payment_totals: Union[Dict[str, Decimal], None] = None
pos_data: Union[str, None] = None
price: Union[float, None] = None
status: Union[str, None] = None
Expand Down

0 comments on commit 3c798de

Please sign in to comment.