Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

feat: Add optional header parameter to the addProduct function in cart module #770

Merged
merged 2 commits into from
Feb 21, 2023

Conversation

rishi-ayata
Copy link
Contributor

  • Fix

    Added optional header parameter to addProduct function in cart module

Description

As of now, currency is set at gateway level during Motlin gateway initialization. If the gateway is initialized based on a singleton pattern, it's difficult to reuse the same gateway across multiple apis from a storefront that handles multiple currencies. One solution would be to use a request scoped gateway initialization which is an expensive approach as the number of requests gets higher. An alternative way is to pass currencies as optional parameters with addProduct or similar APIS which makes it more flexible to use.

Dependencies

N/A

##Issue Link
#769

@samblacklock samblacklock changed the title Add optional header parameter to the addProduct function in cart module feat: Add optional header parameter to the addProduct function in cart module Feb 21, 2023
src/types/cart.d.ts Outdated Show resolved Hide resolved
@samblacklock samblacklock added this pull request to the merge queue Feb 21, 2023
@samblacklock samblacklock removed this pull request from the merge queue due to a manual request Feb 21, 2023
@samblacklock samblacklock added this pull request to the merge queue Feb 21, 2023
Merged via the queue into moltin:main with commit e92215d Feb 21, 2023
@github-actions
Copy link

🎉 This PR is included in version 20.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

2 participants