awslabs / aws-saas-boost

AWS SaaS Boost is a ready-to-use toolset that removes the complexity of successfully running SaaS workloads in the AWS cloud.
Apache License 2.0
957 stars 188 forks source link

Fix for Issue #446 #447

Closed raman231 closed 1 year ago

raman231 commented 1 year ago

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

raman231 commented 1 year ago

Thanks for the contribution @raman231 ! In this case, you're effectively changing the model for the BillingEvent in integration for user applications, which would constitute a backwards-incompatible change for existing users integrated with the BillingEvent. In this case why not change the sample app to send a Long value instead of an Integer?

        int meterVal = Integer.valueOf(count); // could be a Long
        long startTimeMillis = System.currentTimeMillis();

        try {
            ObjectNode systemApiRequest = MAPPER.createObjectNode();
            systemApiRequest.put(TENANT_ID, tenantId);
            systemApiRequest.put(PRODUCT_CODE, productCode);
            systemApiRequest.put(QUANTITY, meterVal);

Changes made as suggested. Thanks

raman231 commented 1 year ago

Closing this PR since it got changes from multiple issues merged into this one. Will create a new PR with just the changes related to this issue.