-
Notifications
You must be signed in to change notification settings - Fork 5
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 #38 from lightsparkdev/feat/idempotency
Add idempotency keys where needed in Client and queries
- Loading branch information
Showing
5 changed files
with
64 additions
and
7 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
19 changes: 19 additions & 0 deletions
19
lightspark/scripts/outgoing_payment_for_idempotency_key.py
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,19 @@ | ||
# Copyright ©, 2022-present, Lightspark Group, Inc. - All Rights Reserved | ||
|
||
from lightspark.objects.OutgoingPayment import FRAGMENT as OutgoingPaymentFragment | ||
|
||
OUTGOING_PAYMENT_FOR_IDEMPOTENCY_KEY_QUERY = f""" | ||
query OutgoingPaymentForIdempotencyKey( | ||
$idempotency_key: String! | ||
) {{ | ||
outgoing_payment_for_idempotency_key(input: {{ | ||
idempotency_key: $idempotency_key | ||
}}) {{ | ||
payment {{ | ||
...OutgoingPaymentFragment | ||
}} | ||
}} | ||
}} | ||
{OutgoingPaymentFragment} | ||
""" |
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