Skip to content

Commit

Permalink
Merge pull request #311 from mollie/pimm/update-documentation
Browse files Browse the repository at this point in the history
Update documentation.
  • Loading branch information
Pimm authored Mar 8, 2023
2 parents 34a4bed + e5829b1 commit 4b32c3b
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 27 deletions.
4 changes: 2 additions & 2 deletions src/binders/customers/CustomersBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default class CustomersBinder extends Binder<CustomerData, Customer> {
public cancel: CustomersBinder['delete'] = this.delete;

/**
* Creates a simple minimal representation of a customer in the Mollie API to use for the [Mollie Checkout](https://www.mollie.com/en/checkout) and Recurring features. These customers will appear in
* your [Mollie Dashboard](https://www.mollie.com/dashboard/) where you can manage their details, and also see their payments and subscriptions.
* Creates a simple minimal representation of a customer in the Mollie API to use for the [Mollie Checkout](https://www.mollie.com/products/checkout) and Recurring features. These customers will
* appear in your [Mollie Dashboard](https://www.mollie.com/dashboard) where you can manage their details, and also see their payments and subscriptions.
*
* @since 2.0.0
* @see https://docs.mollie.com/reference/v2/customers-api/create-customer
Expand Down
2 changes: 1 addition & 1 deletion src/binders/customers/payments/CustomerPaymentsBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class CustomerPaymentsBinder extends InnerBinder<PaymentData, Pay
/**
* Creates a payment for the customer.
*
* Linking customers to payments enables a number of [Mollie Checkout](https://www.mollie.com/en/checkout) features, including:
* Linking customers to payments enables a number of [Mollie Checkout](https://www.mollie.com/products/checkout) features, including:
*
* - Keeping track of payment preferences for your customers.
* - Enabling your customers to charge a previously used credit card with a single click.
Expand Down
2 changes: 1 addition & 1 deletion src/binders/onboarding/OnboardingBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class OnboardingBinder extends Binder<OnboardingData, Onboarding>
}

/**
* Submit data that will be prefilled in the merchant's onboarding. Please note that the data you submit will only be processed when the onboarding status is `needs-data`.
* Submit data that will be prefilled in the merchant's onboarding. The data you submit will only be processed when the onboarding status is `needs-data`.
*
* @since 3.2.0
* @see https://docs.mollie.com/reference/v2/onboarding-api/submit-onboarding-data
Expand Down
4 changes: 2 additions & 2 deletions src/binders/orders/OrdersBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default class OrdersBinder extends Binder<OrderData, Order> {
* 2. In case of `authorized`, the authorization will be released, all order lines will be canceled and the new order status will be `canceled`.
* 3. In case of `shipping`, any order lines that are still `authorized` will be canceled and order lines that are `shipping` will be completed. The new order status will be `completed`.
*
* For more information about the status transitions please check our order status changes guide.
* For more information about the status transitions, check our order status changes guide.
*
* [1] If the order status is `shipping`, some order lines can have the status `paid` if the order was paid using a payment method that does not support authorizations (such as iDEAL) and the order
* lines are not shipped yet. In this case, the order cannot be canceled. You should create refunds for these order lines instead.
Expand Down Expand Up @@ -175,7 +175,7 @@ export default class OrdersBinder extends Binder<OrderData, Order> {
* 2. In case of `authorized`, the authorization will be released, all order lines will be canceled and the new order status will be `canceled`.
* 3. In case of `shipping`, any order lines that are still `authorized` will be canceled and order lines that are `shipping` will be completed. The new order status will be `completed`.
*
* For more information about the status transitions please check our order status changes guide.
* For more information about the status transitions, check our order status changes guide.
*
* [1] If the order status is `shipping`, some order lines can have the status `paid` if the order was paid using a payment method that does not support authorizations (such as iDEAL) and the order
* lines are not shipped yet. In this case, the order cannot be canceled. You should create refunds for these order lines instead.
Expand Down
4 changes: 2 additions & 2 deletions src/binders/orders/orderlines/OrderLinesBinder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class OrderLinesBinder extends InnerBinder<OrderData, Order> {
*
* If the order line is `paid` or already `completed`, you should create a refund using the Create order refund endpoint instead.
*
* For more information about the status transitions please check our order status changes guide.
* For more information about the status transitions, check our order status changes guide.
*
* @since 3.0.0
* @deprecated Use `cancel` instead.
Expand Down Expand Up @@ -84,7 +84,7 @@ export default class OrderLinesBinder extends InnerBinder<OrderData, Order> {
*
* If the order line is `paid` or already `completed`, you should create a refund using the Create order refund endpoint instead.
*
* For more information about the status transitions please check our order status changes guide.
* For more information about the status transitions, check our order status changes guide.
*
* @since 3.0.0
* @see https://docs.mollie.com/reference/v2/orders-api/cancel-order-lines
Expand Down
2 changes: 1 addition & 1 deletion src/binders/orders/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export type CreateParameters = Pick<OrderData, 'amount' | 'orderNumber' | 'consu
/**
* Any payment specific properties (for example, the `dueDate` for bank transfer payments) can be passed here. See payment-parameters for the possible fields.
*
* The `payment` property should be an *object* where the keys are the payment method specific parameters you want to pass.
* The `payment` property should be an *object* where the keys are the payment method-specific parameters you want to pass.
*
* @see https://docs.mollie.com/reference/v2/orders-api/create-order?path=payment#parameters
*/
Expand Down
12 changes: 8 additions & 4 deletions src/binders/payments/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export type CreateParameters = Pick<PaymentData, 'amount' | 'description' | 'red
*
* If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
*
* The field expects a country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for example <span class="title-ref">NL</span>.
*
* @see https://docs.mollie.com/reference/v2/payments-api/create-payment?path=restrictPaymentMethodsToCountry#parameters
*/
restrictPaymentMethodsToCountry?: string;
Expand All @@ -44,7 +46,7 @@ export type CreateParameters = Pick<PaymentData, 'amount' | 'description' | 'red
applePayPaymentToken?: string;
billingEmail?: string;
/**
* The date the payment should expire, in `YYYY-MM-DD` format. **Please note:** the minimum date is tomorrow and the maximum date is 100 days after tomorrow.
* The date the payment should expire, in `YYYY-MM-DD` format. **Note:** the minimum date is tomorrow and the maximum date is 100 days after tomorrow.
*
* After you created the payment, you can still update the `dueDate` via /reference/v2/payments-api/update-payment.
*
Expand All @@ -54,7 +56,7 @@ export type CreateParameters = Pick<PaymentData, 'amount' | 'description' | 'red
/**
* The card holder's address details. We advise to provide these details to improve the credit card fraud protection, and thus improve conversion.
*
* If an address is provided, then the address has to be in a valid format. Please refer to the documentation of the address object for more information on which formats are accepted.
* If an address is provided, then the address has to be in a valid format. See the address object documentation for more information on which formats are accepted.
*
* @see https://docs.mollie.com/reference/v2/payments-api/create-payment?path=billingAddress#credit-card
*/
Expand Down Expand Up @@ -87,13 +89,13 @@ export type CreateParameters = Pick<PaymentData, 'amount' | 'description' | 'red
/**
* The unique ID you have used for the PayPal fraud library. You should include this if you use PayPal for an on-demand payment. The maximum character length is 32.
*
* Please refer to the Recurring payments guide for more information on how to implement the fraud library.
* Refer to the Recurring payments guide for more information on how to implement the fraud library.
*
* @see https://docs.mollie.com/reference/v2/payments-api/create-payment?path=sessionId#paypal-method-details
*/
sessionId?: string;
/**
* Indicate if you are about to deliver digital goods, like for example a license. Setting this parameter can have consequences for your Seller Protection by PayPal. Please see [PayPal's help
* Indicate if you are about to deliver digital goods, like for example a license. Setting this parameter can have consequences for your Seller Protection by PayPal. See [PayPal's help
* article](https://www.paypal.com/us/brc/article/seller-protection) about Seller Protection for more information.
*
* Default: `false`
Expand Down Expand Up @@ -182,6 +184,8 @@ export type UpdateParameters = Pick<PaymentData, 'redirectUrl' | 'webhookUrl'> &
*
* If available, the credit card method will still be offered, but only cards from the allowed country are accepted.
*
* The field expects a country code in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format, for example <span class="title-ref">NL</span>.
*
* @see https://docs.mollie.com/reference/v2/payments-api/update-payment?path=restrictPaymentMethodsToCountry#parameters
*/
restrictPaymentMethodsToCountry?: string;
Expand Down
5 changes: 2 additions & 3 deletions src/binders/profiles/voucherIssuers/parameters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ export interface Parameters extends IdempotencyParameter {

export type CreateParameters = Parameters & {
/**
* The contract id of the related contractor. Please note, for the first call that will be made to an issuer of the contractor, this field is required. You do not have to provide the same contract
* id for other issuers of the same contractor. Update of the contract id will be possible through making the same call again with different contract ID value until the contract id is approved by
* the contractor.
* The contract id of the related contractor. For the first call that will be made to an issuer of the contractor, this field is required. You do not have to provide the same contract id for other
* issuers of the same contractor. Update of the contract ID will be possible through making the same call again with different contract ID value until the contract id is approved by the contractor.
*
* @see https://docs.mollie.com/reference/v2/profiles-api/enable-voucher-issuer?path=contractId#parameters
*/
Expand Down
2 changes: 1 addition & 1 deletion src/data/customers/mandates/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface MandateData extends Model<'mandate'> {
*/
mode: ApiMode;
/**
* The status of the mandate. Please note that a status can be `pending` for mandates when the first payment is not yet finalized or when we did not received the IBAN yet.
* The status of the mandate. A status can be `pending` for mandates when the first payment is not yet finalized or when we did not received the IBAN yet.
*
* Possible values: `valid` `pending` `invalid`
*
Expand Down
12 changes: 6 additions & 6 deletions src/data/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ export interface Address {
/**
* The street and street number of the address.
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3AstreetAndNumber#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=streetAndNumber#address-object
*/
streetAndNumber: string;
/**
* Any additional addressing details, for example an apartment number.
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3AstreetAdditional#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=streetAdditional#address-object
*/
streetAdditional?: string;
/**
Expand All @@ -90,25 +90,25 @@ export interface Address {
* `AE` `AN` `AO` `AW` `BF` `BI` `BJ` `BO` `BS` `BV` `BW` `BZ` `CD` `CF` `CG` `CI` `CK` `CM` `DJ` `DM` `ER` `FJ` `GA` `GD` `GH` `GM` `GN` `GQ` `GY` `HK` `JM` `KE` `KI` `KM` `KN` `KP` `LC` `ML` `MO`
* `MR` `MS` `MU` `MW` `NA` `NR` `NU` `PA` `QA` `RW` `SB` `SC` `SL` `SO` `SR` `ST` `SY` `TF` `TK` `TL` `TO` `TT` `TV` `UG` `VU` `YE` `ZM` `ZW`
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3ApostalCode#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=postalCode#address-object
*/
postalCode: string;
/**
* The city of the address.
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3Acity#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=city#address-object
*/
city: string;
/**
* The region of the address.
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3Aregion#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=region#address-object
*/
region?: string;
/**
* The country of the address in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
*
* @see https://docs.mollie.com/overview/common-data-types?path=table%3Acountry#address-object
* @see https://docs.mollie.com/overview/common-data-types?path=country#address-object
*/
country: string;
}
Expand Down
6 changes: 4 additions & 2 deletions src/data/orders/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export interface OrderData extends Model<'order'> {
/**
* The person and the address the order is billed to.
*
* Please refer to the documentation of the address object for more information on which formats are accepted.
* Refer to the documentation of the address object for more information on which formats are accepted.
*
* @see https://docs.mollie.com/reference/v2/orders-api/get-order?path=billingAddress#response
*/
Expand All @@ -86,7 +86,7 @@ export interface OrderData extends Model<'order'> {
/**
* The person and the address the order is billed to.
*
* Please refer to the documentation of the address object for more information on which formats are accepted.
* Refer to the documentation of the address object for more information on which formats are accepted.
*
* @see https://docs.mollie.com/reference/v2/orders-api/get-order?path=shippingAddress#response
*/
Expand All @@ -109,6 +109,8 @@ export interface OrderData extends Model<'order'> {
/**
* The URL your customer will be redirected to after completing or canceling the payment process.
*
* The URL will be `null` for recurring orders.
*
* @see https://docs.mollie.com/reference/v2/orders-api/get-order?path=redirectUrl#response
*/
redirectUrl: Nullable<string>;
Expand Down
2 changes: 1 addition & 1 deletion src/data/payments/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface PaymentData extends Model<'payment'> {
*/
createdAt: string;
/**
* The payment's status. Please refer to the documentation regarding statuses for more info about which statuses occur at what point.
* The payment's status. Refer to the documentation regarding statuses for more info about which statuses occur at what point.
*
* @see https://docs.mollie.com/reference/v2/payments-api/get-payment?path=status#response
*/
Expand Down
2 changes: 1 addition & 1 deletion src/data/profiles/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export interface ProfileData extends Model<'profile'> {
/**
* The industry associated with the profile's trade name or brand.
*
* Please refer to the documentation of the business category for more information on which values are accepted.
* Refer to the documentation of the business category for more information on which values are accepted.
*
* @see https://docs.mollie.com/reference/v2/profiles-api/get-profile?path=businessCategory#response
*/
Expand Down

0 comments on commit 4b32c3b

Please sign in to comment.