Skip to content

Commit 33c5635

Browse files
fix(paymentRequest): requires an external_customer_id (#224)
1 parent f597355 commit 33c5635

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

payment_request.go

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,37 +13,37 @@ type PaymentRequestRequest struct {
1313
}
1414

1515
type PaymentRequestResult struct {
16-
PaymentRequest *PaymentRequest `json:"payment_request,omitempty"`
16+
PaymentRequest *PaymentRequest `json:"payment_request,omitempty"`
1717
PaymentRequests []PaymentRequest `json:"payment_requests,omitempty"`
1818
}
1919

2020
type PaymentRequestListInput struct {
2121
PerPage int `json:"per_page,omitempty,string"`
2222
Page int `json:"page,omitempty,string"`
2323

24-
ExternalCustomerID string `json:"external_customer_id,omitempty"`
24+
ExternalCustomerID string `json:"external_customer_id,omitempty"`
2525
}
2626

2727
type PaymentRequest struct {
28-
LagoID uuid.UUID `json:"lago_id,omitempty"`
29-
Email string `json:"email,omitempty"`
30-
AmountCurrency Currency `json:"amount_currency,omitempty"`
31-
AmountCents int `json:"amount_cents,omitempty"`
32-
PaymentStatus string `json:"payment_status,omitempty"`
33-
CreatedAt time.Time `json:"created_at,omitempty"`
34-
35-
Customer *Customer `json:"customer,omitempty"`
36-
Invoices []Invoice `json:"fees,omitempty"`
28+
LagoID uuid.UUID `json:"lago_id,omitempty"`
29+
Email string `json:"email,omitempty"`
30+
AmountCurrency Currency `json:"amount_currency,omitempty"`
31+
AmountCents int `json:"amount_cents,omitempty"`
32+
PaymentStatus string `json:"payment_status,omitempty"`
33+
CreatedAt time.Time `json:"created_at,omitempty"`
34+
35+
Customer *Customer `json:"customer,omitempty"`
36+
Invoices []Invoice `json:"fees,omitempty"`
3737
}
3838

3939
type PaymentRequestParams struct {
4040
PaymentRequest *PaymentRequestInput `json:"payment_request"`
4141
}
4242

4343
type PaymentRequestInput struct {
44-
Email string `json:"email,omitempty"`
45-
CustomerExternalId string `json:"customer_external_id,omitempty"`
46-
LagoInvoiceIds []string `json:"lago_invoice_ids,omitempty"`
44+
Email string `json:"email,omitempty"`
45+
ExternalCustomerId string `json:"external_customer_id,omitempty"`
46+
LagoInvoiceIds []string `json:"lago_invoice_ids,omitempty"`
4747
}
4848

4949
func (c *Client) PaymentRequest() *PaymentRequestRequest {

0 commit comments

Comments
 (0)