UNPKG

@apihawk/billia-sdk

Version:

The ApiHawk Billia SDK

109 lines 4.1 kB
import { BilliaSDKServiceBase } from '../lib/billia-sdk-service-base'; import { IBilliaOAuthSession } from '../types'; import { IRestPaginationQuery } from '../types/common'; import { ICustomerGearTask, ICustomerProfile, ICustomerProfileCompany, ICustomerProfileEmail, INewCustomerProfile, INewCustomerProfileCompany, IVatCompanySearchResult } from './billia-sdk-customer.types'; export declare class BilliaSDKCustomer extends BilliaSDKServiceBase { /** * Fetches customer profiles. * * @param session user session */ getProfiles(session: IBilliaOAuthSession): Promise<ICustomerProfile[]>; /** * Fetches a customer profile by ID. * * @param session user session * @param profileId profile ID */ getProfileById(session: IBilliaOAuthSession, profileId: number): Promise<ICustomerProfile>; /** * Creates a customer profile. * * @param session user session * @param profileData the new profile information */ createProfile(session: IBilliaOAuthSession, profileData: INewCustomerProfile): Promise<ICustomerProfile>; /** * Updates a customer profile. * * @param session user session * @param profileId customer profile ID * @param data profile information */ updateProfile(session: IBilliaOAuthSession, profileId: number, data: Partial<ICustomerProfile>): Promise<any>; /** * Deactivates a customer profile. * * @param session user session * @param profileId customer profile ID */ deactivateProfile(session: IBilliaOAuthSession, profileId: number): Promise<any>; /** * Creates customer profile email. * * @param session user session * @param data email address data */ createCustomerProfileEmail(session: IBilliaOAuthSession, data: ICustomerProfileEmail): Promise<ICustomerProfileEmail>; /** * Updates a customer profile email. * * @param session user session * @param emailId customer email address ID * @param data information to update */ updateCustomerProfileEmail(session: IBilliaOAuthSession, emailId: number, data: Partial<ICustomerProfileEmail>): Promise<ICustomerProfileEmail>; /** * Removes a customer profile email address. * * @param session user session * @param emailId the customer profile email address ID */ removeCustomerProfileEmail(session: IBilliaOAuthSession, emailId: number): Promise<boolean>; /** * Creates a customer profile company. * * @param session user session * @param data the company data */ createCustomerProfileCompany(session: IBilliaOAuthSession, data: INewCustomerProfileCompany): Promise<ICustomerProfileCompany>; /** * Update customer profile company * @param session * @param {number} companyId * @param {ICustomerProfileCompany} data * @returns {Promise<any>} */ updateCustomerProfileCompany(session: IBilliaOAuthSession, companyId: number, data: Partial<ICustomerProfileCompany>): Promise<ICustomerProfileCompany>; /** * Removes a customer profile company. * * @param session user session * @param companyId the customer profile company ID */ removeCustomerProfileCompany(session: IBilliaOAuthSession, companyId: number): Promise<boolean>; /** * Validates company VAT. * * @param session user session */ validateVat(session: IBilliaOAuthSession, vat: string): Promise<IVatCompanySearchResult>; /** * Lists customer tasks which were processed by Gear. * * @param session user session * @param query query options */ getGearTasks(session: IBilliaOAuthSession, query?: IRestPaginationQuery): Promise<import("../types").IRestPaginatedResource<ICustomerGearTask>>; /** * Get My Domains. * * @author Anton Katsarov * @param {Object} session */ getMyDomains(session: IBilliaOAuthSession): Promise<{ cart: any; products: any; }>; } //# sourceMappingURL=billia-sdk-customer.d.ts.map