UNPKG

softbankjs

Version:
73 lines (72 loc) 2.05 kB
/** * @interface XMLFieldData * @property {string} _text - XML value */ export interface XMLFieldData { _text: string; } /** * @interface SoftbankResponse * @property {XMLFieldData} [res_result] * @property {XMLFieldData} [res_code] * @property {XMLFieldData} [res_message] * @property {XMLFieldData} [error_message] */ export interface SoftbankResponse { res_result: XMLFieldData; res_err_code: XMLFieldData; res_date: XMLFieldData; error?: any; error_message?: string; } /** * @enum {string} * @property {string} EN - en * @property {string} JA - ja */ export declare enum Locale { EN = "en", JA = "ja" } export declare enum ResultText { NG = "NG", OK = "OK" } /** * @constructor * @param {string} endpoint Softbank API endpoint * @param {string} merchantId Softbank API merchant ID * @param {string} serviceId Softbank API service ID * @param {string} hashKey Softbank API hash key * @param {string} locale Softbank API locale */ export declare class SoftbankService { endpoint: string; merchantId: string; serviceId: string; hashKey: string; locale: Locale; debug: boolean; requestId: { CREATE_CUSTOMER_REQUEST: string; UPDATE_CUSTOMER_REQUEST: string; CREATE_CUSTOMER_TOKEN_REQUEST: string; UPDATE_CUSTOMER_TOKEN_REQUEST: string; DELETE_CUSTOMER_REQUEST: string; GET_CUSTOMER_REQUEST: string; CREATE_TRANSACTION_REQUEST: string; CONFIRM_TRANSACTION_REQUEST: string; PURCHASE_REQUEST: string; REFUND_REQUEST: string; }; constructor(endpoint: string, merchantId: string, serviceId: string, hashKey: string, locale?: Locale, debug?: boolean); /** * @function generateHashCode * @memberof SoftbankService * @param {string[]} args * @returns string */ generateHashCode(...args: string[]): string; private parseMessageError; request(data: any): Promise<any>; }