Skip to content

Commit

Permalink
feat: add type for payment customer
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabrielpanga committed Dec 15, 2023
1 parent 4bae2ae commit 2294dad
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/types/payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ export const PAYMENT_RECIPIENT_BANK_ACCOUNT_TYPES = [
*/
export type PaymentRecipientBankAccountType = typeof PAYMENT_RECIPIENT_BANK_ACCOUNT_TYPES[number]

export const PAYMENT_CUSTOMER_TYPE = ['INDIVIDUAL', 'BUSINESS'] as const
/**
* @typedef PaymentCustomerType
* Types of customers
*/
export type PaymentCustomerType = typeof PAYMENT_CUSTOMER_TYPE[number]

export type CreatePaymentRequest = {
amount: number
callbackUrls?: CallbackUrls
Expand Down Expand Up @@ -108,7 +115,7 @@ export type CreatePaymentCustomer = {
email: string
cpf: string
cnpj: string
type: 'INDIVIDUAL' | 'BUSINESS'
type: PaymentCustomerType
}

export type PaymentInstitution = {
Expand Down Expand Up @@ -138,7 +145,7 @@ export type PaymentCustomer = {
email: string
cpf: string
cnpj: string
type: 'INDIVIDUAL' | 'BUSINESS'
type: PaymentCustomerType
createdAt: Date
updatedAt: Date
}
Expand Down

0 comments on commit 2294dad

Please sign in to comment.