| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 1x 1x | import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';
/**
* Create Mollie client.
* @param options
* @returns {Object} available resources
* @since 2.0.0
*/
export default function mollie(options = {}) {
Eif (!options.apiKey) {
throw new TypeError('Missing parameter "apiKey".');
}
const httpClient = createHttpClient(options);
return createMollieApi({ httpClient });
}
|