@pax2pay/client 0.6.18 → 0.6.20
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/Client/Cards/index.ts +2 -17
- package/dist/Client/Cards/index.d.ts +1 -13
- package/dist/Client/Cards/index.js +0 -14
- package/dist/Client/Cards/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/model/AccountState.d.ts +0 -1
- package/dist/model/AccountState.js +0 -20
- package/dist/model/AccountState.js.map +1 -1
- package/dist/model/CardResponseV2.d.ts +2 -2
- package/dist/model/CardResponseV2.js +2 -2
- package/dist/model/CardResponseV2.js.map +1 -1
- package/dist/model/CardSearch.d.ts +2 -2
- package/dist/model/CardState.d.ts +10 -0
- package/dist/model/CardState.js +30 -0
- package/dist/model/CardState.js.map +1 -0
- package/dist/model/PaymentStatus.d.ts +2 -0
- package/dist/model/PaymentStatus.js +4 -0
- package/dist/model/PaymentStatus.js.map +1 -1
- package/dist/model/TransferResponseV2.d.ts +3 -2
- package/dist/model/TransferResponseV2.js +22 -21
- package/dist/model/TransferResponseV2.js.map +1 -1
- package/dist/model/index.d.ts +2 -3
- package/dist/model/index.js +2 -3
- package/dist/model/index.js.map +1 -1
- package/index.ts +3 -5
- package/model/AccountState.ts +0 -19
- package/model/CardResponseV2.ts +3 -3
- package/model/CardSearch.ts +2 -2
- package/model/CardState.ts +30 -0
- package/model/PaymentStatus.ts +6 -0
- package/model/TransferResponseV2.ts +25 -23
- package/model/index.ts +3 -5
- package/package.json +1 -1
- package/Client/Cards/actions/actionTest.ts +0 -45
- package/dist/model/CardFundingAccountResponse.d.ts +0 -19
- package/dist/model/CardFundingAccountResponse.js +0 -30
- package/dist/model/CardFundingAccountResponse.js.map +0 -1
- package/dist/model/CardResponse.d.ts +0 -41
- package/dist/model/CardResponse.js +0 -47
- package/dist/model/CardResponse.js.map +0 -1
- package/model/CardFundingAccountResponse.ts +0 -46
- package/model/CardResponse.ts +0 -75
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as isoly from "isoly"
|
|
2
|
-
import { AccountState, ProviderResponse } from "."
|
|
3
|
-
import { OrganisationResponse } from "./OrganisationResponse"
|
|
4
|
-
/**
|
|
5
|
-
* Funding account information
|
|
6
|
-
*/
|
|
7
|
-
export interface CardFundingAccountResponse {
|
|
8
|
-
id: number
|
|
9
|
-
providerAccountId: string
|
|
10
|
-
provider: ProviderResponse
|
|
11
|
-
organisation: OrganisationResponse
|
|
12
|
-
currency: isoly.Currency
|
|
13
|
-
state: AccountState
|
|
14
|
-
friendlyName: string
|
|
15
|
-
balance: number
|
|
16
|
-
accountType: "FUNDING" | "CARD"
|
|
17
|
-
updatedOn: isoly.Date
|
|
18
|
-
createdOn: isoly.Date
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export namespace CardFundingAccountResponse {
|
|
22
|
-
export function is(value: CardFundingAccountResponse | any): value is CardFundingAccountResponse {
|
|
23
|
-
return (
|
|
24
|
-
typeof value == "object" &&
|
|
25
|
-
typeof value.id == "number" &&
|
|
26
|
-
typeof value.providerAccountId == "string" &&
|
|
27
|
-
ProviderResponse.is(value.provider) &&
|
|
28
|
-
OrganisationResponse.is(value.organisation) &&
|
|
29
|
-
isoly.Currency.is(value.currency) &&
|
|
30
|
-
(value.state == "ACTIVE" ||
|
|
31
|
-
value.state == "INACTIVE" ||
|
|
32
|
-
value.state == "CLOSED" ||
|
|
33
|
-
value.state == "DELETED" ||
|
|
34
|
-
value.state == "EXPIRED" ||
|
|
35
|
-
value.state == "PENDING" ||
|
|
36
|
-
value.state == "APPROVED" ||
|
|
37
|
-
value.state == "DECLINED" ||
|
|
38
|
-
value.state == "GENERATED") &&
|
|
39
|
-
typeof value.friendlyName == "string" &&
|
|
40
|
-
typeof value.balance == "number" &&
|
|
41
|
-
(value.accountType == "FUNDING" || value.accountType == "CARD") &&
|
|
42
|
-
isoly.Date.is(value.updatedOn) &&
|
|
43
|
-
isoly.Date.is(value.createdOn)
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
}
|
package/model/CardResponse.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { AccountResponse } from "./AccountResponse"
|
|
2
|
-
import { AccountState } from "./AccountState"
|
|
3
|
-
import { BookingInfo } from "./BookingInfo"
|
|
4
|
-
import { BookingInfoResponse } from "./BookingInfoResponse"
|
|
5
|
-
import { CardDeliveryResponse } from "./CardDeliveryResponse"
|
|
6
|
-
import { CardForm } from "./CardForm"
|
|
7
|
-
import { CardScheduleResponseItem } from "./CardScheduleResponseItem"
|
|
8
|
-
import { CardTypeSpecification } from "./CardTypeSpecification"
|
|
9
|
-
import { InvokingSystem } from "./InvokingSystem"
|
|
10
|
-
import { ProviderCode } from "./ProviderCode"
|
|
11
|
-
import { Usage } from "./Usage"
|
|
12
|
-
|
|
13
|
-
export interface CardResponse {
|
|
14
|
-
cardType?: CardTypeSpecification | string
|
|
15
|
-
useAs?: string
|
|
16
|
-
nameOnCard?: string
|
|
17
|
-
cardNumber?: string
|
|
18
|
-
cvv?: string
|
|
19
|
-
issueDate?: string
|
|
20
|
-
expiryDate?: string
|
|
21
|
-
cardForm?: CardForm
|
|
22
|
-
fundingDate?: string
|
|
23
|
-
fundingBalance?: number
|
|
24
|
-
balance?: number
|
|
25
|
-
remainingBalance?: number
|
|
26
|
-
notes?: string
|
|
27
|
-
usage?: Usage
|
|
28
|
-
state?: AccountState
|
|
29
|
-
providerCode?: ProviderCode
|
|
30
|
-
providerCardId?: string
|
|
31
|
-
cardAccount?: AccountResponse
|
|
32
|
-
fundingAccount?: AccountResponse
|
|
33
|
-
creatingSystem?: InvokingSystem
|
|
34
|
-
createdBy?: string
|
|
35
|
-
bookingInfo?: BookingInfo | BookingInfoResponse
|
|
36
|
-
schedule?: CardScheduleResponseItem[]
|
|
37
|
-
delivery?: CardDeliveryResponse
|
|
38
|
-
batchId?: string
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export namespace CardResponse {
|
|
42
|
-
export function is(value: CardResponse | any): value is CardResponse {
|
|
43
|
-
return (
|
|
44
|
-
typeof value == "object" &&
|
|
45
|
-
(value.cardType == undefined || CardTypeSpecification.is(value.cardType) || typeof value.cardType == "string") &&
|
|
46
|
-
(value.useAs == undefined || typeof value.useAs == "string") &&
|
|
47
|
-
(value.nameOnCard == undefined || typeof value.nameOnCard == "string") &&
|
|
48
|
-
(value.cardNumber == undefined || typeof value.cardNumber == "string") &&
|
|
49
|
-
(value.cvv == undefined || typeof value.cvv == "string") &&
|
|
50
|
-
(value.issueDate == undefined || typeof value.issueDate == "string") &&
|
|
51
|
-
(value.expiryDate == undefined || typeof value.expiryDate == "string") &&
|
|
52
|
-
(value.cardForm == undefined || CardForm.is(value.cardForm)) &&
|
|
53
|
-
(value.fundingDate == undefined || typeof value.fundingDate == "string") &&
|
|
54
|
-
(value.fundingBalance == undefined || typeof value.fundingBalance == "number") &&
|
|
55
|
-
(value.balance == undefined || typeof value.balance == "number") &&
|
|
56
|
-
(value.remainingBalance == undefined || typeof value.remainingBalance == "number") &&
|
|
57
|
-
(value.notes == undefined || typeof value.notes == "string") &&
|
|
58
|
-
(value.usage == undefined || Usage.is(value.usage)) &&
|
|
59
|
-
(value.state == undefined || AccountState.is(value.state)) &&
|
|
60
|
-
(value.providerCode == undefined || ProviderCode.is(value.providerCode)) &&
|
|
61
|
-
(value.providerCardId == undefined || typeof value.providerCardId == "string") &&
|
|
62
|
-
(value.cardAccount == undefined || AccountResponse.is(value.cardAccount)) &&
|
|
63
|
-
(value.fundingAccount == undefined || AccountResponse.is(value.fundingAccount)) &&
|
|
64
|
-
(value.creatingSystem == undefined || InvokingSystem.is(value.creatingSystem)) &&
|
|
65
|
-
(value.createdBy == undefined || typeof value.createdBy == "string") &&
|
|
66
|
-
(value.bookingInfo == undefined ||
|
|
67
|
-
BookingInfo.is(value.bookingInfo) ||
|
|
68
|
-
BookingInfoResponse.is(value.bookingInfo)) &&
|
|
69
|
-
(value.schedule == undefined ||
|
|
70
|
-
(Array.isArray(value.schedule) && value.schedule.every((item: any) => CardScheduleResponseItem.is(item)))) &&
|
|
71
|
-
(value.delivery == undefined || CardDeliveryResponse.is(value.delivery)) &&
|
|
72
|
-
(value.batchId == undefined || typeof value.batchId == "string")
|
|
73
|
-
)
|
|
74
|
-
}
|
|
75
|
-
}
|