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,kBAAkB,GAE/B,qBAAsB,IAAI,4BAA4B,GACtD,YAAa,IAAI,oBAAoB,GAErC,kBAAmB,IAAI,yBAAyB,GAEhD,UAAW,IAAI,kBAAkB,GACjC,mBAAoB,IAAI,0BAA0B,GAElD,mBAAoB,IAAI,0BAA0B,GAElD,aAAc,IAAI,sBAAsB,GACxC,wBAAyB,IAAI,+BAA+B,GAE5D,OAAQ,IAAI,eAAe,GAC3B,eAAgB,IAAI,gBAAgB,GACpC,aAAc,IAAI,oBAAoB,GACtC,gBAAiB,IAAI,uBAAuB,GAE5C,iBAAkB,IAAI,wBAAwB,GAE9C,YAAa,IAAI,oBAAoB,GAErC,cAAe,IAAI,sBAAsB,GAEzC,SAAU,IAAI,iBAAiB,GAE/B,WAAY,IAAI,mBAAmB,GAGvC,CAEA,QAAQ,mBAAqB,mBAC7B,QAAQ,QAAU","file":"/npm/@the-any-thing/mollie-api-client-inline-pem@3.2.0-2/dist/mollie.cjs.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@the-any-thing/mollie-api-client-inline-pem@3.2.0-2/dist/mollie.cjs.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar axios = _interopDefault(require('axios'));\nvar fs = _interopDefault(require('fs'));\nvar https = _interopDefault(require('https'));\nvar path = _interopDefault(require('path'));\nvar lodash = require('lodash');\nvar url = require('url');\nvar querystring = _interopDefault(require('qs'));\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n  try {\n    var info = gen[key](arg);\n    var value = info.value;\n  } catch (error) {\n    reject(error);\n    return;\n  }\n\n  if (info.done) {\n    resolve(value);\n  } else {\n    Promise.resolve(value).then(_next, _throw);\n  }\n}\n\nfunction _asyncToGenerator(fn) {\n  return function () {\n    var self = this,\n        args = arguments;\n    return new Promise(function (resolve, reject) {\n      var gen = fn.apply(self, args);\n\n      function _next(value) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n      }\n\n      function _throw(err) {\n        asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n      }\n\n      _next(undefined);\n    });\n  };\n}\n\nfunction _defineProperty(obj, key, value) {\n  if (key in obj) {\n    Object.defineProperty(obj, key, {\n      value: value,\n      enumerable: true,\n      configurable: true,\n      writable: true\n    });\n  } else {\n    obj[key] = value;\n  }\n\n  return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n  var keys = Object.keys(object);\n\n  if (Object.getOwnPropertySymbols) {\n    var symbols = Object.getOwnPropertySymbols(object);\n    if (enumerableOnly) symbols = symbols.filter(function (sym) {\n      return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n    });\n    keys.push.apply(keys, symbols);\n  }\n\n  return keys;\n}\n\nfunction _objectSpread2(target) {\n  for (var i = 1; i < arguments.length; i++) {\n    var source = arguments[i] != null ? arguments[i] : {};\n\n    if (i % 2) {\n      ownKeys(source, true).forEach(function (key) {\n        _defineProperty(target, key, source[key]);\n      });\n    } else if (Object.getOwnPropertyDescriptors) {\n      Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n    } else {\n      ownKeys(source).forEach(function (key) {\n        Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n      });\n    }\n  }\n\n  return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n  if (source == null) return {};\n  var target = {};\n  var sourceKeys = Object.keys(source);\n  var key, i;\n\n  for (i = 0; i < sourceKeys.length; i++) {\n    key = sourceKeys[i];\n    if (excluded.indexOf(key) >= 0) continue;\n    target[key] = source[key];\n  }\n\n  return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n  if (source == null) return {};\n\n  var target = _objectWithoutPropertiesLoose(source, excluded);\n\n  var key, i;\n\n  if (Object.getOwnPropertySymbols) {\n    var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n    for (i = 0; i < sourceSymbolKeys.length; i++) {\n      key = sourceSymbolKeys[i];\n      if (excluded.indexOf(key) >= 0) continue;\n      if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n      target[key] = source[key];\n    }\n  }\n\n  return target;\n}\n\nvar version = \"3.2.0-2\";\n\nvar commonHelpers = {\n  /**\n   * Converts this object to a plain one.\n   */\n  toPlainObject: function toPlainObject() {\n    // Previously, we used Lodash' toPlainObject here. However, back then we used classes for our models instead of\n    // interfaces. This should have the same effect on the new object as _.toPlainObject had on the old ones: returning\n    // a plain object with no prototype.\n    return Object.assign({}, this);\n  }\n};\n\n/* eslint-enable @typescript-eslint/camelcase */\n\n(function (OrderLineType) {\n  OrderLineType[\"physical\"] = \"physical\";\n  OrderLineType[\"discount\"] = \"discount\";\n  OrderLineType[\"digital\"] = \"digital\";\n  OrderLineType[\"shipping_fee\"] = \"shipping_fee\";\n  OrderLineType[\"store_credit\"] = \"store_credit\";\n  OrderLineType[\"gift_card\"] = \"gift_card\";\n  OrderLineType[\"surcharge\"] = \"surcharge\";\n})(exports.OrderLineType || (exports.OrderLineType = {}));\n\nfunction injectPrototypes(input) {\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\n/**\n * The `Refund` model\n *\n * {@link IRefund}\n */\n\n(function (RefundStatus) {\n  RefundStatus[\"queued\"] = \"queued\";\n  RefundStatus[\"pending\"] = \"pending\";\n  RefundStatus[\"processing\"] = \"processing\";\n  RefundStatus[\"refunded\"] = \"refunded\";\n  RefundStatus[\"failed\"] = \"failed\";\n})(exports.RefundStatus || (exports.RefundStatus = {}));\n/**\n * Payment Refund _links object\n *\n * @param payment - The API resource URL of the payment the refund belongs to.\n * @param settlement - The API resource URL of the settlement this payment has been settled with. Not present if not yet settled.\n * @param order - The API resource URL of the order the refund belongs to. Not present if the refund does not belong to an order.\n */\n\n(function (RefundEmbed) {\n  RefundEmbed[\"payment\"] = \"payment\";\n})(exports.RefundEmbed || (exports.RefundEmbed = {}));\n\nvar refundHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * The refund is queued until there is enough balance to process te refund.\n   * You can still cancel the refund.\n   */\n  isQueued: function isQueued() {\n    return this.status === exports.RefundStatus.queued;\n  },\n\n  /**\n   * The refund will be sent to the bank on the next business day. You can still cancel the refund.\n   */\n  isPending: function isPending() {\n    return this.status === exports.RefundStatus.pending;\n  },\n\n  /**\n   * The refund has been sent to the bank. The refund amount will be transferred to the consumer\n   * account as soon as possible.\n   */\n  isProcessing: function isProcessing() {\n    return this.status === exports.RefundStatus.processing;\n  },\n\n  /**\n   * The refund amount has been transferred to the consumer.\n   */\n  isRefunded: function isRefunded() {\n    return this.status === exports.RefundStatus.refunded;\n  },\n\n  /**\n   * The refund has failed during processing.\n   */\n  isFailed: function isFailed() {\n    return this.status === exports.RefundStatus.failed;\n  }\n});\n\nfunction injectPrototypes$1(input) {\n  let lines;\n\n  if (input.lines != undefined) {\n    lines = input.lines.map(injectPrototypes);\n  }\n\n  return Object.assign(Object.create(refundHelpers), input, {\n    lines\n  });\n}\n\n/* eslint-disable @typescript-eslint/camelcase */\n/* eslint-enable @typescript-eslint/camelcase */\n\n(function (Locale) {\n  Locale[\"en_US\"] = \"en_US\";\n  Locale[\"nl_NL\"] = \"nl_NL\";\n  Locale[\"nl_BE\"] = \"nl_BE\";\n  Locale[\"fr_FR\"] = \"fr_FR\";\n  Locale[\"fr_BE\"] = \"fr_BE\";\n  Locale[\"de_DE\"] = \"de_DE\";\n  Locale[\"de_AT\"] = \"de_AT\";\n  Locale[\"de_CH\"] = \"de_CH\";\n  Locale[\"es_ES\"] = \"es_ES\";\n  Locale[\"ca_ES\"] = \"ca_ES\";\n  Locale[\"pt_PT\"] = \"pt_PT\";\n  Locale[\"it_IT\"] = \"it_IT\";\n  Locale[\"nb_NO\"] = \"nb_NO\";\n  Locale[\"sv_SE\"] = \"sv_SE\";\n  Locale[\"fi_FI\"] = \"fi_FI\";\n  Locale[\"da_DK\"] = \"da_DK\";\n  Locale[\"is_IS\"] = \"is_IS\";\n  Locale[\"hu_HU\"] = \"hu_HU\";\n  Locale[\"pl_PL\"] = \"pl_PL\";\n  Locale[\"lv_LV\"] = \"lv_LV\";\n  Locale[\"lt_LT\"] = \"lt_LT\";\n})(exports.Locale || (exports.Locale = {}));\n\n(function (PaymentMethod) {\n  PaymentMethod[\"applepay\"] = \"applepay\";\n  PaymentMethod[\"bancontact\"] = \"bancontact\";\n  PaymentMethod[\"banktransfer\"] = \"banktransfer\";\n  PaymentMethod[\"belfius\"] = \"belfius\";\n  PaymentMethod[\"creditcard\"] = \"creditcard\";\n  PaymentMethod[\"directdebit\"] = \"directdebit\";\n  PaymentMethod[\"eps\"] = \"eps\";\n  PaymentMethod[\"giftcard\"] = \"giftcard\";\n  PaymentMethod[\"giropay\"] = \"giropay\";\n  PaymentMethod[\"ideal\"] = \"ideal\";\n  PaymentMethod[\"inghomepay\"] = \"inghomepay\";\n  PaymentMethod[\"kbc\"] = \"kbc\";\n  PaymentMethod[\"klarnapaylater\"] = \"klarnapaylater\";\n  PaymentMethod[\"klarnasliceit\"] = \"klarnasliceit\";\n  PaymentMethod[\"paypal\"] = \"paypal\";\n  PaymentMethod[\"paysafecard\"] = \"paysafecard\";\n  PaymentMethod[\"przelewy24\"] = \"przelewy24\";\n  PaymentMethod[\"sofort\"] = \"sofort\";\n})(exports.PaymentMethod || (exports.PaymentMethod = {}));\n\n(function (HistoricPaymentMethod) {\n  HistoricPaymentMethod[\"bitcoin\"] = \"bitcoin\";\n})(exports.HistoricPaymentMethod || (exports.HistoricPaymentMethod = {}));\n\n(function (ApiMode) {\n  ApiMode[\"test\"] = \"test\";\n  ApiMode[\"live\"] = \"live\";\n})(exports.ApiMode || (exports.ApiMode = {}));\n\n(function (SequenceType) {\n  SequenceType[\"oneoff\"] = \"oneoff\";\n  SequenceType[\"first\"] = \"first\";\n  SequenceType[\"recurring\"] = \"recurring\";\n})(exports.SequenceType || (exports.SequenceType = {}));\n\n/**\n * Payment Response Object.\n *\n * @param resource - Indicates the response contains a payment object.\n *                   Will always contain `payment` for this endpoint.\n * @param id - The identifier uniquely referring to this payment.\n *             Mollie assigns this identifier at payment creation time.\n *             For example `tr_7UhSN1zuXS`. Its ID will always be used\n *             by Mollie to refer to a certain payment.\n * @param mode - The mode used to create this payment. Mode determines\n *               whether a payment is real (live mode) or a test payment.\n * @param createdAt - The payment’s date and time of creation, in ISO\n *                    8601 format.\n * @param status - The payment’s status. Please refer to the documentation\n *                 regarding statuses for more info about which statuses\n *                 occur at what point.\n * @param isCancelable - Whether or not the payment can be canceled.\n * @param authorizedAt - The date and time the payment became authorized,\n *                       in ISO 8601 format. This parameter is omitted if\n *                       the payment is not authorized (yet).\n * @param paidAt - The date and time the payment became paid, in ISO 8601\n *                 format. This parameter is omitted if the payment is not\n *                 completed (yet).\n * @param canceledAt - The date and time the payment was canceled, in\n *                     ISO 8601 format. This parameter is omitted if the\n *                     payment is not canceled (yet).\n * @param expiresAt - The date and time the payment will expire, in\n *                    ISO 8601 format.\n * @param expiredAt - The date and time the payment was expired, in\n *                    ISO 8601 format. This parameter is omitted if the\n *                    payment did not expire (yet).\n * @param failedAt - The date and time the payment failed, in ISO 8601 format.\n *                   This parameter is omitted if the payment did not fail (yet).\n * @param amount - The amount of the payment, e.g. `{\"currency\":\"EUR\", \"value\":\"100.00\"}`\n *                 for a €100.00 payment.\n * @param amountRefunded - The total amount that is already refunded. Only\n *                         available when refunds are available for this payment.\n *                         For some payment methods, this amount may be higher than\n *                         the payment amount, for example to allow reimbursement of\n *                         the costs for a return shipment to the customer.\n * @param amountRemaining - The remaining amount that can be refunded. Only available\n *                          when refunds are available for this payment.\n * @param amountCaptured - The total amount that is already captured for this payment.\n *                         Only available when this payment supports captures.\n * @param description - A short description of the payment. The description is visible\n *                      in the Dashboard and will be shown on the customer’s bank or card\n *                      statement when possible.\n * @param redirectUrl - The URL your customer will be redirected to after completing or\n *                      canceling the payment process. (The URL will be `null` for\n *                      recurring payments.)`\n * @param webhookUrl - The URL Mollie will call as soon an important status change\n *                     takes place.\n * @param method - The payment method used for this payment, either forced on creation\n *                 by specifying the method parameter, or chosen by the customer on our\n *                 payment method selection screen. If the payment is only partially paid\n *                 with a gift card, the method remains `giftcard`.\n * @param metadata - The optional metadata you provided upon payment creation. Metadata\n *                   can for example be used to link an order to a payment.\n * @param locale - The customer’s locale, either forced on creation by specifying the locale\n *                 parameter, or detected by us during checkout. Will be a full locale, for\n *                 example `nl_NL`.\n * @param countryCode - This optional field contains your customer’s ISO 3166-1 alpha-2\n *                      country code, detected by us during checkout. For example: `BE`.\n *                      This field is omitted if the country code was not detected.\n * @param profileId - The identifier referring to the profile this payment was created on.\n *                    For example, `pfl_QkEhN94Ba`.\n * @param settlementAmount - This optional field will contain the amount that will be settled\n *                           to your account, converted to the currency your account is settled\n *                           in. It follows the same syntax as the amount property. Any amounts\n *                           not settled by Mollie will not be reflected in this amount,\n *                           e.g. PayPal or gift cards.\n * @param settlementId - The identifier referring to the settlement this payment was settled with.\n *                       For example, `stl_BkEjN2eBb`.\n * @param customerId - If a customer was specified upon payment creation, the customer’s token\n *                     will be available here as well. For example, `cst_XPn78q9CfT`.\n * @param sequenceType - Indicates which type of payment this is in a recurring sequence. Set to\n *                       first for first payments that allow the customer to agree to automatic\n *                       recurring charges taking place on their account in the future.\n *                       Set to recurring for payments where the customer’s card is charged\n *                       automatically. Set to `oneoff` by default, which indicates the payment\n *                       is a regular non-recurring payment.\n * @param mandateId - If the payment is a first or recurring payment, this field will hold the\n *                    ID of the mandate.\n * @param subscriptionId - When implementing the Subscriptions API, any recurring charges\n *                         resulting from the subscription will hold the ID of the subscription\n *                         that triggered the payment.\n * @param orderId - If the payment was created for an order, the ID of that order will\n *                  be part of the response.\n * @param applicationFee - The application fee, if the payment was created with one.\n * @param _links - An object with several URL objects relevant to the payment. Every URL\n *                 object will contain an `href` and a `type` field.\n *\n */\n\n(function (PaymentStatus) {\n  PaymentStatus[\"open\"] = \"open\";\n  PaymentStatus[\"canceled\"] = \"canceled\";\n  PaymentStatus[\"pending\"] = \"pending\";\n  PaymentStatus[\"authorized\"] = \"authorized\";\n  PaymentStatus[\"expired\"] = \"expired\";\n  PaymentStatus[\"failed\"] = \"failed\";\n  PaymentStatus[\"paid\"] = \"paid\";\n})(exports.PaymentStatus || (exports.PaymentStatus = {}));\n/**\n * Gift Card\n *\n * @param issuer - The ID of the gift card brand that was used during the payment.\n * @param amount - The amount in EUR that was paid with this gift card.\n * @param voucherNumber - The voucher number, with the last four digits masked. Example: `606436353088147****`\n */\n\n(function (PaymentEmbed) {\n  PaymentEmbed[\"refunds\"] = \"refunds\";\n  PaymentEmbed[\"chargebacks\"] = \"chargebacks\";\n})(exports.PaymentEmbed || (exports.PaymentEmbed = {}));\n\nvar paymentHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * If the payment is open\n   */\n  isOpen: function isOpen() {\n    return this.status === exports.PaymentStatus.open;\n  },\n\n  /**\n   * If the payment is authorized\n   */\n  isAuthorized: function isAuthorized() {\n    return this.status === exports.PaymentStatus.authorized;\n  },\n\n  /**\n   * If the payment is paid\n   */\n  isPaid: function isPaid() {\n    return this.paidAt != undefined;\n  },\n\n  /**\n   * If the payment is canceled\n   */\n  isCanceled: function isCanceled() {\n    return this.status == exports.PaymentStatus.canceled;\n  },\n\n  /**\n   * If the payment is expired\n   */\n  isExpired: function isExpired() {\n    return this.status == exports.PaymentStatus.expired;\n  },\n\n  /**\n   * If the payment is refundable\n   *\n   * @since 2.0.0-rc.2\n   */\n  isRefundable: function isRefundable() {\n    return this.amountRemaining !== null;\n  },\n\n  /**\n   * Get the payment URL\n   */\n  getPaymentUrl: function getPaymentUrl() {\n    return lodash.get(this._links, 'checkout.href', null);\n  },\n\n  /**\n   * Returns whether the payment has failed and cannot be completed with a different payment method.\n   */\n  isFailed: function isFailed() {\n    return this.status == exports.PaymentStatus.failed;\n  },\n\n  /**\n   * Returns whether the payment is in this temporary status that can occur when the actual payment process has been\n   * started, but has not completed yet.\n   */\n  isPending: function isPending() {\n    return this.status == exports.PaymentStatus.pending;\n  },\n\n  /**\n   * Returns whether there are refunds which belong to the payment.\n   */\n  hasRefunds: function hasRefunds() {\n    return this._links.refunds != undefined;\n  },\n\n  /**\n   * Returns whether there are chargebacks which belong to the payment.\n   */\n  hasChargebacks: function hasChargebacks() {\n    return this._links.chargebacks != undefined;\n  },\n\n  /**\n   * Returns whether `sequenceType` is set to `'first'`. If a `'first'` payment has been completed successfully, the\n   * consumer's account may be charged automatically using recurring payments.\n   */\n  hasSequenceTypeFirst: function hasSequenceTypeFirst() {\n    return this.sequenceType == exports.SequenceType.first;\n  },\n\n  /**\n   * Returns whether `sequenceType` is set to `'recurring'`. This type of payment is processed without involving the\n   * consumer.\n   */\n  hasSequenceTypeRecurring: function hasSequenceTypeRecurring() {\n    return this.sequenceType == exports.SequenceType.recurring;\n  },\n\n  /**\n   * Returns the URL your customer should visit to make the payment. This is where you should redirect the consumer to.\n   *\n   * Recurring payments don’t have a checkout URL.\n   */\n  getCheckoutUrl: function getCheckoutUrl() {\n    if (this._links.checkout == undefined) {\n      return null;\n    }\n\n    return this._links.checkout.href;\n  },\n  canBeRefunded: function canBeRefunded() {\n    return this.amountRemaining != undefined;\n  },\n  canBePartiallyRefunded: function canBePartiallyRefunded() {\n    return this.amountRemaining != undefined;\n  },\n\n  /**\n   * Returns the total amount that is already refunded. For some payment methods, this amount may be higher than the\n   * payment amount, for example to allow reimbursement of the costs for a return shipment to the customer.\n   */\n  getAmountRefunded: function getAmountRefunded() {\n    if (this.amountRefunded == undefined) {\n      return {\n        // Perhaps this zero-value should depend on the currency. If the currency is JPY (¥), for instance, the value\n        // should probably be \"0\"; not \"0.00\".\n        value: '0.00',\n        currency: this.amount.currency\n      };\n    }\n\n    return this.amountRefunded;\n  },\n\n  /**\n   * Returns the remaining amount that can be refunded.\n   */\n  getAmountRemaining: function getAmountRemaining() {\n    if (this.amountRemaining == undefined) {\n      return {\n        // Perhaps this zero-value should depend on the currency. If the currency is JPY (¥), for instance, the value\n        // should probably be \"0\"; not \"0.00\".\n        value: '0.00',\n        currency: this.amount.currency\n      };\n    }\n\n    return this.amountRemaining;\n  }\n});\n\nfunction injectPrototypes$2(input) {\n  let _embedded;\n\n  if (input._embedded != undefined) {\n    _embedded = {};\n\n    if (input._embedded.chargebacks != undefined) {\n      _embedded.chargebacks = input._embedded.chargebacks.map(injectPrototypes$3);\n    }\n\n    if (input._embedded.refunds != undefined) {\n      _embedded.refunds = input._embedded.refunds.map(injectPrototypes$1);\n    }\n  }\n\n  return Object.assign(Object.create(paymentHelpers), input, {\n    _embedded\n  });\n}\n\n/**\n * Chargeback Response object.\n *\n * @param resource - Indicates the response contains a Chargeback object.\n *                   Will always contain `chargeback` for this endpoint.\n * @param id - The chargeback’s unique identifier, for example `chb_n9z0tp`.\n * @param amount - The amount charged back by the consumer.\n * @param settlementAmount - This optional field will contain the amount that will be deducted from your account,\n *                           converted to the currency your account is settled in. It follows the same syntax as\n *                           the `amount` property. Note that for chargebacks, the `value` key of `settlementAmount`\n *                           will be negative. Any amounts not settled by Mollie will not be reflected in this amount,\n *                           e.g. PayPal chargebacks.\n * @param createdAt - The date and time the chargeback was issued, in ISO 8601 format.\n * @param reversedAt - The date and time the chargeback was reversed if applicable, in ISO 8601 format.\n * @param paymentId - The unique identifier of the payment this chargeback was issued for. For example: `tr_7UhSN1zuXS`.\n *                    The full payment object can be retrieved via the `payment` URL in the `_links` object.\n * @param _links - An object with several URL objects relevant to the chargeback.\n *\n * @see https://docs.mollie.com/reference/v2/chargebacks-api/get-chargeback\n */\n\nlet ChargebackEmbed;\n\n(function (ChargebackEmbed) {\n  ChargebackEmbed[\"payment\"] = \"payment\";\n})(ChargebackEmbed || (ChargebackEmbed = {}));\n\nfunction injectPrototypes$3(input) {\n  let _embedded;\n\n  if (input._embedded != undefined) {\n    _embedded = {};\n\n    if (input._embedded.payments != undefined) {\n      _embedded.payments = input._embedded.payments.map(injectPrototypes$2);\n    }\n  }\n\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\nclass ApiError extends Error {\n  constructor(message, title, status, field, links) {\n    super(message);\n    this.title = title;\n    this.status = status;\n    this.field = field;\n    this.links = links;\n    this.name = 'ApiError';\n  }\n  /**\n   * Get the error message\n   *\n   * @since 3.0.0\n   */\n\n\n  getMessage() {\n    return this.message;\n  }\n  /**\n   * Get the field name that contains an error\n   *\n   * @since 3.0.0\n   */\n\n\n  getField() {\n    return this.field;\n  }\n  /**\n   * Get the API status code\n   *\n   * @since 3.0.0\n   */\n\n\n  getStatusCode() {\n    return this.status;\n  }\n  /**\n   * Get the documentation URL\n   *\n   * @since 3.0.0\n   */\n\n\n  getDocumentationUrl() {\n    return this.getUrl('documentation');\n  }\n  /**\n   * Get the dashboard URL\n   *\n   * @since 3.0.0\n   */\n\n\n  getDashboardUrl() {\n    return this.getUrl('dashboard');\n  }\n  /**\n   * Check if the link exists\n   *\n   * @since 3.0.0\n   */\n\n\n  hasLink(key) {\n    return lodash.has(this.links, key);\n  }\n  /***\n   * Retrieve a link by name\n   *\n   * @since 3.0.0\n   */\n\n\n  getLink(key) {\n    return lodash.get(this.links, key);\n  }\n  /**\n   * @since 3.0.0\n   */\n\n\n  getUrl(key) {\n    return lodash.get(this.getLink(key), 'href');\n  }\n\n  toString() {\n    return `ApiError: ${this.message}`;\n  }\n  /**\n   * Creates and returns an `ApiError` from the passed response.\n   *\n   * @since 3.0.0\n   */\n\n\n  static createFromResponse(response) {\n    return new ApiError(lodash.get(response, 'data.detail', 'Received an error without a message'), lodash.get(response, 'data.title'), lodash.get(response, 'data.status'), lodash.get(response, 'data.field'), lodash.cloneDeep(lodash.get(response, 'data._links')));\n  }\n\n}\n\n/**\n * Returns an array of the passed object's own enumerable string-keyed property `[key, value]` pairs.\n *\n * If support for Node.js < 7.0.0 is ever dropped, this function can be removed in favour of `Object.entries`.\n */\nvar getEntries = (() => {\n  if (Object.entries != undefined) {\n    return Object.entries;\n  }\n\n  return function getEntries(input) {\n    return Object.keys(input).map(key => [key, input[key]]);\n  };\n})();\n\nfunction stringifyQuery(input) {\n  return querystring.stringify(getEntries(input).reduce((result, [key, value]) => {\n    if (Array.isArray(value)) {\n      result[key] = value.join();\n    }\n    /* if (Array.isArray(value) == false) */\n    else {\n        result[key] = value;\n      }\n\n    return result;\n  }, {}), {\n    addQueryPrefix: true\n  });\n}\n\nclass Resource {\n  constructor(httpClient) {\n    var _this = this;\n\n    this.httpClient = httpClient;\n\n    _defineProperty(this, \"network\", void 0);\n\n    /* eslint-disable no-var */\n    this.network = {\n      post: function () {\n        var _ref = _asyncToGenerator(function* (url, data) {\n          try {\n            var response = yield httpClient.post(url, data);\n          } catch (error) {\n            if (error.response != undefined) {\n              throw ApiError.createFromResponse(error.response);\n            }\n\n            throw new ApiError(error.message);\n          }\n\n          if (response.status == 204) {\n            return true;\n          }\n\n          return _this.injectPrototypes(response.data);\n        });\n\n        return function post(_x, _x2) {\n          return _ref.apply(this, arguments);\n        };\n      }(),\n      get: function () {\n        var _ref2 = _asyncToGenerator(function* (url, query = {}) {\n          try {\n            var response = yield httpClient.get(`${url}${stringifyQuery(query)}`);\n          } catch (error) {\n            if (error.response != undefined) {\n              throw ApiError.createFromResponse(error.response);\n            }\n\n            throw new ApiError(error.message);\n          }\n\n          return _this.injectPrototypes(response.data);\n        });\n\n        return function get(_x3) {\n          return _ref2.apply(this, arguments);\n        };\n      }(),\n      list: function () {\n        var _ref3 = _asyncToGenerator(function* (url, resourceName, query = {}) {\n          try {\n            var response = yield httpClient.get(`${url}${stringifyQuery(query)}`);\n          } catch (error) {\n            if (error.response != undefined) {\n              throw ApiError.createFromResponse(error.response);\n            }\n\n            throw new ApiError(error.message);\n          }\n\n          try {\n            var {\n              _embedded: embedded,\n              _links: links,\n              count\n            } = response.data;\n          } catch (error) {\n            throw new ApiError('Received unexpected response from the server');\n          }\n\n          return Object.assign(embedded[resourceName].map(_this.injectPrototypes), {\n            links,\n            count\n          });\n        });\n\n        return function list(_x4, _x5) {\n          return _ref3.apply(this, arguments);\n        };\n      }(),\n      patch: function () {\n        var _ref4 = _asyncToGenerator(function* (url, data) {\n          try {\n            var response = yield httpClient.patch(url, data);\n          } catch (error) {\n            if (error.response != undefined) {\n              throw ApiError.createFromResponse(error.response);\n            }\n\n            throw new ApiError(error.message);\n          }\n\n          return _this.injectPrototypes(response.data);\n        });\n\n        return function patch(_x6, _x7) {\n          return _ref4.apply(this, arguments);\n        };\n      }(),\n      delete: function () {\n        var _ref5 = _asyncToGenerator(function* (url, context) {\n          try {\n            var response = yield httpClient.delete(url, {\n              data: context\n            });\n          } catch (error) {\n            if (error.response != undefined) {\n              throw ApiError.createFromResponse(error.response);\n            }\n\n            throw new ApiError(error.message);\n          }\n\n          if (response.status == 204) {\n            return true;\n          }\n\n          return _this.injectPrototypes(response.data);\n        });\n\n        return function _delete(_x8, _x9) {\n          return _ref5.apply(this, arguments);\n        };\n      }()\n    };\n    /* eslint-enable no-var */\n  }\n  /**\n   * Injects `nextPage`, `nextPageCursor`, `previousPage`, and `previousPageCursor` into the passed list.\n   */\n\n\n  injectPaginationHelpers(input, list, selfParameters) {\n    const {\n      links\n    } = input;\n    let nextPage;\n    let nextPageCursor;\n\n    if (links.next != null) {\n      const {\n        query\n      } = url.parse(links.next.href, true);\n      nextPage = list.bind(this, _objectSpread2({}, selfParameters, {}, query));\n      nextPageCursor = query.from;\n    }\n\n    let previousPage;\n    let previousPageCursor;\n\n    if (links.previous != null) {\n      const {\n        query\n      } = url.parse(links.previous.href, true);\n      previousPage = list.bind(this, _objectSpread2({}, selfParameters, {}, query));\n      previousPageCursor = query.from;\n    }\n\n    return Object.assign(input, {\n      nextPage,\n      nextPageCursor,\n      previousPage,\n      previousPageCursor\n    });\n  }\n  /**\n   * Injects prototypes ‒ where necessary ‒ into the response received from the Mollie server.\n   */\n\n\n  injectPrototypes(input) {\n    return input;\n  }\n\n}\n\nclass ParentedResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"defaultParentId\", void 0);\n  }\n\n  /**\n   * Returns the passed parent identifier, or `defaultParentId` as set by `withParent` if the former is `undefined`.\n   */\n  getParentId(input) {\n    if (input == undefined) {\n      return this.defaultParentId;\n    }\n\n    return input;\n  }\n  /**\n   * Sets the default parent identifier for future calls to the methods of this resource to the identifier of the\n   * passed parent object. If `undefined` or `null` or an otherwise falsy value is passed, or an object with a falsy\n   * identifier, this method is a no-op.\n   *\n   * @since 1.1.1\n   *\n   * @deprecated 2.0.0. This method is not supported by the v2 API.\n   */\n\n\n  withParent(parent) {\n    if (parent && parent.id) {\n      this.defaultParentId = parent.id;\n    }\n\n    return this;\n  }\n\n}\n\n/**\n * Allows a promise-style method to be called callback-style.\n *\n * Behaves in one of two ways, depending on the type of the last argument:\n *  * If called with a function as the last argument, that argument is considered to be the callback. This function\n *    calls the passed method, forwarding the original arguments (save for the callback). A settlement of the promise\n *    returned during that call will be forwarded to the callback. This function then returns `true`.\n *  * If called with a last argument which is not a function, this function returns `false`.\n */\nfunction renege(thisArgument, method, ...originalArguments) {\n  const candidate = originalArguments.pop();\n\n  if (typeof candidate == 'function') {\n    method.apply(thisArgument, originalArguments).then(result => void candidate(null, result), candidate);\n    return true;\n  }\n\n  return false;\n}\n\nclass ChargebacksResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$3);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl() {\n    return 'chargebacks';\n  }\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'chargebacks', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\n/**\n * Mandate Response object\n *\n * @see https://docs.mollie.com/reference/v2/mandates-api/get-mandate\n */\n\n(function (MandateMethod) {\n  MandateMethod[\"directdebit\"] = \"directdebit\";\n  MandateMethod[\"creditcard\"] = \"creditcard\";\n  MandateMethod[\"paypal\"] = \"paypal\";\n})(exports.MandateMethod || (exports.MandateMethod = {}));\n\n(function (MandateStatus) {\n  MandateStatus[\"valid\"] = \"valid\";\n  MandateStatus[\"invalid\"] = \"invalid\";\n  MandateStatus[\"pending\"] = \"pending\";\n})(exports.MandateStatus || (exports.MandateStatus = {}));\n\nvar mandateHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * If the mandate is valid\n   */\n  isValid: function isValid() {\n    return this.status === exports.MandateStatus.valid;\n  }\n});\n\nfunction injectPrototypes$4(input) {\n  return Object.assign(Object.create(mandateHelpers), input);\n}\n\nconst prefixes = new Map([['capture', 'cpt_'], ['chargeback', 'chb_'], ['customer', 'cst_'], ['mandate', 'mdt_'], ['order', 'ord_'], ['orderline', 'odl_'], ['organization', 'org_'], ['payment', 'tr_'], ['profile', 'pfl_'], ['refund', 're_'], ['shipment', 'shp_'], ['subscription', 'sub_']]);\n/**\n * Returns whether the passed identifier seems plausible (`true`); or is definitely invalid (`false`).\n */\n\nfunction checkId(value, resource) {\n  if (typeof value != 'string') {\n    return false;\n  } // Examples of permission identifiers are 'payments.read' and 'refunds.write'. This function currently relies on the\n  // API to return an error if the identifier is unexpected, instead of returning a client-side check.\n\n\n  if (resource == 'permission') {\n    return true;\n  } // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\n\n  return value.startsWith(prefixes.get(resource));\n}\n\nclass CustomersMandatesResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$4);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n\n    _defineProperty(this, \"cancel\", this.revoke);\n\n    _defineProperty(this, \"delete\", this.revoke);\n  }\n\n  getResourceUrl(customerId) {\n    return `customers/${customerId}/mandates`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const customerId = this.getParentId(parameters.customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"customerId\"]);\n\n    return this.network.post(this.getResourceUrl(customerId), data);\n  }\n  /**\n   * Get a customer mandate by ID\n   *\n   * @since 1.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/mandates-api/get-mandate\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'mandate')) {\n      throw new ApiError('The customers_mandate id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const _ref = parameters || {},\n          query = _objectWithoutProperties(_ref, [\"customerId\"]);\n\n    return this.network.get(`${this.getResourceUrl(customerId)}/${id}`, query);\n  }\n  /**\n   * Get all of a customer's mandates\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/mandates-api/list-mandates\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const _ref2 = parameters || {},\n          query = _objectWithoutProperties(_ref2, [\"customerId\"]);\n\n    return this.network.list(this.getResourceUrl(customerId), 'mandates', query).then(result => this.injectPaginationHelpers(result, this.list, parameters || {}));\n  }\n  /**\n   * Delete a customer subscription\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/mandates-api/revoke-mandate\n   */\n\n\n  revoke(id, parameters) {\n    if (renege(this, this.revoke, ...arguments)) return;\n\n    if (!checkId(id, 'mandate')) {\n      throw new ApiError('The customers_mandate id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer is invalid');\n    }\n\n    const _ref3 = parameters || {},\n          context = _objectWithoutProperties(_ref3, [\"customerId\"]);\n\n    return this.network.delete(`${this.getResourceUrl(customerId)}/${id}`, context);\n  }\n\n}\n\nclass CustomersPaymentsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$2);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(customerId) {\n    return `customers/${customerId}/payments`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const customerId = this.getParentId(parameters.customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"customerId\"]);\n\n    return this.network.post(this.getResourceUrl(customerId), data);\n  }\n  /**\n   * Get all of a customer's payments.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/customers-api/list-customer-payments\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const _ref = parameters || {},\n          query = _objectWithoutProperties(_ref, [\"customerId\"]);\n\n    return this.network.list(this.getResourceUrl(customerId), 'payments', query).then(result => this.injectPaginationHelpers(result, this.list, parameters || {}));\n  }\n\n}\n\n/**\n * Customer Response object.\n *\n * @see https://docs.mollie.com/reference/v2/customers-api/get-customer\n */\n\nfunction injectPrototypes$5(input) {\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\nclass CustomersResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$5);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n\n    _defineProperty(this, \"cancel\", this.delete);\n  }\n\n  getResourceUrl() {\n    return 'customers';\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    return this.network.post(this.getResourceUrl(), parameters);\n  }\n  /**\n   * Retrieve a single customer by its ID\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/customers-api/get-customer\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * List customers\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/customers-api/list-customers\n   */\n\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'customers', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n  /**\n   * Update a customer\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/customers-api/update-customer\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    return this.network.patch(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * Delete a customer\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/customers-api/delete-customer\n   */\n\n\n  delete(id, parameters) {\n    if (renege(this, this.delete, ...arguments)) return;\n\n    if (!checkId(id, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    return this.network.delete(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n\n}\n\n/**\n * Subscription Response object.\n *\n * @see https://docs.mollie.com/reference/v2/subscriptions-api/get-subscription\n */\n\n(function (SubscriptionStatus) {\n  SubscriptionStatus[\"pending\"] = \"pending\";\n  SubscriptionStatus[\"active\"] = \"active\";\n  SubscriptionStatus[\"canceled\"] = \"canceled\";\n  SubscriptionStatus[\"suspended\"] = \"suspended\";\n  SubscriptionStatus[\"completed\"] = \"completed\";\n})(exports.SubscriptionStatus || (exports.SubscriptionStatus = {}));\n\nvar subscriptionHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * Get the webhook url\n   */\n  getWebhookUrl: function getWebhookUrl() {\n    return this.webhookUrl;\n  },\n\n  /**\n   * If the subscription is active\n   */\n  isActive: function isActive() {\n    return this.status === exports.SubscriptionStatus.active;\n  },\n\n  /**\n   * If the subscription is pending\n   */\n  isPending: function isPending() {\n    return this.status === exports.SubscriptionStatus.pending;\n  },\n\n  /**\n   * If the subscription is completed\n   */\n  isCompleted: function isCompleted() {\n    return this.status === exports.SubscriptionStatus.completed;\n  },\n\n  /**\n   * If the subscription is suspended\n   */\n  isSuspended: function isSuspended() {\n    return this.status === exports.SubscriptionStatus.suspended;\n  },\n\n  /**\n   * If the subscription is canceled\n   */\n  isCanceled: function isCanceled() {\n    return exports.SubscriptionStatus.canceled == this.status;\n  }\n});\n\nfunction injectPrototypes$6(input) {\n  return Object.assign(Object.create(subscriptionHelpers), input);\n}\n\nclass CustomersSubscriptionsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$6);\n\n    _defineProperty(this, \"delete\", this.cancel);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(customerId) {\n    return `customers/${customerId}/subscriptions`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const customerId = this.getParentId(parameters.customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"customerId\"]);\n\n    return this.network.post(this.getResourceUrl(customerId), data);\n  }\n  /**\n   * Get a customer subscription.\n   *\n   * @since 1.3.2\n   *\n   * @see https://docs.mollie.com/reference/v2/subscriptions-api/get-subscription\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'subscription')) {\n      throw new ApiError('The subscription id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const _ref = parameters || {},\n          query = _objectWithoutProperties(_ref, [\"customerId\"]);\n\n    return this.network.get(`${this.getResourceUrl(customerId)}/${id}`, query);\n  }\n  /**\n   * Get all customer's subscriptions.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/subscriptions-api/list-subscriptions\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer id is invalid');\n    }\n\n    const _ref2 = parameters || {},\n          query = _objectWithoutProperties(_ref2, [\"customerId\"]);\n\n    return this.network.list(this.getResourceUrl(customerId), 'subscriptions', query).then(result => this.injectPaginationHelpers(result, this.list, parameters || {}));\n  }\n  /**\n   * Update a customer's subscription.\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/subscriptions-api/update-subscription\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'subscription')) {\n      throw new ApiError('The subscription id is invalid');\n    }\n\n    const customerId = this.getParentId(parameters.customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"customerId\"]);\n\n    return this.network.patch(`${this.getResourceUrl(customerId)}/${id}`, data);\n  }\n  /**\n   * Cancel a Subscription\n   *\n   * @since 1.3.2\n   *\n   * @see https://docs.mollie.com/reference/v2/subscriptions-api/cancel-subscription\n   */\n\n\n  cancel(id, parameters) {\n    if (renege(this, this.cancel, ...arguments)) return;\n\n    if (!checkId(id, 'subscription')) {\n      throw new ApiError('The subscription id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const customerId = this.getParentId((parameters || {}).customerId);\n\n    if (!checkId(customerId, 'customer')) {\n      throw new ApiError('The customer is invalid');\n    }\n\n    const _ref3 = parameters || {},\n          context = _objectWithoutProperties(_ref3, [\"customerId\"]);\n\n    return this.network.delete(`${this.getResourceUrl(customerId)}/${id}`, context);\n  }\n\n}\n\n/**\n * Method Response object.\n *\n * @param resource - Indicates the response contains a method object. Will always contain `method` for this endpoint.\n * @param id - The unique identifier of the payment method. When used during payment creation, the payment method\n *             selection screen will be skipped.\n * @param description - The full name of the payment method, translated in the optional locale passed.\n * @param image - The URLs of images representing the payment method.\n * @param pricing - See {@link IMethodPricing}\n * @param _links - An object with several URL objects relevant to the payment method.\n *\n * @see https://docs.mollie.com/reference/v2/methods-api/get-method\n */\n\n(function (MethodImageSize) {\n  MethodImageSize[\"size1x\"] = \"size1x\";\n  MethodImageSize[\"size2x\"] = \"size2x\";\n  MethodImageSize[\"svg\"] = \"svg\";\n})(exports.MethodImageSize || (exports.MethodImageSize = {}));\n/**\n * Pricing set of the payment method what will be include if you add the parameter.\n *\n * @param description - The area or product-type where the pricing is applied for, translated in the optional locale passed.\n * @param fixed - The fixed price per transaction\n * @param variable - A string containing the percentage what will be charged over the payment amount besides the fixed price.\n */\n\n(function (MethodInclude) {\n  MethodInclude[\"issuers\"] = \"issuers\";\n  MethodInclude[\"pricing\"] = \"pricing\";\n})(exports.MethodInclude || (exports.MethodInclude = {}));\n\nvar methodHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * Method image URL\n   *\n   * @since 2.0.0\n   * @since 3.0.0 SVG support\n   */\n  getImage: function getImage(size = exports.MethodImageSize.size2x) {\n    switch (size) {\n      case '1x':\n      case exports.MethodImageSize.size1x:\n        return this.image[exports.MethodImageSize.size1x];\n\n      case '2x':\n      case exports.MethodImageSize.size2x:\n        return this.image[exports.MethodImageSize.size2x];\n\n      case exports.MethodImageSize.svg:\n        return this.image[exports.MethodImageSize.svg];\n\n      default:\n        throw new ApiError(`Unexpected size: ${size}`);\n    }\n  }\n});\n\nfunction injectPrototypes$7(input) {\n  return Object.assign(Object.create(methodHelpers), input);\n}\n\nclass MethodsResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$7);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl() {\n    return 'methods';\n  }\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n    return this.network.get(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * Retrieve a list of Payment Methods\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/methods-api/list-methods\n   */\n\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'methods', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\nvar onboardingHelpers = _objectSpread2({}, commonHelpers, {\n  needsData: function needsData() {\n    return this.status == 'needs-data';\n  },\n  isInReview: function isInReview() {\n    return this.status == 'in-review';\n  },\n  isCompleted: function isCompleted() {\n    return this.status == 'completed';\n  }\n});\n\nfunction injectPrototypes$8(input) {\n  return Object.assign(Object.create(onboardingHelpers), input);\n}\n\nclass OnboardingResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$8);\n  }\n\n  getResourceUrl() {\n    return 'onboarding/me';\n  }\n\n  get() {\n    if (renege(this, this.get, ...arguments)) return;\n    return this.network.get(this.getResourceUrl());\n  }\n  /**\n   * Submit data that will be prefilled in the merchant's onboarding. Please note that the data you submit will only be\n   * processed when the onboarding status is `'needs-data'`.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/onboarding-api/submit-onboarding-data\n   */\n\n\n  submit(parameters) {\n    if (renege(this, this.submit, ...arguments)) return;\n    return this.network.post(this.getResourceUrl(), parameters);\n  }\n\n}\n\nfunction injectPrototypes$9(input) {\n  return Object.assign(Object.create(commonHelpers), input, {\n    lines: input.lines.map(injectPrototypes)\n  });\n}\n\n/**\n * Order Response object.\n *\n * @see https://docs.mollie.com/reference/v2/orders-api/get-order\n */\n\n(function (OrderStatus) {\n  OrderStatus[\"created\"] = \"created\";\n  OrderStatus[\"paid\"] = \"paid\";\n  OrderStatus[\"authorized\"] = \"authorized\";\n  OrderStatus[\"canceled\"] = \"canceled\";\n  OrderStatus[\"shipping\"] = \"shipping\";\n  OrderStatus[\"completed\"] = \"completed\";\n  OrderStatus[\"expired\"] = \"expired\";\n  OrderStatus[\"pending\"] = \"pending\";\n})(exports.OrderStatus || (exports.OrderStatus = {}));\n\n(function (OrderEmbed) {\n  OrderEmbed[\"payments\"] = \"payments\";\n  OrderEmbed[\"refunds\"] = \"refunds\";\n  OrderEmbed[\"shipments\"] = \"shipments\";\n})(exports.OrderEmbed || (exports.OrderEmbed = {}));\n\nvar orderHelpers = _objectSpread2({}, commonHelpers, {\n  /**\n   * Returns whether the order has been created, but nothing else has happened yet.\n   */\n  isCreated: function isCreated() {\n    return this.status == exports.OrderStatus.created;\n  },\n\n  /**\n   * Returns whether the order's payment is successfully completed with a payment method that does not support\n   * authorizations.\n   */\n  isPaid: function isPaid() {\n    return this.status == exports.OrderStatus.paid;\n  },\n\n  /**\n   * Returns whether the order's payment is successfully completed with a payment method that does support\n   * authorizations. The money will only be transferred once a shipment is created for the order.\n   */\n  isAuthorized: function isAuthorized() {\n    return this.status == exports.OrderStatus.authorized;\n  },\n\n  /**\n   * Returns whether the order has been canceled.\n   */\n  isCanceled: function isCanceled() {\n    return this.status == exports.OrderStatus.canceled;\n  },\n\n  /**\n   * Returns whether the first order line or part of an order line has started shipping. When the order is in this\n   * state, it means that your order is partially shipped.\n   */\n  isShipping: function isShipping() {\n    return this.status == exports.OrderStatus.shipping;\n  },\n\n  /**\n   * Returns whether the order has been completed.\n   */\n  isCompleted: function isCompleted() {\n    return this.status == exports.OrderStatus.completed;\n  },\n\n  /**\n   * Returns whether the order has expired.\n   */\n  isExpired: function isExpired() {\n    return this.status == exports.OrderStatus.expired;\n  },\n\n  /**\n   * Returns whether the the payment supplier is manually checking the order.\n   */\n  isPending: function isPending() {\n    return this.status == exports.OrderStatus.pending;\n  },\n\n  /**\n   * Returns the URL your customer should visit to make the payment for the order. This is where you should redirect\n   * the customer to after creating the order.\n   *\n   * As long as the order is still in the `'created'` state, this link can be used by your customer to pay for this\n   * order. You can safely share this URL with your customer.\n   *\n   * Recurring, authorized, paid and finalized orders do not have a checkout URL.\n   */\n  getCheckoutUrl: function getCheckoutUrl() {\n    if (this._links.checkout == undefined) {\n      return null;\n    }\n\n    return this._links.checkout.href;\n  }\n});\n\nfunction injectPrototypes$a(input) {\n  let _embedded;\n\n  if (input._embedded != undefined) {\n    _embedded = {};\n\n    if (input._embedded.payments != undefined) {\n      _embedded.payments = input._embedded.payments.map(injectPrototypes$2);\n    }\n\n    if (input._embedded.refunds != undefined) {\n      _embedded.refunds = input._embedded.refunds.map(injectPrototypes$1);\n    }\n\n    if (input._embedded.shipments != undefined) {\n      _embedded.shipments = input._embedded.shipments.map(injectPrototypes$9);\n    }\n  }\n\n  return Object.assign(Object.create(orderHelpers), input, {\n    lines: input.lines.map(injectPrototypes),\n    _embedded\n  });\n}\n\nclass OrdersLinesResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$a);\n\n    _defineProperty(this, \"delete\", this.cancel);\n  }\n\n  getResourceUrl(orderId) {\n    return `orders/${orderId}/lines`;\n  }\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'orderline')) {\n      throw new ApiError('The orders_lines id is invalid');\n    }\n\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.patch(`${this.getResourceUrl(orderId)}/${id}`, data);\n  }\n  /**\n   * Cancel an order line by ID or multiple order lines\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/cancel-order-lines\n   */\n\n\n  cancel(parameters) {\n    if (renege(this, this.cancel, ...arguments)) return;\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.delete(this.getResourceUrl(orderId), data);\n  }\n\n}\n\nclass OrdersPaymentsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$2);\n  }\n\n  getResourceUrl(orderId) {\n    return `orders/${orderId}/payments`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.post(this.getResourceUrl(orderId), data);\n  }\n\n}\n\nclass RefundsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$1);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(orderId) {\n    return `orders/${orderId}/refunds`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.post(this.getResourceUrl(orderId), data);\n  }\n  /**\n   * Get all order refunds\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/list-order-refunds\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const orderId = this.getParentId((parameters || {}).orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const _ref = parameters || {},\n          query = _objectWithoutProperties(_ref, [\"orderId\"]);\n\n    return this.network.list(this.getResourceUrl(orderId), 'refunds', query).then(result => this.injectPaginationHelpers(result, this.list, parameters || {}));\n  }\n\n}\n\nclass OrdersResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$a);\n\n    _defineProperty(this, \"delete\", this.cancel);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl() {\n    return 'orders';\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    return this.network.post(this.getResourceUrl(), parameters);\n  }\n  /**\n   * Retrieve an Order.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/get-order\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * List Orders.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/list-orders\n   */\n\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'orders', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n  /**\n   * Update an Order.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/update-order\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    return this.network.patch(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * Cancel an Order.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/orders-api/cancel-order\n   */\n\n\n  cancel(id, parameters) {\n    if (renege(this, this.cancel, ...arguments)) return;\n\n    if (!checkId(id, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    return this.network.delete(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n\n}\n\nclass OrdersShipmentsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$9);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(orderId) {\n    return `orders/${orderId}/shipments`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.post(this.getResourceUrl(orderId), data);\n  }\n  /**\n   * Get a Shipment by ID\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/shipments-api/get-shipment\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'shipment')) {\n      throw new ApiError('The orders_shipments id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const orderId = this.getParentId((parameters || {}).orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const _ref = parameters || {},\n          query = _objectWithoutProperties(_ref, [\"orderId\"]);\n\n    return this.network.get(`${this.getResourceUrl(orderId)}/${id}`, query);\n  }\n  /**\n   * Update a Shipment\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/shipments-api/update-shipment\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'shipment')) {\n      throw new ApiError('The orders_shipments id is invalid');\n    }\n\n    const orderId = this.getParentId(parameters.orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"orderId\"]);\n\n    return this.network.patch(`${this.getResourceUrl(orderId)}/${id}`, data);\n  }\n  /**\n   * List order shipments\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/shipments-api/list-shipments\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const orderId = this.getParentId((parameters || {}).orderId);\n\n    if (!checkId(orderId, 'order')) {\n      throw new ApiError('The order id is invalid');\n    }\n\n    const _ref2 = parameters || {},\n          query = _objectWithoutProperties(_ref2, [\"orderId\"]);\n\n    return this.network.list(this.getResourceUrl(orderId), 'shipments', query).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\n/**\n * @see https://docs.mollie.com/reference/v2/organizations-api/get-organization\n */\n\nfunction injectPrototypes$b(input) {\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\nclass OrganizationsResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$b);\n  }\n\n  getResourceUrl() {\n    return 'organizations';\n  }\n\n  get(id) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'organization')) {\n      throw new ApiError('The organization id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`);\n  }\n  /**\n   * Retrieve the currently authenticated organization.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/organizations-api/current-organization\n   */\n\n\n  getCurrent() {\n    if (renege(this, this.getCurrent, ...arguments)) return;\n    return this.network.get(`${this.getResourceUrl()}/me`);\n  }\n\n}\n\n/**\n * Capture Response object.\n *\n * @param resource - Indicates the response contains a capture object. Will always contain `capture` for this endpoint.\n * @param id - The capture’s unique identifier, for example `cpt_4qqhO89gsT`.\n * @param mode - The mode used to create this capture.\n * @param amount - The amount captured.\n * @param settlementAmount - This optional field will contain the amount that will be settled to your account, converted\n *                           to the currency your account is settled in. It follows the same syntax as the `amount` property.\n * @param paymentId - The unique identifier of the payment this capture was created for, for example: `tr_7UhSN1zuXS`.\n *                    The full payment object can be retrieved via the `payment` URL in the `_links` object.\n * @param shipmentId - The unique identifier of the shipment that triggered the creation of this capture, for example:\n *                     `shp_3wmsgCJN4U`. The full shipment object can be retrieved via the `shipment` URL in the\n *                     `_links` object.\n * @param settlementId - The unique identifier of the settlement this capture was settled with, for example:\n *                       `stl_jDk30akdN`. The full settlement object can be retrieved via the `capture` URL in the\n *                       `_links` object.\n * @param createdAt - The capture’s date and time of creation, in ISO 8601 format.\n * @param _links - An object with several URL objects relevant to the capture. Every URL object will contain an `href`\n *                 and a `type` field.\n *\n * @see https://docs.mollie.com/reference/v2/captures-api/get-capture\n */\n\nfunction injectPrototypes$c(input) {\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\nclass PaymentsCapturesResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$c);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(paymentId) {\n    return `payments/${paymentId}/captures`;\n  }\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'capture')) {\n      throw new ApiError('The capture id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.get(`${this.getResourceUrl(paymentId)}/${id}`, query);\n  }\n  /**\n   * Retrieve a list of Payment Captures\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/captures-api/list-captures\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.list(this.getResourceUrl(paymentId), 'captures', query).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\nclass PaymentsChargebacksResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$3);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl(paymentId) {\n    return `payments/${paymentId}/chargebacks`;\n  }\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'refund')) {\n      throw new ApiError('The payments_refund id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.get(`${this.getResourceUrl(paymentId)}/${id}`, query);\n  }\n  /**\n   * Retrieve a list of Payment Chargebacks\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/chargebacks-api/list-chargebacks\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.list(this.getResourceUrl(paymentId), 'chargebacks', query).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\nclass PaymentsRefundsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$1);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n\n    _defineProperty(this, \"delete\", this.cancel);\n  }\n\n  getResourceUrl(paymentId) {\n    return `payments/${paymentId}/refunds`;\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    const paymentId = this.getParentId(parameters.paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const data = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.post(this.getResourceUrl(paymentId), data);\n  }\n  /**\n   * Get a payment refund by ID\n   *\n   * @since 1.1.1\n   *\n   * @see https://docs.mollie.com/reference/v2/refunds-api/get-refund\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'refund')) {\n      throw new ApiError('The payments_refund id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.get(`${this.getResourceUrl(paymentId)}/${id}`, query);\n  }\n  /**\n   * Get all payment refunds.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/refunds-api/list-refunds\n   */\n\n\n  list(parameters) {\n    if (renege(this, this.list, ...arguments)) return; // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const query = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.list(this.getResourceUrl(paymentId), 'refunds', query).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n  /**\n   * Cancel a payment refund by ID\n   *\n   * @since 1.1.1\n   *\n   * @see https://docs.mollie.com/reference/v2/refunds-api/cancel-refund\n   */\n\n\n  cancel(id, parameters) {\n    if (renege(this, this.cancel, ...arguments)) return;\n\n    if (!checkId(id, 'refund')) {\n      throw new ApiError('The payments_refund id is invalid');\n    } // parameters || {} is used here, because in case withParent is used, parameters could be omitted.\n\n\n    const paymentId = this.getParentId((parameters || {}).paymentId);\n\n    if (!checkId(paymentId, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    const context = _objectWithoutProperties(parameters, [\"paymentId\"]);\n\n    return this.network.delete(`${this.getResourceUrl(paymentId)}/${id}`, context);\n  }\n\n}\n\nclass PaymentsResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$2);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n\n    _defineProperty(this, \"delete\", this.cancel);\n  }\n\n  getResourceUrl() {\n    return 'payments';\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    return this.network.post(this.getResourceUrl(), parameters);\n  }\n  /**\n   * Retrieve a single payment from Mollie.\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/payments-api/get-payment\n   */\n\n\n  get(id, parameters) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * Retrieve all payments created with the current website profile, ordered from newest to oldest.\n   *\n   * @since 3.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/payments-api/list-payments\n   */\n\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'payments', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n  /**\n   * Update some details of a created payment.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/payments-api/update-payment\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    return this.network.patch(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * Cancel the given payment.\n   *\n   * Will throw an ApiError if the payment id is invalid or the resource cannot be found.\n   * Returns with HTTP status No Content (204) if successful.\n   *\n   * @since 2.0.0\n   *\n   * @see https://docs.mollie.com/reference/v2/payments-api/cancel-payment\n   */\n\n\n  cancel(id, parameters) {\n    if (renege(this, this.cancel, ...arguments)) return;\n\n    if (!checkId(id, 'payment')) {\n      throw new ApiError('The payment id is invalid');\n    }\n\n    return this.network.delete(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n\n}\n\n/**\n * @see https://docs.mollie.com/reference/v2/permissions-api/get-permission\n */\n\nfunction injectPrototypes$d(input) {\n  return Object.assign(Object.create(commonHelpers), input);\n}\n\nclass PermissionsResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$d);\n  }\n\n  getResourceUrl() {\n    return 'permissions';\n  }\n\n  get(id) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'permission')) {\n      throw new ApiError('The permission id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`);\n  }\n  /**\n   * List all permissions available with the current app access token. The list is not paginated.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/permissions-api/list-permissions\n   */\n\n\n  list() {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'permissions', {}).then(result => this.injectPaginationHelpers(result, this.list, undefined));\n  }\n\n}\n\nvar profileHelpers = _objectSpread2({}, commonHelpers, {\n  isUnverified: function isUnverified() {\n    return this.status == 'unverified';\n  },\n  isVerified: function isInReview() {\n    return this.status == 'verified';\n  },\n  isBlocked: function isBlocked() {\n    return this.status == 'blocked';\n  }\n});\n\nfunction injectPrototypes$e(input) {\n  return Object.assign(Object.create(profileHelpers), input);\n}\n\nclass ProfilesResource extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$e);\n  }\n\n  getResourceUrl() {\n    return 'profiles';\n  }\n\n  create(parameters) {\n    if (renege(this, this.create, ...arguments)) return;\n    return this.network.post(this.getResourceUrl(), parameters);\n  }\n  /**\n   * Retrieve details of a profile, using the profile's identifier.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/profiles-api/get-profile\n   */\n\n\n  get(id) {\n    if (renege(this, this.get, ...arguments)) return;\n\n    if (!checkId(id, 'profile')) {\n      throw new ApiError('The profile id is invalid');\n    }\n\n    return this.network.get(`${this.getResourceUrl()}/${id}`);\n  }\n  /**\n   * Use this API if you are creating a plugin or SaaS application that allows users to enter a Mollie API key, and you\n   * want to give a confirmation of the website profile that will be used in your plugin or application.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/profiles-api/get-profile-me\n   */\n\n\n  getCurrent() {\n    if (renege(this, this.getCurrent, ...arguments)) return;\n    return this.network.get(`${this.getResourceUrl()}/me`);\n  }\n  /**\n   * Retrieve all profiles available on the account.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/profiles-api/list-profiles\n   */\n\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'profiles', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n  /**\n   * A profile is required to process payments. A profile can easily be created and updated via the Dashboard manually.\n   * However, the Mollie API also allows automatic profile creation and updates via the Profiles API.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/profiles-api/update-profile\n   */\n\n\n  update(id, parameters) {\n    if (renege(this, this.update, ...arguments)) return;\n\n    if (!checkId(id, 'profile')) {\n      throw new ApiError('The profile id is invalid');\n    }\n\n    return this.network.patch(`${this.getResourceUrl()}/${id}`, parameters);\n  }\n  /**\n   * This endpoint enables profile deletions, rendering the profile unavailable for further API calls and transactions.\n   *\n   * @since 3.2.0\n   *\n   * @see https://docs.mollie.com/reference/v2/profiles-api/delete-profile\n   */\n\n\n  delete(id) {\n    if (renege(this, this.delete, ...arguments)) return;\n\n    if (!checkId(id, 'profile')) {\n      throw new ApiError('The profile id is invalid');\n    }\n\n    return this.network.delete(`${this.getResourceUrl()}/${id}`);\n  }\n\n}\n\nclass RefundsResource$1 extends Resource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$1);\n\n    _defineProperty(this, \"all\", this.list);\n\n    _defineProperty(this, \"page\", this.list);\n  }\n\n  getResourceUrl() {\n    return 'refunds';\n  }\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'refunds', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\nclass SubscriptionsResource extends ParentedResource {\n  constructor(...args) {\n    super(...args);\n\n    _defineProperty(this, \"injectPrototypes\", injectPrototypes$6);\n  }\n\n  getResourceUrl() {\n    return 'subscriptions';\n  }\n\n  list(parameters = {}) {\n    if (renege(this, this.list, ...arguments)) return;\n    return this.network.list(this.getResourceUrl(), 'subscriptions', parameters).then(result => this.injectPaginationHelpers(result, this.list, parameters));\n  }\n\n}\n\nfunction preprocessVersionStrings(input) {\n  if (Array.isArray(input)) {\n    return input;\n  }\n\n  if (typeof input == 'string') {\n    return [input];\n  }\n\n  return [];\n}\n\nfunction createHttpClient(_ref) {\n  let {\n    apiKey,\n    accessToken,\n    versionStrings\n  } = _ref,\n      axiosOptions = _objectWithoutProperties(_ref, [\"apiKey\", \"accessToken\", \"versionStrings\"]);\n\n  axiosOptions.baseURL = 'https://api.mollie.com:443/v2/';\n\n  if (axiosOptions.headers == undefined) {\n    axiosOptions.headers = {};\n  }\n\n  axiosOptions.headers['User-Agent'] = [`Node/${process.version}`, `Mollie/${version}`, ...preprocessVersionStrings(versionStrings).map(versionString => {\n    //                platform/version\n    const matches = /^([^\\/]+)\\/([^\\/\\s]+)$/.exec(versionString);\n\n    if (matches === null) {\n      if (-1 == versionString.indexOf('/') || versionString.indexOf('/') != versionString.lastIndexOf('/')) {\n        throw new Error('Invalid version string. It needs to consist of a name and version separated by a forward slash, e.g. RockenbergCommerce/3.1.12');\n      }\n\n      throw new Error('Invalid version string. The version may not contain any whitespace.');\n    } // Replace whitespace in platform name with camelCase (first char stays untouched).\n\n\n    const platform = matches[1].replace(/([^^])(\\b\\w)/g, (_, boundary, character) => `${boundary}${character.toUpperCase()}`).replace(/\\s+/g, '');\n    const version = matches[2];\n    return `${platform}/${version}`;\n  })].join(' ');\n\n  if (apiKey != undefined) {\n    axiosOptions.headers['Authorization'] = `Bearer ${apiKey}`;\n  }\n  /* if (accessToken != undefined) */\n  else {\n      axiosOptions.headers['Authorization'] = `Bearer ${accessToken}`;\n      axiosOptions.headers['User-Agent'] += ' OAuth/2.0';\n    }\n\n  axiosOptions.headers['Accept-Encoding'] = 'gzip';\n  axiosOptions.headers['Content-Type'] = 'application/json';\n  let certFilename;\n\n  if (process.env.STAGE === 'local') {\n    certFilename = path.resolve(__dirname, './cacert.pem');\n  } else {\n    certFilename = path.resolve(String(process.env.LAMBDA_TASK_ROOT), 'node_modules/@the-any-thing/mollie-api-client-inline-pem/dist/cacert.pem');\n  }\n\n  console.log(`Mollie Certificate Filename: ${certFilename}`);\n  axiosOptions.httpsAgent = new https.Agent({\n    cert: fs.readFileSync(certFilename, 'utf8')\n  });\n  return axios.create(axiosOptions);\n}\n/**\n * Create Mollie client.\n * @since 2.0.0\n */\n\n\nfunction createMollieClient(options) {\n  if (!options.apiKey && !options.accessToken) {\n    throw new TypeError('Missing parameter \"apiKey\" or \"accessToken\".');\n  }\n\n  const httpClient = createHttpClient(options);\n  /* eslint-disable @typescript-eslint/camelcase */\n\n  return {\n    // Payments API\n    payments: new PaymentsResource(httpClient),\n    // Methods API\n    methods: new MethodsResource(httpClient),\n    // Refunds API\n    payments_refunds: new PaymentsRefundsResource(httpClient),\n    refunds: new RefundsResource$1(httpClient),\n    // Chargebacks API\n    payments_chargebacks: new PaymentsChargebacksResource(httpClient),\n    chargebacks: new ChargebacksResource(httpClient),\n    // Captures API\n    payments_captures: new PaymentsCapturesResource(httpClient),\n    // Customers API\n    customers: new CustomersResource(httpClient),\n    customers_payments: new CustomersPaymentsResource(httpClient),\n    // Mandates API\n    customers_mandates: new CustomersMandatesResource(httpClient),\n    // Subscriptions API\n    subscription: new SubscriptionsResource(httpClient),\n    customers_subscriptions: new CustomersSubscriptionsResource(httpClient),\n    // Orders API\n    orders: new OrdersResource(httpClient),\n    orders_refunds: new RefundsResource(httpClient),\n    orders_lines: new OrdersLinesResource(httpClient),\n    orders_payments: new OrdersPaymentsResource(httpClient),\n    // Shipments API\n    orders_shipments: new OrdersShipmentsResource(httpClient),\n    // Permissions API\n    permissions: new PermissionsResource(httpClient),\n    // Organizations API\n    organizations: new OrganizationsResource(httpClient),\n    // Profiles API\n    profiles: new ProfilesResource(httpClient),\n    // Onboarding API\n    onboarding: new OnboardingResource(httpClient)\n  };\n  /* eslint-enable @typescript-eslint/camelcase */\n}\n\nexports.createMollieClient = createMollieClient;\nexports.default = createMollieClient;\n"]}