Skip to content
Open
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
60 changes: 60 additions & 0 deletions src/typings/transferWebhooks/interchangeData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* The version of the OpenAPI document: v4
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit this class manually.
*/

import { Amount } from "./amount";


export class InterchangeData {
"interchangeAmount"?: Amount | null;
/**
* A 3-character alphanumeric code assigned by Visa that identifies the specific interchange reimbursement program a transaction qualified for. The code is assigned based on the card type, entry mode, and security data provided.
*/
"interchangeRateIndicator"?: string;
/**
* The type of events data. Possible values: - **interchangeData**: information about the interchange fee applied to a transaction.
*/
"type": InterchangeData.TypeEnum;

static readonly discriminator: string | undefined = undefined;

static readonly mapping: {[index: string]: string} | undefined = undefined;

static readonly attributeTypeMap: Array<{name: string, baseName: string, type: string, format: string}> = [
{
"name": "interchangeAmount",
"baseName": "interchangeAmount",
"type": "Amount | null",
"format": ""
},
{
"name": "interchangeRateIndicator",
"baseName": "interchangeRateIndicator",
"type": "string",
"format": ""
},
{
"name": "type",
"baseName": "type",
"type": "InterchangeData.TypeEnum",
"format": ""
} ];

static getAttributeTypeMap() {
return InterchangeData.attributeTypeMap;
}

public constructor() {
}
}

export namespace InterchangeData {
export enum TypeEnum {
InterchangeData = 'interchangeData'
}
}
1 change: 1 addition & 0 deletions src/typings/transferWebhooks/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export * from "./externalReason"
export * from "./hKLocalAccountIdentification"
export * from "./hULocalAccountIdentification"
export * from "./ibanAccountIdentification"
export * from "./interchangeData"
export * from "./internalCategoryData"
export * from "./internalReviewTrackingData"
export * from "./issuedCard"
Expand Down
1 change: 1 addition & 0 deletions src/typings/transferWebhooks/modification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export namespace Modification {
Failed = 'failed',
Fee = 'fee',
FeePending = 'feePending',
InterchangeAdjusted = 'interchangeAdjusted',
InternalTransfer = 'internalTransfer',
InternalTransferPending = 'internalTransferPending',
InvoiceDeduction = 'invoiceDeduction',
Expand Down
3 changes: 3 additions & 0 deletions src/typings/transferWebhooks/objectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { ExternalReason } from "./externalReason";
import { HKLocalAccountIdentification } from "./hKLocalAccountIdentification";
import { HULocalAccountIdentification } from "./hULocalAccountIdentification";
import { IbanAccountIdentification } from "./ibanAccountIdentification";
import { InterchangeData } from "./interchangeData";
import { InternalCategoryData } from "./internalCategoryData";
import { InternalReviewTrackingData } from "./internalReviewTrackingData";
import { IssuedCard } from "./issuedCard";
Expand Down Expand Up @@ -98,6 +99,7 @@ let enumsMap: Set<string> = new Set<string>([
"HKLocalAccountIdentification.TypeEnum",
"HULocalAccountIdentification.TypeEnum",
"IbanAccountIdentification.TypeEnum",
"InterchangeData.TypeEnum",
"InternalCategoryData.TypeEnum",
"InternalReviewTrackingData.ReasonEnum",
"InternalReviewTrackingData.StatusEnum",
Expand Down Expand Up @@ -171,6 +173,7 @@ let typeMap: {[index: string]: any} = {
"HKLocalAccountIdentification": HKLocalAccountIdentification,
"HULocalAccountIdentification": HULocalAccountIdentification,
"IbanAccountIdentification": IbanAccountIdentification,
"InterchangeData": InterchangeData,
"InternalCategoryData": InternalCategoryData,
"InternalReviewTrackingData": InternalReviewTrackingData,
"IssuedCard": IssuedCard,
Expand Down
1 change: 1 addition & 0 deletions src/typings/transferWebhooks/transferData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ export namespace TransferData {
Failed = 'failed',
Fee = 'fee',
FeePending = 'feePending',
InterchangeAdjusted = 'interchangeAdjusted',
InternalTransfer = 'internalTransfer',
InternalTransferPending = 'internalTransferPending',
InvoiceDeduction = 'invoiceDeduction',
Expand Down
8 changes: 2 additions & 6 deletions src/typings/transferWebhooks/transferDataTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@ export type TransferDataTracking = ConfirmationTrackingData | EstimationTracking
*/
export class TransferDataTrackingClass {

static readonly discriminator: string | undefined = "type";
static readonly discriminator: string = "type";

static readonly mapping: {[index: string]: string} | undefined = {
"confirmation": "ConfirmationTrackingData",
"estimation": "EstimationTrackingData",
"internalReview": "InternalReviewTrackingData"
};
static readonly mapping: {[index: string]: string} | undefined = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Removing the mapping object breaks the deserialization of the polymorphic TransferDataTracking type. The ObjectSerializer relies on this mapping to correctly resolve the concrete type (e.g., EstimationTrackingData) from the type discriminator field in the JSON payload. Without this, deserialization will not work as intended, and related functionality will likely fail at runtime. The existing test in src/__tests__/webhooks/transferWebhook.spec.ts would fail because of this change. Please restore the mapping.

Suggested change
static readonly mapping: {[index: string]: string} | undefined = undefined;
static readonly mapping: {[index: string]: string} | undefined = { "confirmation": "ConfirmationTrackingData", "estimation": "EstimationTrackingData", "internalReview": "InternalReviewTrackingData" };

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gcatanese Any idea why this would happen?
On the spec I still see the objects

It also seems like it has not been changed in a couple years

}
2 changes: 2 additions & 0 deletions src/typings/transferWebhooks/transferEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ export namespace TransferEvent {
Failed = 'failed',
Fee = 'fee',
FeePending = 'feePending',
InterchangeAdjusted = 'interchangeAdjusted',
InternalTransfer = 'internalTransfer',
InternalTransferPending = 'internalTransferPending',
InvoiceDeduction = 'invoiceDeduction',
Expand Down Expand Up @@ -356,6 +357,7 @@ export namespace TransferEvent {
}
export enum TypeEnum {
Accounting = 'accounting',
Tracing = 'tracing',
Tracking = 'tracking'
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Do not edit this class manually.
*/

import { InterchangeData } from "./interchangeData";
import { IssuingTransactionData } from "./issuingTransactionData";
import { MerchantPurchaseData } from "./merchantPurchaseData";

Expand All @@ -16,7 +17,7 @@ import { MerchantPurchaseData } from "./merchantPurchaseData";
* Type
* @export
*/
export type TransferEventEventsDataInner = IssuingTransactionData | MerchantPurchaseData;
export type TransferEventEventsDataInner = InterchangeData | IssuingTransactionData | MerchantPurchaseData;

/**
* @type TransferEventEventsDataInnerClass
Expand Down
Loading