import { Attr } from 'ts-framework' import { AccountInfoResponseDTO } from './account-info' import { AddressResponseDTO } from './address' import { BankAccount, BankAccountListOptions, Available, Pending } from '../types/stripe' export class UpdateAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: String, optional: true }) userId?: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) currency?: string @Attr({ type: AddressResponseDTO, optional: true }) address?: AddressResponseDTO @Attr({ type: AccountInfoResponseDTO, optional: true }) accountInfo?: AccountInfoResponseDTO } export class UpsertAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: String }) userId: string @Attr({ type: String, optional: true }) country?: string @Attr({ type: String, optional: true }) currency?: string @Attr({ type: Number, optional: true }) tosAcceptanceDate?: number @Attr({ type: String, optional: true }) tosAcceptanceIp?: string @Attr({ type: AccountInfoResponseDTO, optional: true }) accountInfo?: AccountInfoResponseDTO @Attr({ type: AddressResponseDTO, optional: true }) address?: AddressResponseDTO } export class AccountResponseDTO { id: string stripeConnectAccountId: string tosAcceptanceDate: object tosAcceptanceIp: string orgId: string address: AddressResponseDTO accountInfo: AccountInfoResponseDTO } export class AccountWithStripeDataResponseDTO extends AccountResponseDTO { availableBalance: Available pendingBalance: Pending bankAccounts: BankAccount[] } export class AddBankAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: String }) source: string @Attr({ type: String }) isDefaultPaymentSource: boolean } export class UpdateBankAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: String }) bankAccountId: string } export class DeleteBankAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: String }) bankAccountId: string } export class ListExternalAccountDTO { @Attr({ type: String }) orgId: string @Attr({ type: Object }) options: BankAccountListOptions }