moip-sdk-node-ts
Version:
Moip v2 API wrapper
146 lines (145 loc) • 7.25 kB
TypeScript
/// <reference types="bluebird" />
export * from '../resources/customer-types';
export * from '../resources/order-types';
export * from '../resources/payment-types';
export * from '../resources/account-types';
export * from '../resources/notification-types';
export * from '../resources/bank-account-types';
export * from '../resources/plan-types';
export * from '../resources/subscriber-types';
export * from '../resources/subscription-types';
export * from '../resources/coupon-types';
export * from '../resources/multiorder-types';
export * from '../resources/multipayment-types';
export * from '../resources/transfer-types';
declare const _default: {
customer: {
getOne: (_id: string) => Promise<import("../resources/customer-types").Customer.Create.Response>;
getAll: () => Promise<any>;
create: (customer: import("../resources/customer-types").Customer.Create.Payload) => Promise<import("../resources/customer-types").Customer.Create.Response>;
query: (_query: {
filters: Record<string, any>;
}) => Promise<any>;
createCreditCard: (_id: string, creditCard: import("../resources/payment-types").CreditCard) => Promise<any>;
removeCreditCard: (_id: string) => Promise<any>;
};
order: {
getOne: (_id: string) => Promise<any>;
getAll: () => Promise<any>;
create: (order: import("../resources/order-types").Order.Create.Payload) => Promise<import("../resources/order-types").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("../resources/payment-types").Payment.Create.Payload) => Promise<import("../resources/payment-types").Payment.Create.Response>;
preAuthorizationCapture: (_id: string) => Promise<import("../resources/payment-types").Payment.Create.Response>;
preAuthorizationCancel: (_id: string) => Promise<import("../resources/payment-types").Payment.Create.Response>;
_authorize: (_id: string, amount: string) => Promise<any>;
refunds: {
refund: (_id: string, refund: import("../resources/payment-types").Refund) => Promise<any>;
getRefunds: (_id: string) => Promise<any>;
};
};
escrow: {
release: (_id: string) => Promise<any>;
};
account: {
create: (account: import("../resources/account-types").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("../resources/notification-types").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("./types").HttpConfig) => Promise<any>;
};
bankAccount: {
create: (_id: string, bankAccount: import("../resources/bank-account-types").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("../resources/plan-types").Plan) => Promise<any>;
activate: (_code: string) => Promise<any>;
inactivate: (_code: string) => Promise<any>;
update: (_code: string, plan: import("../resources/plan-types").Plan) => Promise<any>;
};
subscriber: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (subscriber: import("../resources/subscriber-types").Subscriber, config: import("./types").HttpConfig) => Promise<any>;
update: (_code: string, subscriber: import("../resources/subscriber-types").Subscriber) => Promise<any>;
updateBilling: (_code: string, billingInfo: import("../resources/subscriber-types").BillingInfo) => Promise<any>;
};
subscription: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (subscription: import("../resources/subscription-types").Subscription, config: import("./types").HttpConfig) => Promise<any>;
update: (_code: string, subscription: import("../resources/subscription-types").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("../resources/notification-types").NotificationPreferences) => Promise<any>;
};
coupon: {
getOne: (_code: string) => Promise<any>;
getAll: () => Promise<any>;
create: (coupon: import("../resources/coupon-types").Coupon) => Promise<any>;
associate: (_code: string, coupon: import("../resources/coupon-types").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("../resources/multiorder-types").MultiOrder) => Promise<any>;
};
multipayment: {
getOne: (_id: string) => Promise<any>;
create: (multiorderId: string, multipayment: import("../resources/multipayment-types").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("../resources/transfer-types").Transfer, accessToken?: string | undefined) => Promise<any>;
};
balance: {
getOne: (accessToken?: string | undefined) => Promise<any>;
};
};
export default _default;