{"size": 691, "ext": "js", "max_stars_repo_path": "examples/refunds/list.js", "max_stars_repo_name": "KiaraGrouwstra/mollie-api-node", "max_stars_repo_stars_event_min_datetime": "2015-02-14T16:55:54.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-14T00:35:29.000Z", "max_issues_repo_path": "examples/refunds/list.js", "max_issues_repo_name": "KiaraGrouwstra/mollie-api-node", "max_issues_repo_issues_event_min_datetime": "2015-03-13T10:55:27.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-30T12:41:41.000Z", "max_forks_repo_path": "examples/refunds/list.js", "max_forks_repo_name": "KiaraGrouwstra/mollie-api-node", "max_forks_repo_forks_event_min_datetime": "2015-04-27T15:49:43.000Z", "max_forks_repo_forks_event_max_datetime": "2021-12-22T14:50:10.000Z"}
{"max_stars_count": 196, "max_issues_count": 180, "max_forks_count": 76, "avg_line_length": 28.7916666667, "max_line_length": 97, "alphanum_fraction": 0.7004341534}
/**
 * @docs https://docs.mollie.com/reference/v2/refunds-api/list-refunds
 * @docs https://docs.mollie.com/reference/v2/orders-api/list-order-refunds
 */
const { createMollieClient } = require('@mollie/api-client');

const mollieClient = createMollieClient({ apiKey: 'test_dHar4XY7LxsDOtmnkVtjNVWXLSlXsM' });

(async () => {
  try {
    // Payment refunds
    const paymentRefunds = await mollieClient.paymentRefunds.all({ paymentId: 'tr_WDqYK6vllg' });

    console.log(paymentRefunds);

    // Order refunds
    const orderRefunds = await mollieClient.orderRefunds.all({ orderId: 'ord_stTC2WHAuS' });

    console.log(orderRefunds);
  } catch (error) {
    console.warn(error);
  }
})();
