import { Attr } from 'ts-framework' import { BitcoinReceiver, Card, SourceCreationOptions } from '../types/stripe' export class RiderWalletResponseDTO { id: string stripeCustomerId: string balance: number bonusBalance: number currency: string userId: string orgId: string } export class RiderWalletWithSources { wallet: RiderWalletResponseDTO sources: (Card | BitcoinReceiver)[] } export class PaymentSourceAddedDTO extends RiderWalletWithSources { addedCardId: string } export class CreateRiderWalletDTO { @Attr({ type: String }) userId: string @Attr({ type: String }) email: string @Attr({ type: String, optional: true }) currency: string @Attr({ type: String, optional: true }) token?: string @Attr({ type: String, optional: true }) orgId?: string @Attr({ type: String, optional: true }) description?: string } export class AddPaymentSourceDTO { @Attr({ type: String }) userId: string @Attr({ type: String }) source: string | SourceCreationOptions } export class UpdateDefaultPaymentSourceDTO { @Attr({ type: String }) userId: string @Attr({ type: String }) source: string } export class RemovePaymentSourceDTO { @Attr({ type: String }) userId: string @Attr({ type: String }) stripeCardId: string } export class PaymentSourceResponseDTO { @Attr({ type: String }) id: string @Attr({ type: String }) brand: string @Attr({ type: String }) country: string @Attr({ type: String }) customer: string @Attr({ type: Number }) exp_month: number @Attr({ type: Number }) exp_year: number @Attr({ type: String }) fingerprint?: string @Attr({ type: String }) funding?: string @Attr({ type: Boolean }) isDefault: boolean @Attr({ type: String }) last4: string @Attr({ type: String }) name: string }