mollie-api-go
mollie-api-go copied to clipboard
Making List.Embedded References Consistent
Is your feature request related to a problem? Please describe. For some List objects you define the Embedded field as slice of pointers, for some as slice of objects. Is there a reason for this?
E.g.:
// Same for CapturesList, ChargebacksList, InvoicesList
type PaymentList struct {
Count int `json:"count,omitempty"`
Embedded struct {
Payments []Payment
} `json:"_embedded,omitempty"`
Links PaginationLinks `json:"_links,omitempty"`
}
// Same for SettlementList, BalanceTransactionsList
type RefundList struct {
Count int `json:"count,omitempty"`
Embedded struct {
Refunds []*Refund
} `json:"_embedded,omitempty"`
Links PaginationLinks `json:"_links,omitempty"`
}
Describe the solution you'd like The definition should be consistent.