Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 17
Implement Payment model #37
Copy link
Copy link
Open
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26area:modelspriority:p1type:feature
Description
Metadata
Metadata
Assignees
Labels
GrantFox OSSIssue tracked in GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26Campaign: Official Campaign | FWC26area:modelspriority:p1type:feature
Represents a Shade payment resource returned by the API. All monetary amounts should be stored as
Decimalto avoid floating-point precision issues.Proposed Steps:
src/shade/models/payment.py.id: str,status: str,amount: Decimal,currency: str,description: Optional[str],merchant_id: str,stellar_tx_hash: Optional[str],payment_address: str,created_at: datetime,updated_at: datetime.PaymentStatusStrEnumwith values:pending,completed,cancelled,expired,partially_paid.amount > 0.Acceptance Criteria:
Payment.from_dict(api_response)constructs the model without error.payment.amountis aDecimal, not afloat.payment.statusis aPaymentStatusenum value.