-
Notifications
You must be signed in to change notification settings - Fork 2
/
notification_logs.go
50 lines (41 loc) · 2.13 KB
/
notification_logs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Code generated by the Paddle SDK Generator; DO NOT EDIT.
package paddle
import "context"
// NotificationLog: Represents a notification log entity.
type NotificationLog struct {
// ID: Unique Paddle ID for this notification log, prefixed with `ntflog_`.
ID string `json:"id,omitempty"`
// ResponseCode: HTTP code sent by the responding server.
ResponseCode int `json:"response_code,omitempty"`
// ResponseContentType: Content-Type sent by the responding server.
ResponseContentType *string `json:"response_content_type,omitempty"`
// ResponseBody: Response body sent by the responding server. Typically empty for success responses.
ResponseBody string `json:"response_body,omitempty"`
// AttemptedAt: RFC 3339 datetime string of when Paddle attempted to deliver the related notification.
AttemptedAt string `json:"attempted_at,omitempty"`
}
// NotificationLogsClient is a client for the Notification logs resource.
type NotificationLogsClient struct {
doer Doer
}
// ListNotificationLogsRequest is given as an input to ListNotificationLogs.
type ListNotificationLogsRequest struct {
// URL path parameters.
NotificationID string `in:"path=notification_id" json:"-"`
// After is a query parameter.
// Return entities after the specified Paddle ID when working with paginated endpoints. Used in the `meta.pagination.next` URL in responses for list operations.
After *string `in:"query=after;omitempty" json:"-"`
// PerPage is a query parameter.
/*
Set how many entities are returned per page. Paddle returns the maximum number of results if a number greater than the maximum is requested. Check `meta.pagination.per_page` in the response to see how many were returned.
Default: `50`; Maximum: `200`.
*/
PerPage *int `in:"query=per_page;omitempty" json:"-"`
}
// ListNotificationLogs performs the GET operation on a Notification logs resource.
func (c *NotificationLogsClient) ListNotificationLogs(ctx context.Context, req *ListNotificationLogsRequest) (res *Collection[*NotificationLog], err error) {
if err := c.doer.Do(ctx, "GET", "/notifications/{notification_id}/logs", req, &res); err != nil {
return nil, err
}
return res, nil
}