wip checkout

This commit is contained in:
2026-01-09 11:20:56 -03:00
parent e29e81b253
commit 823134f450
18 changed files with 290 additions and 80 deletions

View File

@@ -1,8 +1,9 @@
from aws_lambda_powertools.event_handler.api_gateway import Router
from aws_lambda_powertools.event_handler.exceptions import (
NotFoundError,
from layercake.dynamodb import (
DynamoDBPersistenceLayer,
SortKey,
TransactKey,
)
from layercake.dynamodb import DynamoDBPersistenceLayer, KeyPair
from boto3clients import dynamodb_client
from config import ORDER_TABLE
@@ -17,7 +18,12 @@ dyn = DynamoDBPersistenceLayer(ORDER_TABLE, dynamodb_client)
@router.get('/<order_id>')
def get_order(order_id: str):
return dyn.collection.get_item(
KeyPair(order_id, '0'),
exc_cls=NotFoundError,
return dyn.collection.get_items(
TransactKey(order_id)
+ SortKey('0')
+ SortKey('ITEMS')
+ SortKey('ADDRESS')
+ SortKey('PIX')
+ SortKey('NFSE')
+ SortKey('FEE'),
)