-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove 'opts' and update CardCreateOptions (#112)
- Loading branch information
Showing
5 changed files
with
48 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
export interface CardCreateOptions { | ||
/** Número do cartão. */ | ||
card_number: string; | ||
/** Data de expiração do cartão. */ | ||
card_expiration_date: string; | ||
/** Nome no cartão do portador. */ | ||
card_holder_name: string; | ||
/** Código de segurança do cartão. */ | ||
card_cvv?: string; | ||
/** Informações do cliente do card a ser gerado. */ | ||
customer_id?: number; | ||
/** Dados criptografados do cartão */ | ||
card_hash: string; | ||
} | ||
export type CardCreateOptions = { | ||
/** Informações do cliente do card a ser gerado. */ | ||
customer_id?: number; | ||
} & ( | ||
| { | ||
/** Número do cartão. */ | ||
card_number: string; | ||
/** Data de expiração do cartão. */ | ||
card_expiration_date: string; | ||
/** Nome no cartão do portador. */ | ||
card_holder_name: string; | ||
/** Código de segurança do cartão. */ | ||
card_cvv?: string; | ||
} | ||
| { | ||
/** Dados criptografados do cartão */ | ||
card_hash: string; | ||
} | ||
); | ||
|
||
export interface CardFindOptions { | ||
/** Id do cartão que deseja consultar os dados. */ | ||
id: string; | ||
/** Id do cartão que deseja consultar os dados. */ | ||
id: string; | ||
} | ||
|
||
export type CardAllOptions = CardFindOptions & { | ||
/** Pagination option to get a list of cards. Number of cards in a page */ | ||
count?: number; | ||
/** Pagination option for a list of cards. The page index. */ | ||
page?: number; | ||
} | ||
/** Pagination option to get a list of cards. Number of cards in a page */ | ||
count?: number; | ||
/** Pagination option for a list of cards. The page index. */ | ||
page?: number; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters