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.
I think what you are describing is completely accurate, I'll try to sweep the library and make it consistent.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had any activity after being labeled as staled.
Closed with #327 - All list operation return a slice of pointers to the resource they list.