Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update TransactionCreateOptionsBase split_rules type #97

Merged
merged 5 commits into from
May 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/client/transactions/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface TransactionCalculateInstallmentsAmountOptions {
free_installments?: number;
}

interface SplitRuleArg {
export interface SplitRuleArg {
/** indica se o recebedor atrelado assumirá os riscos de chargeback da transação */
liable: boolean;
/** indica se o recebedor vinculado à regra será cobrado pelas taxas da transação */
Expand Down
3 changes: 2 additions & 1 deletion src/client/transactions/options/Create/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
} from './PaymentMethods/index';
import { Item, Billing, Shipping } from '../../common/index';
import { CustomerCreateOptions as Customer } from '../../../customers/options';
import {SplitRuleArg} from "../../options";

interface TransactionCreateOptionsBase {
/** Valor a ser cobrado. Deve ser passado em centavos. Ex: R$ 10.00 = 1000. Deve ser no mínimo 1 real (100) */
Expand All @@ -20,7 +21,7 @@ interface TransactionCreateOptionsBase {
/** Após a autorização de uma transação, você pode escolher se irá capturar ou adiar a captura do valor. Caso opte por postergar a captura, atribua o valor false. */
capture?: boolean;
/** Regras de divisão da transação */
split_rules?: Array<any>;
split_rules?: Array<SplitRuleArg>;
customer?: Customer | { id: string };
/** Obrigatório com o antifraude habilitado. Define os dados de cobrança, como nome e endereço */
billing?: Billing;
Expand Down