summaryrefslogtreecommitdiff
path: root/src/lib/checkout/api/getVoucher.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/checkout/api/getVoucher.js')
-rw-r--r--src/lib/checkout/api/getVoucher.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/checkout/api/getVoucher.js b/src/lib/checkout/api/getVoucher.js
new file mode 100644
index 00000000..57d8acf5
--- /dev/null
+++ b/src/lib/checkout/api/getVoucher.js
@@ -0,0 +1,11 @@
+import odooApi from '@/core/api/odooApi'
+
+export const getVoucher = async (id) => {
+ const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher`)
+ return dataVoucher
+}
+
+export const findVoucher = async (code, id) => {
+ const dataVoucher = await odooApi('GET', `/api/v1/user/${id}/voucher?code=${code}`)
+ return dataVoucher
+}