@riskdefy/chargebacks 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riskdefy/chargebacks",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Chargebacks Vue component",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es.js",
@@ -19,6 +19,8 @@
19
19
  "license": "MIT",
20
20
  "devDependencies": {
21
21
  "@vitejs/plugin-vue": "^5.2.1",
22
+ "bootstrap": "^5.3.3",
23
+ "vis-timeline": "^7.7.3",
22
24
  "vite": "^6.1.0",
23
25
  "vue": "^3.5.13"
24
26
  }
@@ -1,19 +1,19 @@
1
1
  <template>
2
2
  <div>
3
- <h2>Chargebacks Report</h2>
4
- <button @click="fetchChargebacks">Load Report</button>
5
- <pre v-if="data">{{ data }}</pre>
3
+ <IncomingDetails :apiKey="apiKey" :incomingId="incomingId" />
6
4
  </div>
7
5
  </template>
8
6
 
9
7
  <script>
8
+ import IncomingDetails from "./IncomingDetails.vue";
9
+
10
10
  export default {
11
11
  props: {
12
12
  apiKey: {
13
13
  type: String,
14
14
  required: true,
15
15
  },
16
- merchantId: {
16
+ incomingId: {
17
17
  type: String,
18
18
  required: true,
19
19
  },
@@ -21,27 +21,8 @@ export default {
21
21
  data() {
22
22
  return { data: null };
23
23
  },
24
- methods: {
25
- async fetchChargebacks() {
26
- try {
27
- const params = { merchantId: this.merchantId };
28
- const paramsString = new URLSearchParams(params).toString();
29
- const response = await fetch(
30
- `https://api.riskdefy.io/chargebacks?${paramsString}`,
31
- {
32
- method: "GET",
33
- headers: {
34
- Authorization: `Bearer ${this.apiKey}`,
35
- "Content-Type": "application/json",
36
- },
37
- }
38
- );
39
- const data = await response.json();
40
- this.data = data;
41
- } catch (error) {
42
- console.error("API Error:", error);
43
- }
44
- },
24
+ components: {
25
+ IncomingDetails,
45
26
  },
46
27
  };
47
28
  </script>