From ada57c930115c1939c0b3cad462109d00b7c926a Mon Sep 17 00:00:00 2001 From: Victor Hugo Avelar Ossorio Date: Wed, 11 Dec 2024 13:52:04 +0000 Subject: [PATCH 1/2] feat(payments): add 'tip' as supported line type --- mollie/payments.go | 1 + 1 file changed, 1 insertion(+) diff --git a/mollie/payments.go b/mollie/payments.go index 87e5f13..1006e28 100644 --- a/mollie/payments.go +++ b/mollie/payments.go @@ -152,6 +152,7 @@ const ( StoreCreditLine PaymentLineType = "store_credit" GiftCardLine PaymentLineType = "gift_card" SurchargeLine PaymentLineType = "surcharge" + Tip PaymentLineType = "tip" ) // PaymentLines describes the payment lines to be sent to the Mollie API when From 240f60f855165962157586e7f5547a22d32d81e4 Mon Sep 17 00:00:00 2001 From: Victor Hugo Avelar Ossorio Date: Wed, 11 Dec 2024 13:54:42 +0000 Subject: [PATCH 2/2] chore(docs): update generated docs --- docs/README.md | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/docs/README.md b/docs/README.md index a932e03..73d76d6 100644 --- a/docs/README.md +++ b/docs/README.md @@ -423,7 +423,7 @@ func CheckResponse(r *Response) error CheckResponse checks the API response for errors, and returns them if present. A response is considered an error if it has a status code outside the 200 range. API error responses are expected to have either no response body, or a JSON response body. -## type [AccessTokenPaymentFields]() +## type [AccessTokenPaymentFields]() AccessTokenPaymentFields describes the fields specific to payments created using an access token. @@ -2827,7 +2827,7 @@ type ListPaymentMethodsOptions struct { ``` -## type [ListPaymentsOptions]() +## type [ListPaymentsOptions]() ListPaymentsOptions describes list payments endpoint valid query string parameters. @@ -3124,7 +3124,7 @@ const ( ``` -## type [MollieConnectPaymentFields]() +## type [MollieConnectPaymentFields]() MollieConnectPaymentFields describes the fields specific to Mollie Connect payments. @@ -3903,7 +3903,7 @@ const ( ``` -## type [Payment]() +## type [Payment]() Payment describes a transaction between a customer and a merchant. @@ -4060,11 +4060,12 @@ const ( StoreCreditLine PaymentLineType = "store_credit" GiftCardLine PaymentLineType = "gift_card" SurchargeLine PaymentLineType = "surcharge" + Tip PaymentLineType = "tip" ) ``` -## type [PaymentLines]() +## type [PaymentLines]() PaymentLines describes the payment lines to be sent to the Mollie API when creating a new payment. @@ -4141,7 +4142,7 @@ type PaymentLinkOptions struct { ``` -## type [PaymentLinks]() +## type [PaymentLinks]() PaymentLinks describes all the possible links to be returned with a payment object. @@ -4245,7 +4246,7 @@ Update changes certain details of an existing payment link. See: https://docs.mollie.com/reference/update-payment-link -## type [PaymentList]() +## type [PaymentList]() PaymentList describes how a list of payments will be retrieved by Mollie. @@ -4437,7 +4438,7 @@ The results are not paginated. See: https://docs.mollie.com/reference/list-methods -## type [PaymentOptions]() +## type [PaymentOptions]() PaymentOptions describes payments endpoint valid query string parameters. @@ -4498,7 +4499,7 @@ type PaymentRouting struct { ``` -## type [PaymentsService]() +## type [PaymentsService]() PaymentsService instance operates over payment resources. @@ -4507,7 +4508,7 @@ type PaymentsService service ``` -### func \(\*PaymentsService\) [Cancel]() +### func \(\*PaymentsService\) [Cancel]() ```go func (ps *PaymentsService) Cancel(ctx context.Context, id string) (res *Response, p *Payment, err error) @@ -4518,7 +4519,7 @@ Cancel removes a payment \(if possible\) from your Mollie account. See: https://docs.mollie.com/reference/cancel-payment -### func \(\*PaymentsService\) [Create]() +### func \(\*PaymentsService\) [Create]() ```go func (ps *PaymentsService) Create(ctx context.Context, p CreatePayment, opts *PaymentOptions) (res *Response, np *Payment, err error) @@ -4529,7 +4530,7 @@ Create stores a new payment object attached to your Mollie account. See: https://docs.mollie.com/reference/create-payment# -### func \(\*PaymentsService\) [Get]() +### func \(\*PaymentsService\) [Get]() ```go func (ps *PaymentsService) Get(ctx context.Context, id string, opts *PaymentOptions) (res *Response, p *Payment, err error) @@ -4538,7 +4539,7 @@ func (ps *PaymentsService) Get(ctx context.Context, id string, opts *PaymentOpti Get retrieves a single payment object by its payment token. -### func \(\*PaymentsService\) [List]() +### func \(\*PaymentsService\) [List]() ```go func (ps *PaymentsService) List(ctx context.Context, opts *ListPaymentsOptions) (res *Response, pl *PaymentList, err error) @@ -4549,7 +4550,7 @@ List retrieves a list of payments associated with your account/organization. See: https://docs.mollie.com/reference/list-payments -### func \(\*PaymentsService\) [Update]() +### func \(\*PaymentsService\) [Update]() ```go func (ps *PaymentsService) Update(ctx context.Context, id string, up UpdatePayment) (res *Response, p *Payment, err error) @@ -4685,7 +4686,7 @@ type PhoneNumber string ``` -## type [PreAuthorizedPaymentFields]() +## type [PreAuthorizedPaymentFields]() PreAuthorizedPaymentFields describes the fields specific to pre\-authorized payments. @@ -5017,7 +5018,7 @@ type Rate struct { ``` -## type [RecurrentPaymentFields]() +## type [RecurrentPaymentFields]() RecurrentPaymentFields describes the fields specific to recurrent payments. @@ -6039,7 +6040,7 @@ type UpdateOrderLine struct { ``` -## type [UpdatePayment]() +## type [UpdatePayment]() UpdatePayment describes the payload to be sent to the Mollie API when updating a payment.