react-native-unit-components
Version:
Unit React Native components
79 lines (64 loc) • 1.83 kB
text/typescript
import { UNCounterpartyAccountType } from '../counterparty.types';
import { UNACHPayment } from './achPayment.types';
import { UNBillPayment } from './billPayment.types';
import { UNBookPayment } from './bookPayment.types';
import { UNWirePayment } from './wirePayment.types';
export type UNPayment = UNACHPayment | UNBookPayment | UNWirePayment | UNBillPayment
export enum UNPaymentType {
AchPayment = 'achPayment',
BookPayment = 'bookPayment',
WirePayment = 'wirePayment',
BillPayment = 'billPayment',
CardToCardPayment = 'cardToCardPayment',
}
export type UNPaymentStatus = 'Sent' | 'Rejected' | 'Pending' | 'Clearing' | 'Canceled' | 'Returned' | 'PendingReview'
export type UNAchCounterparty = {
name: string
accountNumber: string
routingNumber: string
accountType: UNCounterpartyAccountType
}
export enum UNPlaidAccountFilter {
checking = 'checking',
savings = 'savings',
}
export function parseUNAccountFilters(input?: string | null): UNPlaidAccountFilter[] {
if (!input) return [];
return input
.split(',')
.map(s => s.trim())
.filter((s): s is UNPlaidAccountFilter => s in UNPlaidAccountFilter);
}
export enum UNCounterpartyVerificationMethod {
Plaid = 'Plaid',
}
export enum UNCardNetwork {
Visa = 'Visa',
Diners = 'Diners',
Maestro = 'Maestro',
Generic = 'Generic',
Discover = 'Discover',
MasterCard = 'MasterCard',
AmericanExpress = 'AmericanExpress',
}
export type UNCents = number
export type UNRelationshipsTransaction = {
type: string
id: string
}
export type UNRelationshipsCounterparty = {
type: string
id: string
}
export type UNRelationshipsRecurringPayment = {
type: string
id: string
}
export type UNRelationshipsAccount = {
type: string
id: string
}
export type UNRelationshipsCustomer = {
type: string
id: string
}