Skip to content

Commit 73033d9

Browse files
committed
feat!: rename Event to EventType
1 parent de5467c commit 73033d9

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

checkout_session.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,18 +92,18 @@ func (s *ServiceCheckoutSessions) Expire(id string) (*CheckoutSession, error) {
9292
//
9393
// API reference: https://docs.payrexhq.com/docs/api/checkout_sessions/create
9494
type CreateCheckoutSessionParams struct {
95-
URL string `form:"url"`
96-
Description *string `form:"description"`
97-
Events []Event `form:"events"`
95+
URL string `form:"url"`
96+
Description *string `form:"description"`
97+
Events []EventType `form:"events"`
9898
}
9999

100100
// UpdateCheckoutSessionParams represents the available [ServiceCheckoutSessions.Update] parameters.
101101
//
102102
// API reference: https://docs.payrexhq.com/docs/api/checkout_sessions/update
103103
type UpdateCheckoutSessionParams struct {
104-
URL *string `form:"url"`
105-
Description *string `form:"description"`
106-
Events *[]Event `form:"events"`
104+
URL *string `form:"url"`
105+
Description *string `form:"description"`
106+
Events *[]EventType `form:"events"`
107107
}
108108

109109
// ListCheckoutSessionsParams represents the available [ServiceCheckoutSessions.List] parameters.

event.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
package payrex
22

3-
type Event string
3+
type EventType string
44

55
// TODO: Event values

webhook.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ type Webhook struct {
99
Status WebhookStatus `json:"status"`
1010
Description *string `json:"description"`
1111
URL string `json:"url"`
12-
Events []Event `json:"events"`
12+
Events []EventType `json:"events"`
1313
}
1414

1515
// WebhookStatus enumerates the valid values for the [Webhook].Status field.
@@ -97,18 +97,18 @@ func (s *ServiceWebhooks) Delete(id string) (*DeletedResource, error) {
9797
//
9898
// API reference: https://docs.payrexhq.com/docs/api/webhooks/create
9999
type CreateWebhookParams struct {
100-
URL string `form:"url"`
101-
Description *string `form:"description"`
102-
Events []Event `form:"events"`
100+
URL string `form:"url"`
101+
Description *string `form:"description"`
102+
Events []EventType `form:"events"`
103103
}
104104

105105
// UpdateWebhookParams represents the available [ServiceWebhooks.Update] parameters.
106106
//
107107
// API reference: https://docs.payrexhq.com/docs/api/webhooks/update
108108
type UpdateWebhookParams struct {
109-
URL *string `form:"url"`
110-
Description *string `form:"description"`
111-
Events *[]Event `form:"events"`
109+
URL *string `form:"url"`
110+
Description *string `form:"description"`
111+
Events *[]EventType `form:"events"`
112112
}
113113

114114
// ListWebhooksParams represents the available [ServiceWebhooks.List] parameters.

0 commit comments

Comments
 (0)