-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add Virtual Card Changes (#2694)
- Loading branch information
1 parent
b37db34
commit ca1c375
Showing
45 changed files
with
1,254 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export enum CardStatus { | ||
ACTIVE = 'ACTIVE', | ||
PREACTIVE = 'PREACTIVE', | ||
INACTIVE = 'INACTIVE', | ||
USED = 'USED', | ||
DELETED = 'DELETED', | ||
EXPIRED = 'EXPIRED', | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export enum ManageCardsPageSegment { | ||
CORPORATE_CARDS, | ||
VIRTUAL_CARDS, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/app/core/mock-data/virtual-card-combined-response.data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const virtualCardCombinedResponse = { | ||
vc1234: { | ||
full_card_number: '123451234512345', | ||
cvv: '1234', | ||
expiry_date: new Date('2029-01-01T00:00:00+00:00'), | ||
nick_name: 'Nickname', | ||
current_amount: 1000, | ||
}, | ||
}; |
17 changes: 17 additions & 0 deletions
17
src/app/core/mock-data/virtual-card-details-response.data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { CardDetailsAmountResponse } from '../models/card-details-amount-response'; | ||
import { CardDetailsResponse } from '../models/card-details-response.model'; | ||
|
||
export const virtualCardDetailsResponse: { data: CardDetailsResponse } = { | ||
data: { | ||
full_card_number: '123412341234123', | ||
cvv: '123', | ||
// @ts-ignore | ||
expiry_date: '2029-01-01T00:00:00+00:00', | ||
}, | ||
}; | ||
|
||
export const virtualCardCurrentAmountResponse: { data: CardDetailsAmountResponse } = { | ||
data: { | ||
current_amount: 1000, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { CardStatus } from '../enums/card-status.enum'; | ||
import { PlatformApiResponse } from '../models/platform/platform-api-response.model'; | ||
import { VirtualCard } from '../models/virtual-card.model'; | ||
|
||
export const virtualCardResponse: PlatformApiResponse<VirtualCard> = { | ||
count: 1, | ||
data: [ | ||
{ | ||
amex_account_id: 'amacume6Bw1WQ2', | ||
created_at: '2024-02-06T20:16:33.981634+00:00', | ||
creator_user_id: 'us3csPBnWxv6', | ||
expiry_date: '2029-02-01T00:00:00+00:00', | ||
id: 'vcgNQmrZvGhL', | ||
last_five: '35799', | ||
nick_name: 'Demo Cad', | ||
org_id: 'or76bSzYIDxb', | ||
state: CardStatus.INACTIVE, | ||
updated_at: '2024-02-06T20:16:33.981634+00:00', | ||
user_id: 'usqigaQKd1sI', | ||
valid_from_at: '2024-02-06T00:00:00+00:00', | ||
valid_till_at: '2024-02-08T00:00:00+00:00', | ||
}, | ||
], | ||
offset: 0, | ||
}; | ||
|
||
export const virtualCardUndefinedResponse: PlatformApiResponse<VirtualCard> = { | ||
count: 0, | ||
data: undefined, | ||
offset: 0, | ||
}; |
4 changes: 4 additions & 0 deletions
4
src/app/core/mock-data/virtual-cards-combined-request.data.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export const virtualCardCombinedRequest = { | ||
virtualCardIds: ['vcgNQmrZvGhL'], | ||
includeCurrentAmount: true, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface CardDetailsAmountResponse { | ||
current_amount: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface CardDetailsCombinedResponse { | ||
full_card_number: string; | ||
cvv: string; | ||
expiry_date: Date; | ||
nick_name?: string; | ||
current_amount?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export interface CardDetailsResponse { | ||
full_card_number: string; | ||
cvv: string; | ||
expiry_date: Date; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { CardStatus } from '../enums/card-status.enum'; | ||
|
||
export interface VirtualCard { | ||
id: string; | ||
state: CardStatus; | ||
last_five: string; | ||
expiry_date: string; | ||
created_at: string; | ||
updated_at: string; | ||
org_id: string; | ||
amex_account_id: string; | ||
valid_from_at: string; | ||
valid_till_at: string; | ||
user_id: string; | ||
creator_user_id: string; | ||
nick_name: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface VirtualCardsCombinedRequest { | ||
virtualCardIds: string[]; | ||
includeCurrentAmount?: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface VirtualCardsRequest { | ||
id: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.