chore(docs): Generated API Reference (#3718)
Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
51d0b88404
commit
70435d5631
@@ -2,6 +2,7 @@ import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
medusa.carts.updatePaymentSession(cart_id, 'manual', {
|
||||
data: {
|
||||
|
||||
}
|
||||
})
|
||||
.then(({ cart }) => {
|
||||
@@ -1,7 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
|
||||
// Total amount = 10000
|
||||
|
||||
// Adding a payment session
|
||||
medusa.paymentCollections.managePaymentSession(payment_id, { provider_id: "stripe" })
|
||||
.then(({ payment_collection }) => {
|
||||
@@ -1,7 +1,9 @@
|
||||
import Medusa from "@medusajs/medusa-js"
|
||||
const medusa = new Medusa({ baseUrl: MEDUSA_BACKEND_URL, maxRetries: 3 })
|
||||
// must be previously logged in or use api token
|
||||
|
||||
// Total amount = 10000
|
||||
|
||||
// Adding two new sessions
|
||||
medusa.paymentCollections.managePaymentSessionsBatch(payment_id, [
|
||||
{
|
||||
@@ -16,6 +18,7 @@ medusa.paymentCollections.managePaymentSessionsBatch(payment_id, [
|
||||
.then(({ payment_collection }) => {
|
||||
console.log(payment_collection.id);
|
||||
});
|
||||
|
||||
// Updating one session and removing the other
|
||||
medusa.paymentCollections.managePaymentSessionsBatch(payment_id, [
|
||||
{
|
||||
Reference in New Issue
Block a user