moip-sdk-node-ts
Version:
Moip v2 API wrapper
135 lines (134 loc) • 6.24 kB
TypeScript
/// <reference types="bluebird" />
import client from './client';
export default client;
export declare const connect: (opts: import("./client").ConnectOpts) => {
customer: {
getOne: (_id: string) => Promise<import("./client").Customer.Create.Response>;
getAll: () => Promise<any>;
create: (customer: import("./client").Customer.Create.Payload) => Promise<import("./client").Customer.Create.Response>;
query: (_query: {
filters: Record<string, any>;
}) => Promise<any>;
createCreditCard: (_id: string, creditCard: import("./client").CreditCard) => Promise<any>;
removeCreditCard: (_id: string) => Promise<any>;
};
order: {
getOne: (_id: string) => Promise<any>;
getAll: () => Promise<any>;
create: (order: import("./client").Order.Create.Payload) => Promise<import("./client").Order.Create.Response>;
query: (_query: {
filters: Record<string, any>;
}) => Promise<any>;
refunds: {
refund: (_id: string, method: import("./resources/order").RefundMethod) => Promise<any>;
getRefunds: (_id: string) => Promise<any>;
};
};
payment: {
getOne: (_id: string) => Promise<any>;
create: (orderId: string, payment: import("./client").Payment.Create.Payload) => Promise<import("./client").Payment.Create.Response>;
preAuthorizationCapture: (_id: string) => Promise<import("./client").Payment.Create.Response>;
preAuthorizationCancel: (_id: string) => Promise<import("./client").Payment.Create.Response>;
_authorize: (_id: string, amount: string) => Promise<any>;
refunds: {
refund: (_id: string, refund: import("./client").Refund) => Promise<any>;
getRefunds: (_id: string) => Promise<any>;
};
};
escrow: {
release: (_id: string) => Promise<any>;
};
account: {
create: (account: import("./client").Account) => Promise<any>;
getOne: (_id: string) => Promise<any>;
exists: (_query: Record<string, any>) => Promise<any>;
};
notification: {
getOne: (_id: string) => Promise<any>;
getAll: () => Promise<any>;
create: (preferences: import("./client").NotificationPreferences, appId?: string | undefined) => Promise<any>;
remove: (_id: string) => Promise<any>;
};
connect: {
getAuthorizeUrl: (payload: {
clientId: string;
redirectUri: string;
scopes: string;
}) => import("bluebird")<unknown>;
generateToken: (config: import("./client").HttpConfig) => Promise<any>;
};
bankAccount: {
create: (_id: string, bankAccount: import("./client").BankAccount, accessToken?: string | undefined) => Promise<any>;
getOne: (_id: string, accessToken?: string | undefined) => Promise<any>;
getAll: (_id: string, accessToken?: string | undefined) => Promise<any>;
remove: (_id: string, accessToken?: string | undefined) => Promise<any>;
};
webhook: {
getOne: (_id: string) => Promise<any>;
query: (_query: {
filters: Record<string, any>;
}) => Promise<any>;
getAll: () => Promise<any>;
};
plan: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (plan: import("./client").Plan) => Promise<any>;
activate: (_code: string) => Promise<any>;
inactivate: (_code: string) => Promise<any>;
update: (_code: string, plan: import("./client").Plan) => Promise<any>;
};
subscriber: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (subscriber: import("./client").Subscriber, config: import("./client").HttpConfig) => Promise<any>;
update: (_code: string, subscriber: import("./client").Subscriber) => Promise<any>;
updateBilling: (_code: string, billingInfo: import("./client").BillingInfo) => Promise<any>;
};
subscription: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (subscription: import("./client").Subscription, config: import("./client").HttpConfig) => Promise<any>;
update: (_code: string, subscription: import("./client").Subscription) => Promise<any>;
updatePaymentMethod: (_code: string, paymentMethod: import("./resources/subscription").SubscriptionPaymentMethod) => Promise<any>;
suspend: (_code: string) => Promise<any>;
activate: (_code: string) => Promise<any>;
cancel: (_code: string) => Promise<any>;
getOneInvoice: (_id: string) => Promise<any>;
getAllInvoices: (_code: string) => Promise<any>;
getOnePayment: (_id: string) => Promise<any>;
getAllPayments: (_id: string) => Promise<any>;
createNotification: (notification: import("./client").NotificationPreferences) => Promise<any>;
};
coupon: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (coupon: import("./client").Coupon) => Promise<any>;
associate: (_code: string, coupon: import("./client").Coupon) => Promise<any>;
activate: (_code: string) => Promise<any>;
inactivate: (_code: string) => Promise<any>;
};
refund: {
get: (_id: string) => Promise<any>;
};
multiorder: {
getOne: (_id: string) => Promise<any>;
create: (multiorder: import("./client").MultiOrder) => Promise<any>;
};
multipayment: {
getOne: (_id: string) => Promise<any>;
create: (multiorderId: string, multipayment: import("./client").MultiPayment) => Promise<any>;
preAuthorizationCapture: (_id: string) => Promise<any>;
preAuthorizationCancel: (_id: string) => Promise<any>;
};
transfer: {
getOne: (_id: string) => Promise<any>;
getAll: () => Promise<any>;
reverse: (_id: string) => Promise<any>;
create: (transfer: import("./client").Transfer, accessToken?: string | undefined) => Promise<any>;
};
balance: {
getOne: (accessToken?: string | undefined) => Promise<any>;
};
};
export * from './client';