Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Add /ob/checkoutbreakdown Endpoint #2090

Merged
merged 10 commits into from
Jun 30, 2020
Merged

Add /ob/checkoutbreakdown Endpoint #2090

merged 10 commits into from
Jun 30, 2020

Conversation

hoffmabc
Copy link
Member

This enables checkout breakdown call to get an itemized breakdown of an order.

The format to make the call is as follows:

{
    "shipTo": "Elwood Blues",
    "address": "1060 W Addison",
    "city": "Chicago",
    "state": "Illinois",
    "countryCode": "UNITED_STATES",
    "postalCode": "60613",
    "addressNotes": "",
    "items": [
        {
            "listingHash": "QmTjLBaqrunGmvCD9A3joXLXGudAwxnQvMtvcggQ5rahxN",
            "bigQuantity": "1",
            "options": [
                {
                    "name": "Sizes",
                    "value": "Small"
                },
                {
                    "name": "Color",
                    "value": "Red"
                }
            ],
            "shipping": {
                "name": "Worldwide",
                "service": "Standard"
            },
            "memo": "thanks!",
            "coupons": []
        }
    ],
    "moderator": "QmcdkKM2fWCKzTZdpjEY6abzRbDhRRJvNmqwNKVyiDtGky",
    "paymentCoin": "LTC"
}

This call returns:

{
    "basePrice": "45433155",
    "coupon": "4543316",
    "optionSurcharge": "9086631",
    "priceCurrency": {
        "code": "USD",
        "divisibility": 2
    },
    "quantity": "43",
    "shippingPrice": "290772224",
    "tax": "0",
    "totalPrice": "2439760434"
}

@hoffmabc hoffmabc self-assigned this Jun 11, 2020
@hoffmabc hoffmabc requested review from cpacia and drwasho June 11, 2020 17:59
@hoffmabc hoffmabc added the 🔍 readyForReview Issue or PR ready for code review prior to closing. label Jun 11, 2020
@hoffmabc
Copy link
Member Author

@drwasho this should be ready to test out. @cpacia: once @drwasho passes this then you can review and we can merge it in.

@coveralls
Copy link

coveralls commented Jun 11, 2020

Coverage Status

Coverage decreased (-0.3%) to 40.669% when pulling c74057a on brian.checkoutBreakdown into 9e17a66 on master.

@cpacia cpacia merged commit e02ac53 into master Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔍 readyForReview Issue or PR ready for code review prior to closing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants