update switch providers and nama provider. fix original send
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
import { TspProviderResponseStatus, TspProviderType } from '@/generated/prisma/enums'
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import {
|
||||
IsBoolean,
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
IsNumber,
|
||||
IsObject,
|
||||
IsOptional,
|
||||
IsString,
|
||||
} from 'class-validator'
|
||||
|
||||
export class TspProviderRevokePayloadDto {
|
||||
@ApiProperty({ required: true, nullable: true })
|
||||
@IsNumber()
|
||||
invoice_number: number
|
||||
|
||||
@ApiProperty({ required: true, nullable: true })
|
||||
@IsString()
|
||||
invoice_id: string
|
||||
|
||||
@ApiProperty({ required: true, enum: TspProviderType })
|
||||
@IsEnum(TspProviderType)
|
||||
tsp_provider: TspProviderType
|
||||
|
||||
@ApiProperty({ required: true, nullable: true })
|
||||
@IsString()
|
||||
economic_code: string
|
||||
|
||||
@ApiProperty({ required: true, nullable: true })
|
||||
@IsString()
|
||||
fiscal_id: string
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsString()
|
||||
tsp_token: string
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsString()
|
||||
last_tax_id: string
|
||||
}
|
||||
|
||||
export class TspProviderRevokeResponseDto {
|
||||
@ApiProperty({ required: true, nullable: true })
|
||||
@IsString()
|
||||
invoice_id: string
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsString()
|
||||
tax_id: string
|
||||
|
||||
@ApiProperty({ enum: TspProviderResponseStatus })
|
||||
@IsEnum(TspProviderResponseStatus)
|
||||
status: TspProviderResponseStatus
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsBoolean()
|
||||
hasError: boolean
|
||||
|
||||
@ApiProperty({ required: false, nullable: true })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
message?: string | null
|
||||
|
||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
provider_request_payload?: unknown
|
||||
|
||||
@ApiProperty({ required: false, nullable: true, type: Object })
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
provider_response_payload?: unknown
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsDateString()
|
||||
sent_at: string
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsDateString()
|
||||
received_at: string
|
||||
}
|
||||
Reference in New Issue
Block a user