Skip to content

Commit

Permalink
fix(paymentRequest): requires an external_customer_id (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet authored Jan 27, 2025
1 parent f597355 commit 33c5635
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions payment_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,37 +13,37 @@ type PaymentRequestRequest struct {
}

type PaymentRequestResult struct {
PaymentRequest *PaymentRequest `json:"payment_request,omitempty"`
PaymentRequest *PaymentRequest `json:"payment_request,omitempty"`
PaymentRequests []PaymentRequest `json:"payment_requests,omitempty"`
}

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

ExternalCustomerID string `json:"external_customer_id,omitempty"`
ExternalCustomerID string `json:"external_customer_id,omitempty"`
}

type PaymentRequest struct {
LagoID uuid.UUID `json:"lago_id,omitempty"`
Email string `json:"email,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
PaymentStatus string `json:"payment_status,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`

Customer *Customer `json:"customer,omitempty"`
Invoices []Invoice `json:"fees,omitempty"`
LagoID uuid.UUID `json:"lago_id,omitempty"`
Email string `json:"email,omitempty"`
AmountCurrency Currency `json:"amount_currency,omitempty"`
AmountCents int `json:"amount_cents,omitempty"`
PaymentStatus string `json:"payment_status,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`

Customer *Customer `json:"customer,omitempty"`
Invoices []Invoice `json:"fees,omitempty"`
}

type PaymentRequestParams struct {
PaymentRequest *PaymentRequestInput `json:"payment_request"`
}

type PaymentRequestInput struct {
Email string `json:"email,omitempty"`
CustomerExternalId string `json:"customer_external_id,omitempty"`
LagoInvoiceIds []string `json:"lago_invoice_ids,omitempty"`
Email string `json:"email,omitempty"`
ExternalCustomerId string `json:"external_customer_id,omitempty"`
LagoInvoiceIds []string `json:"lago_invoice_ids,omitempty"`
}

func (c *Client) PaymentRequest() *PaymentRequestRequest {
Expand Down

0 comments on commit 33c5635

Please sign in to comment.