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:
@@ -12,6 +12,9 @@ export class BusinessActivitiesService {
|
||||
name: true,
|
||||
economic_code: true,
|
||||
created_at: true,
|
||||
partner_token: true,
|
||||
fiscal_id: true,
|
||||
invoice_number_sequence: true,
|
||||
guild: {
|
||||
select: {
|
||||
id: true,
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsString } from 'class-validator'
|
||||
import { IsNumber, IsString, Max, Min } from 'class-validator'
|
||||
|
||||
export class CreateBusinessActivityDto {
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
name: string
|
||||
|
||||
@ApiProperty({ required: false, default: '1' })
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@Max(1_000_000_000)
|
||||
invoice_number_sequence: number
|
||||
}
|
||||
|
||||
export class UpdateBusinessActivityDto extends PartialType(CreateBusinessActivityDto) {}
|
||||
|
||||
Reference in New Issue
Block a user