Skip to content
Open
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
102 changes: 102 additions & 0 deletions types/resources/profile.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
export class Profile extends PlivoResource {
constructor(client: Function, data?: {});
id: string;
}

export class ProfileResponse {
constructor(params: object);
apiId: string;
profileUuid: string;
message: string;
}

export class ProfileInterface extends PlivoResource {
constructor(client: Function, data?: {});
/**
* get Profile by given profileuuid
* @method
* @param {string} profileUUID - id of profileUUID
* @promise {object} return {@link Profile} object
* @fail {Error} return Error
*/
get(profileUUID: string): Promise<Profile>;

/**
* Get All Profile Detail
* @method
* @param {object} params - params limit and offset
* @promise {object[]} returns list of Profile Object
* @fail {Error} returns Error
*/
list(params: object): Promise<Profile[]>;

/**
* delete Profile by given profileuuid
* @method
* @param {string} profileUUID - id of profileUUID
* @fail {Error} return Error
*/
delete(profileUUID: string): Promise<any>;

/**
* Create a new Profile
*
* @param {string} profile_alias
* @param {string} plivo_subaccount
* @param {string} customer_type
* @param {string} entity_type
* @param {string} company_name
* @param {string} ein
* @param {string} vertical
* @param {string} ein_issuing_country
* @param {string} stock_symbol
* @param {string} stock_exchange
* @param {string} alt_business_id_type
* @param {string} website
* @param {object} address
* @param {object} authorized_contact
* @return profileResponse response output
*/
create(
profile_alias: string,
plivo_subaccount: string,
customer_type: string,
entity_type: string,
company_name: string,
ein: string,
vertical: string,
ein_issuing_country: string,
stock_symbol: string,
stock_exchange: string,
alt_business_id_type: string,
website: string,
address: object,
authorized_contact: object
): Promise<ProfileResponse>;

/**
* update a new Profile
*
* @param {string} profile_uuid
* @param {object } address
* @param {object } authorized_contact
* @param {string} entity_type
* @param {string} vertical
* @param {string} company_name
* @param {string} website
* @return profileResponse response output
*/
update(
profile_uuid: string,
params: {
address?: object;
authorized_contact?: object;
entity_type?: string;
vertical?: string;
company_name?: string;
website?: string;
}
): Promise<ProfileResponse>;
}

import { PlivoResource } from "../base";
Loading