Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRAAV-7847: payments-sample-apps support: add payment ID as an optional query parameter to GET chargebacks API #155

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/chargebacksApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function getInstance() {
* Get Settlements
* @param {String} merchantId
* @param {String} settlementId
* @param {String} paymentId
* @param {String} from
* @param {String} to
* @param {String} pageBefore
Expand All @@ -53,6 +54,7 @@ function getInstance() {
function getChargebacks(
merchantId: string,
settlementId: string,
paymentId: string,
from: string,
to: string,
pageBefore: string,
Expand All @@ -62,6 +64,7 @@ function getChargebacks(
const queryParams = {
merchantId: nullIfEmpty(merchantId),
settlementId: nullIfEmpty(settlementId),
paymentId: nullIfEmpty(paymentId),
from: nullIfEmpty(from),
to: nullIfEmpty(to),
pageBefore: nullIfEmpty(pageBefore),
Expand Down
3 changes: 3 additions & 0 deletions pages/debug/chargebacks/fetch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
/>
<header>Optional filter params:</header>
<v-text-field v-model="formData.settlementId" label="Settlement ID" />
<v-text-field v-model="formData.paymentId" label="Payment ID" />
<v-text-field v-model="formData.from" label="From" />
<v-text-field v-model="formData.to" label="To" />
<v-text-field v-model="formData.pageSize" label="PageSize" />
Expand Down Expand Up @@ -65,6 +66,7 @@ export default class FetchChargebacksClass extends Vue {
formData = {
merchantId: '',
settlementId: '',
paymentId: '',
from: '',
to: '',
pageSize: '',
Expand Down Expand Up @@ -98,6 +100,7 @@ export default class FetchChargebacksClass extends Vue {
await this.$chargebacksApi.getChargebacks(
this.formData.merchantId,
this.formData.settlementId,
this.formData.paymentId,
this.formData.from,
this.formData.to,
this.formData.pageBefore,
Expand Down