feat: implement SalesInvoiceTspSwitchService and SalesInvoiceTspService for handling TSP provider interactions
- Add SalesInvoiceTspSwitchService to manage TSP provider selection and sending invoices. - Introduce SalesInvoiceTspService for creating, sending, and retrieving sales invoices. - Implement NamaProviderSwitchAdapter for communication with the NAMA TSP provider API. - Define DTOs for request and response structures specific to the NAMA provider. - Enhance error handling and logging for TSP provider interactions.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { PartnerFiscalSwitchType, PartnerStatus } from '@/generated/prisma/enums'
|
||||
import { PartnerStatus, TspProviderType } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
|
||||
@@ -11,9 +11,9 @@ export class CreatePartnerDto {
|
||||
@ApiProperty({ required: true })
|
||||
code: string
|
||||
|
||||
@IsEnum(PartnerFiscalSwitchType)
|
||||
@ApiProperty({ required: true })
|
||||
fiscal_switch_type: PartnerFiscalSwitchType
|
||||
@IsEnum(TspProviderType)
|
||||
@ApiProperty({ required: true, enum: TspProviderType })
|
||||
tsp_provider: TspProviderType
|
||||
|
||||
// @IsOptional()
|
||||
// @IsNumber()
|
||||
|
||||
@@ -27,7 +27,7 @@ export class PartnersService {
|
||||
code: true,
|
||||
status: true,
|
||||
logo_url: true,
|
||||
fiscal_switch_type: true,
|
||||
tsp_provider: true,
|
||||
created_at: true,
|
||||
license_charge_transactions: {
|
||||
select: {
|
||||
|
||||
Reference in New Issue
Block a user