<commit_before>import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';

// Expose models
import * as ChargebackModel from './models/chargeback';
import * as CustomerModel from './models/customer';
import * as MandateModel from './models/mandate';
import * as MethodModel from './models/method';
import * as PaymentModel from './models/payment';
import * as RefundModel from './models/refund';
import * as SubscriptionModel from './models/subscription';

/**
 * Create Mollie client.
 * @since 2.0.0
 */
export default function mollie(options: any = {}) {
  if (!options.apiKey) {
    throw new TypeError('Missing parameter "apiKey".');
  }

  const httpClient = createHttpClient(options);

  this.Models = {
    Chargeback: ChargebackModel,
    Customer: CustomerModel,
    Mandate: MandateModel,
    Method: MethodModel,
    Payment: PaymentModel,
    Refund: RefundModel,
    Subscription: SubscriptionModel,
  };

  return createMollieApi({ httpClient });
}<commit_msg>Change how models are exposed<commit_after>import createHttpClient from './create-http-client';
import createMollieApi from './create-mollie-api';
// Expose models
import * as ChargebackModel from './models/chargeback';
import * as CustomerModel from './models/customer';
import * as MandateModel from './models/mandate';
import * as MethodModel from './models/method';
import * as PaymentModel from './models/payment';
import * as RefundModel from './models/refund';
import * as SubscriptionModel from './models/subscription';

/**
 * Create Mollie client.
 * @since 2.0.0
 */
export default function mollie(options: any = {}) {
  if (!options.apiKey) {
    throw new TypeError('Missing parameter "apiKey".');
  }

  const httpClient = createHttpClient(options);

  return Object.assign({}, createMollieApi({ httpClient }), {
    models: {
      Chargeback: ChargebackModel,
      Customer: CustomerModel,
      Mandate: MandateModel,
      Method: MethodModel,
      Payment: PaymentModel,
      Refund: RefundModel,
      Subscription: SubscriptionModel,
    },
  });
}
{'fraction_non_alphanumeric': 0.12715105162523901, 'fraction_numerical': 0.0028680688336520078, 'mean_word_length': 4.019184652278177, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1819891', 'n_tokens_mistral': 604, 'n_tokens_neox': 598, 'n_words': 171}