Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions external/getAssetInfo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import boto3, json, requests, toml
from decimal import Decimal

LEGACY_DB = boto3.resource("dynamodb").Table("legacy")

def lambda_handler(event, context):
code = event["pathParameters"].get("code").upper()
if code.isdigit():
Expand All @@ -11,6 +13,8 @@ def lambda_handler(event, context):
return {
"statusCode": 200,
"body": json.dumps({
# check/output here or in function the Distributor.xlm bal
"legacy": getInternalDistributor(code)
"outstanding": getNumOutstanding(code)
})
}
Expand All @@ -24,6 +28,10 @@ def lambda_handler(event, context):
})
}

def getInternalDistributor(code):
totalLegacyHeld = {scan(LEGACY_DB)} TODO
return totalLegacyHeld

def getNumOutstanding(code):
try:
XLMassetInfo = requests.get(
Expand Down