import { Attr } from 'ts-framework' import { SortDTO } from './common' import { UserNameResponseDTO } from './user' export class WalletTransactionResponseDTO { id: string stripeTransactionId: string stripeSourceId: string transactionType: string paymentMethod: string rideId: string orgId: string transactionUserId: string amount: number totalBalance: number walletId: string destinationId: string } export class ChargeForCanceledRideResponseDTO { chargeAmount: number cancellationPrice: number rideId: string } export class CalculateGeoProcessRidePaymentDTO { @Attr({ type: String }) customerId: string @Attr({ type: String }) rideId: string @Attr({ type: String }) serviceName: string @Attr({ type: String }) transactionUserId: string @Attr({ type: String }) orgId: string @Attr({ type: String }) pickup: string @Attr({ type: String }) dropoff: string @Attr({ type: Number }) riderCount: number @Attr({ type: String }) serviceId: string } export class CalculateProcessRidePaymentDTO { @Attr({ type: String }) rideId: string @Attr({ type: String }) customerId: string @Attr({ type: String }) transactionUserId: string @Attr({ type: String }) orgId: string @Attr({ type: String }) currency: string @Attr({ type: Number }) duration: number @Attr({ type: Number }) distance: number @Attr({ type: Number }) riderCount: number @Attr({ type: String }) serviceId: string @Attr({ type: String }) serviceName: string @Attr({ type: String }) providerPricingId: string } export class ChargeForCanceledRideDTO { @Attr({ type: String }) customerId: string @Attr({ type: String }) orgId: string @Attr({ type: String }) serviceId: string @Attr({ type: String }) pricingId: string @Attr({ type: String }) rideId: string @Attr({ type: String }) transactionUserId: string @Attr({ type: String }) serviceName: string @Attr({ type: Number, optional: true }) amount?: number @Attr({ type: String }) cancellationReason?: string } export class CheckIfEligibleToProcessDTO { @Attr({ type: String }) userId: string @Attr({ type: Number }) customerPayment: number @Attr({ type: String }) rideId: string } export class FilterWalletTransactionsDTO { @Attr({ type: String, optional: true }) sort?: SortDTO @Attr({ type: Number, optional: true }) limit?: number @Attr({ type: Number, optional: true }) offset?: number } export class GetWalletTransactionsByUserIdDTO { @Attr({ type: String }) userId: string @Attr({ type: String, optional: true }) sort?: SortDTO @Attr({ type: Number, optional: true }) limit?: number @Attr({ type: Number, optional: true }) offset?: number } export class GetWalletTransactionsByWalletIdDTO { @Attr({ type: String }) walletId: string @Attr({ type: String }) sort?: SortDTO @Attr({ type: Number }) limit?: number @Attr({ type: Number }) offset?: number } export class CountWalletTransactionByUserIdDTO { @Attr({ type: String }) userId: string } export class DepositRiderWalletDTO { @Attr({ type: String }) userId: string @Attr({ type: String }) amount: number @Attr({ type: String, optional: true }) message?: string @Attr({ type: String, optional: true }) source?: string } export class RefundRiderWalletDTO { @Attr({ type: Object, optional: true }) data: { object:{ amount : number, customer: string, id: string, stripeSourceId: string, payment_method: string, source: string, refunds: { data: [{ reason : string }] } } } } export class GetWalletTransactionsByRideIdDTO { @Attr({ type: String }) rideId: string } export class ProcessRideDTO { @Attr({ type: String }) customerId: string @Attr({ type: String }) orgId: string @Attr({ type: String }) rideId: string @Attr({ type: Number }) amount: number @Attr({ type: String }) serviceId: string @Attr({ type: String }) serviceName: string @Attr({ type: String }) transactionUserId: string } export class WalletTransactionsResponseDTO { @Attr({ type: String }) id: string @Attr({ type: String }) stripeTransactionId: string @Attr({ type: String }) stripeSourceId: string @Attr({ type: String }) transactionType: string @Attr({ type: String }) paymentMethod: string @Attr({ type: String }) rideId: string @Attr({ type: String }) orgId: string @Attr({ type: String }) transactionUserId: string @Attr({ type: Number }) amount: number @Attr({ type: Number }) totalBalance: number @Attr({ type: String }) walletId: string @Attr({ type: String }) destinationId: string @Attr({ type: Object }) updatedAt: object @Attr({ type: Object }) createdAt: object @Attr({ type: String }) initiatorUserId?: string @Attr({ type: String }) transactionMessage?: string @Attr({ type: UserNameResponseDTO }) initiatorUser?: UserNameResponseDTO }