Skip to content

Commit

Permalink
fix async iterator example
Browse files Browse the repository at this point in the history
  • Loading branch information
janpaepke committed Sep 26, 2024
1 parent 7918878 commit bb582d4
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ The `page` methods do not fit every use case. If you find yourself retrieving mu

```javascript
// Iterate over all payments.
for await (let payment in mollieClient.payments.iterate()) {
for await (const payment of mollieClient.payments.iterate()) {
// (Use break to end the loop prematurely.)
}
```
Expand Down
73 changes: 36 additions & 37 deletions src/createMollieClient.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,64 @@
// Lib
import { apply } from 'ruply';
import { version as libraryVersion } from '../package.json';
import caCertificates from './cacert.pem';
import NetworkClient from './communication/NetworkClient';
import TransformingNetworkClient, { Transformers } from './communication/TransformingNetworkClient';
import { checkCredentials } from './Options';
import type Options from './Options';
import alias from './plumbing/alias';

// Transformers
import { transform as transformPayment } from './data/payments/Payment';
import { transform as transformMethod } from './data/methods/Method';
import { transform as transformRefund } from './data/refunds/Refund';
import { transform as transformChargeback } from './data/chargebacks/Chargeback';
import { transform as transformCapture } from './data/payments/captures/Capture';
import { transform as transformCustomer } from './data/customers/Customer';
import { transform as transformMandate } from './data/customers/mandates/Mandate';
import { transform as transformSubscription } from './data/subscriptions/Subscription';
import { transform as transformOrder } from './data/orders/Order';
import { transform as transformShipment } from './data/orders/shipments/Shipment';
import { transform as transformPermission } from './data/permissions/Permission';
import { transform as transformOrganization } from './data/organizations/Organizations';
import { transform as transformProfile } from './data/profiles/Profile';
import { transform as transformOnboarding } from './data/onboarding/Onboarding';
import { transform as transformPaymentLink } from './data/paymentLinks/PaymentLink';
import { transform as transformIssuer } from './data/issuer/IssuerModel';
import { transform as transformSettlement } from './data/settlements/SettlementModel';

import { version as libraryVersion } from '../package.json';
// Binders
import ApplePayBinder from './binders/applePay/ApplePayBinder';
import ChargebacksBinder from './binders/chargebacks/ChargebacksBinder';
import CustomersBinder from './binders/customers/CustomersBinder';
import CustomerMandatesBinder from './binders/customers/mandates/CustomerMandatesBinder';
import CustomerPaymentsBinder from './binders/customers/payments/CustomerPaymentsBinder';
import CustomersBinder from './binders/customers/CustomersBinder';
import CustomerSubscriptionsBinder from './binders/customers/subscriptions/CustomerSubscriptionsBinder';
import MethodsBinder from './binders/methods/MethodsBinder';
import OnboardingBinder from './binders/onboarding/OnboardingBinder';
import OrderLinesBinder from './binders/orders/orderlines/OrderLinesBinder';
import OrderPaymentsBinder from './binders/payments/orders/OrderPaymentsBinder';
import OrderRefundsBinder from './binders/refunds/orders/OrderRefundsBinder';
import OrdersBinder from './binders/orders/OrdersBinder';
import OrderShipmentsBinder from './binders/orders/shipments/OrderShipmentsBinder';
import OrganizationsBinder from './binders/organizations/OrganizationsBinder';
import PaymentLinksBinder from './binders/paymentLinks/PaymentLinksBinder';
import PaymentCapturesBinder from './binders/payments/captures/PaymentCapturesBinder';
import PaymentChargebacksBinder from './binders/payments/chargebacks/PaymentChargebacksBinder';
import PaymentLinksBinder from './binders/paymentLinks/PaymentLinksBinder';
import PaymentRefundsBinder from './binders/payments/refunds/PaymentRefundsBinder';
import OrderPaymentsBinder from './binders/payments/orders/OrderPaymentsBinder';
import PaymentsBinder from './binders/payments/PaymentsBinder';
import PaymentRefundsBinder from './binders/payments/refunds/PaymentRefundsBinder';
import PermissionsBinder from './binders/permissions/PermissionsBinder';
import ProfilesBinder from './binders/profiles/ProfilesBinder';
import ProfileMethodsBinder from './binders/profiles/methods/ProfileMethodsBinder';
import ProfileGiftcardIssuersBinder from './binders/profiles/giftcardIssuers/ProfileGiftcardIssuersBinder';
import ProfileMethodsBinder from './binders/profiles/methods/ProfileMethodsBinder';
import ProfilesBinder from './binders/profiles/ProfilesBinder';
import ProfileVoucherIssuersBinder from './binders/profiles/voucherIssuers/ProfileVoucherIssuersBinder';
import OrderRefundsBinder from './binders/refunds/orders/OrderRefundsBinder';
import RefundsBinder from './binders/refunds/RefundsBinder';
import SettlementPaymentsBinder from './binders/settlements/payments/SettlementPaymentsBinder';
import SettlementCapturesBinder from './binders/settlements/captures/SettlementCapturesBinder';
import SettlementRefundsBinder from './binders/settlements/refunds/SettlementRefundsBinder';
import SettlementChargebacksBinder from './binders/settlements/chargebacks/SettlementChargebacksBinder';
import SettlementPaymentsBinder from './binders/settlements/payments/SettlementPaymentsBinder';
import SettlementRefundsBinder from './binders/settlements/refunds/SettlementRefundsBinder';
import SettlementsBinder from './binders/settlements/SettlementsBinder';
import SubscriptionsBinder from './binders/subscriptions/SubscriptionsBinder';
import SubscriptionPaymentsBinder from './binders/subscriptions/payments/SubscriptionPaymentsBinder';
import SubscriptionsBinder from './binders/subscriptions/SubscriptionsBinder';
import caCertificates from './cacert.pem';
import NetworkClient from './communication/NetworkClient';
import TransformingNetworkClient, { Transformers } from './communication/TransformingNetworkClient';
import { transform as transformChargeback } from './data/chargebacks/Chargeback';
import { transform as transformCustomer } from './data/customers/Customer';
import { transform as transformMandate } from './data/customers/mandates/Mandate';
import { transform as transformIssuer } from './data/issuer/IssuerModel';
import { transform as transformMethod } from './data/methods/Method';
import { transform as transformOnboarding } from './data/onboarding/Onboarding';
import { transform as transformOrder } from './data/orders/Order';
import { transform as transformShipment } from './data/orders/shipments/Shipment';
import { transform as transformOrganization } from './data/organizations/Organizations';
import { transform as transformPaymentLink } from './data/paymentLinks/PaymentLink';
import { transform as transformCapture } from './data/payments/captures/Capture';
// Transformers
import { transform as transformPayment } from './data/payments/Payment';
import { transform as transformPermission } from './data/permissions/Permission';
import { transform as transformProfile } from './data/profiles/Profile';
import { transform as transformRefund } from './data/refunds/Refund';
import { transform as transformSettlement } from './data/settlements/SettlementModel';
import { transform as transformSubscription } from './data/subscriptions/Subscription';
import { checkCredentials } from './Options';
import type Options from './Options';
import alias from './plumbing/alias';

/**
* Create Mollie client.
Expand Down Expand Up @@ -188,7 +187,7 @@ export { createMollieClient };

export { ApiMode, Locale, PaymentMethod, HistoricPaymentMethod, SequenceType } from './data/global';
export { CaptureEmbed } from './data/payments/captures/data';
export { type MandateDetails, type MandateDetailsCreditCard, type MandateDetailsDirectDebit, MandateMethod, MandateStatus } from './data/customers/mandates/data';
export { MandateMethod, MandateStatus } from './data/customers/mandates/data';
export { MethodImageSize, MethodInclude } from './data/methods/data';
export { OrderEmbed, OrderStatus } from './data/orders/data';
export { OrderLineType } from './data/orders/orderlines/OrderLine';
Expand Down

0 comments on commit bb582d4

Please sign in to comment.