@mbanq/core-sdk-js 0.48.1 → 0.50.0

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/README.md CHANGED
@@ -1119,6 +1119,68 @@ console.log('Data Table:', mapping.datatableName);
1119
1119
  console.log('Product:', mapping.productName);
1120
1120
 
1121
1121
  // Delete mapping by ID
1122
- const deleteResult = await client.request(DeleteDataTableProductMapping(67));
1123
- console.log('Deleted resource ID:', deleteResult.resourceId);
1124
- console.log('Deleted mapping ID:', deleteResult.id);
1122
+ const deleted = await client.request(DeleteDataTableProductMapping(67));
1123
+ console.log('Deleted mapping ID:', deleted.id);
1124
+ ```
1125
+
1126
+ ### Dispute Reason Example
1127
+
1128
+ ```javascript
1129
+ import { createInstance, AddDisputeReason } from '@mbanq/core-sdk-js';
1130
+
1131
+ const client = createInstance({
1132
+ baseUrl: 'https://api.cloud.mbanq.com',
1133
+ tenantId: 'your-tenant-id'
1134
+ });
1135
+
1136
+ await client.connect({
1137
+ credential: {
1138
+ client_id: 'your-client-id',
1139
+ client_secret: 'your-client-secret',
1140
+ username: 'your-username',
1141
+ password: 'your-password',
1142
+ grant_type: 'password'
1143
+ }
1144
+ });
1145
+
1146
+ // Add a new dispute reason
1147
+ const disputeReason = await client.request(AddDisputeReason([{
1148
+ reasonIdentifier: 'UNAUTHORIZED_FRAUD',
1149
+ name: 'Unauthorized Fraud',
1150
+ description: 'Unrecognized Charge',
1151
+ paymentRail: 'CREDIT_CARD',
1152
+ supportMultipleTransactions: true,
1153
+ supportRecognizedTransaction: false,
1154
+ isBlockCardOnDisputeCreation: true
1155
+ }]));
1156
+
1157
+ console.log('Dispute reason created:', disputeReason.data[0].name);
1158
+ console.log('Payment rail:', disputeReason.data[0].paymentRail);
1159
+ console.log('Blocks card on creation:', disputeReason.data[0].isBlockCardOnDisputeCreation);
1160
+
1161
+ // Add multiple dispute reasons at once
1162
+ const multipleReasons = await client.request(AddDisputeReason([
1163
+ {
1164
+ reasonIdentifier: 'UNAUTHORIZED_FRAUD',
1165
+ name: 'Unauthorized Fraud',
1166
+ paymentRail: 'CREDIT_CARD'
1167
+ },
1168
+ {
1169
+ reasonIdentifier: 'INCORRECT_AMOUNT',
1170
+ name: 'Incorrect Amount',
1171
+ paymentRail: 'ACH'
1172
+ }
1173
+ ]));
1174
+ console.log('Created', multipleReasons.data.length, 'dispute reasons');
1175
+
1176
+ // Update an existing dispute reason
1177
+ const updated = await client.request(UpdateDisputeReason('UNAUTHORIZED_FRAUD', {
1178
+ name: 'UnAuthorized Fraud',
1179
+ description: 'Non receipt of merchandise',
1180
+ reasonIdentifier: 'UNAUTHORIZED_FRAUD',
1181
+ supportMultipleTransactions: false,
1182
+ paymentRail: 'CREDIT_CARD'
1183
+ }));
1184
+ console.log('Updated dispute reason ID:', updated.resourceId);
1185
+ console.log('Changes:', updated.changes);
1186
+ ```
@@ -22077,12 +22077,12 @@ declare const ListClientDocumentQueryParamsSchema: z$1.ZodObject<{
22077
22077
  fields: z$1.ZodOptional<z$1.ZodString>;
22078
22078
  }, "strip", z$1.ZodTypeAny, {
22079
22079
  clientId: number;
22080
- unmaskValue?: boolean | undefined;
22081
22080
  fields?: string | undefined;
22081
+ unmaskValue?: boolean | undefined;
22082
22082
  }, {
22083
22083
  clientId: number;
22084
- unmaskValue?: boolean | undefined;
22085
22084
  fields?: string | undefined;
22085
+ unmaskValue?: boolean | undefined;
22086
22086
  }>;
22087
22087
  type ListClientDocumentQueryParams = z$1.infer<typeof ListClientDocumentQueryParamsSchema>;
22088
22088
 
@@ -22077,12 +22077,12 @@ declare const ListClientDocumentQueryParamsSchema: z$1.ZodObject<{
22077
22077
  fields: z$1.ZodOptional<z$1.ZodString>;
22078
22078
  }, "strip", z$1.ZodTypeAny, {
22079
22079
  clientId: number;
22080
- unmaskValue?: boolean | undefined;
22081
22080
  fields?: string | undefined;
22081
+ unmaskValue?: boolean | undefined;
22082
22082
  }, {
22083
22083
  clientId: number;
22084
- unmaskValue?: boolean | undefined;
22085
22084
  fields?: string | undefined;
22085
+ unmaskValue?: boolean | undefined;
22086
22086
  }>;
22087
22087
  type ListClientDocumentQueryParams = z$1.infer<typeof ListClientDocumentQueryParamsSchema>;
22088
22088