-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #73 from mwarzybok-sumoheavy/feature/SP-738
SP-738 Type Review: Python
- Loading branch information
Showing
49 changed files
with
6,832 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from datetime import datetime | ||
from pydantic import field_serializer | ||
from typing import Union | ||
|
||
from bitpay.models.bitpay_model import BitPayModel | ||
|
||
|
||
class InvoiceRefundAddresses(BitPayModel): | ||
date: Union[datetime, None] | ||
email: Union[str, None] | ||
tag: Union[int, None] = None | ||
type: Union[str, None] = None | ||
|
||
@field_serializer("date") | ||
def serialize_datetime(self, dt: datetime) -> str: | ||
return super().serialize_datetime_to_iso8601(dt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from datetime import datetime | ||
from pydantic import field_serializer | ||
from typing import Union, Dict, List | ||
|
||
from bitpay.models.bitpay_model import BitPayModel | ||
from bitpay.models.payout.payout_transaction import PayoutTransaction | ||
|
||
|
||
class PayoutWebhook(BitPayModel): | ||
id: Union[str, None] = None | ||
recipient_id: Union[str, None] = None | ||
shopper_id: Union[str, None] = None | ||
price: Union[float, None] = None | ||
currency: Union[str, None] = None | ||
ledger_currency: Union[str, None] = None | ||
exchange_rates: Union[Dict[str, Dict[str, float]], None] = None | ||
email: Union[str, None] = None | ||
reference: Union[str, None] = None | ||
label: Union[str, None] = None | ||
notification_url: Union[str, None] = None | ||
notification_email: Union[str, None] = None | ||
effective_date: Union[datetime, None] = None | ||
request_date: Union[datetime, None] = None | ||
status: Union[str, None] = None | ||
transactions: Union[List[PayoutTransaction], None] = None | ||
account_id: Union[str, None] = None | ||
date_executed: Union[datetime, None] = None | ||
group_id: Union[str, None] = None | ||
|
||
@field_serializer("effective_date", "request_date") | ||
def serialize_datetime(self, dt: datetime) -> str: | ||
return super().serialize_datetime_to_iso8601(dt) |
Oops, something went wrong.