Repository: VictorAvelar/mollie-api-go
Pull request #341 (2024-03-10 11:48:08)

check clients resource against api reference
<!--- Provide a general summary of your changes in the Title above -->

# Description

Ensures that the `clients` resource delivers API parity. 

## Motivation and context

Ensures the library has full API parity.

## How has this been tested?

Please describe in detail how you tested your changes.

Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

- [x] Unit tests added / updated
- [x] The tests run on docker (using `make test`)
- [ ] The required `test data` has been added / updated

If you are running the tests locally, please specify:

- OS: macos
- Go version 1.22

## Types of changes

What types of changes does your code introduce? Put an `x` in all the boxes that apply:

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] This change requires a documentation update

## Checklist

Go over all the following points, and put an `x` in all the boxes that apply.

Please, please, please, don't send your pull request until all of the boxes are ticked. Once your pull request is created, it will trigger a build on our continuous integration server to make sure your [tests and code style pass](https://help.github.com/articles/about-required-status-checks/).

- [x] I have read the **[CONTRIBUTING](CONTRIBUTING.md)** document.
- [x] My pull request addresses exactly one patch/feature.
- [x] I have created a branch for this patch/feature.
- [x] Each individual commit in the pull request is meaningful.
- [x] If my change requires a change to the documentation, I have updated it accordingly.

<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->



Patch:
diff --git a/docs/README.md b/docs/README.md
index 0ee9b42..869eeea 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -90,7 +90,9 @@ REST also implies a nice and clean structure for URLs or endpoints. This means y
 - [type ClientLinksService](<#ClientLinksService>)
   - [func \(cls \*ClientLinksService\) Create\(ctx context.Context, cd CreateClientLink\) \(res \*Response, cl \*ClientLink, err error\)](<#ClientLinksService.Create>)
   - [func \(cls \*ClientLinksService\) GetFinalClientLink\(ctx context.Context, clientLink string, options \*ClientLinkAuthorizeOptions\) \(clientLinkURI string\)](<#ClientLinksService.GetFinalClientLink>)
-- [type Commission](<#Commission>)
+- [type ClientsService](<#ClientsService>)
+  - [func \(ps \*ClientsService\) Get\(ctx context.Context, id string, opts \*GetLinkedClientOptions\) \(res \*Response, pc \*LinkedClient, err error\)](<#ClientsService.Get>)
+  - [func \(ps \*ClientsService\) List\(ctx context.Context, opts \*ListLinkedClientsOptions\) \(res \*Response, pc \*LinkedClientList, err error\)](<#ClientsService.List>)
 - [type Company](<#Company>)
 - [type Config](<#Config>)
   - [func NewAPIConfig\(reqIdem bool\) \*Config](<#NewAPIConfig>)
@@ -134,7 +136,7 @@ REST also implies a nice and clean structure for URLs or endpoints. This means y
 - [type ErrorLinks](<#ErrorLinks>)
 - [type FailureReason](<#FailureReason>)
 - [type FeeRegion](<#FeeRegion>)
-- [type GetPartnerClientOptions](<#GetPartnerClientOptions>)
+- [type GetLinkedClientOptions](<#GetLinkedClientOptions>)
 - [type GiftCardEnabled](<#GiftCardEnabled>)
 - [type GiftCardIssuer](<#GiftCardIssuer>)
 - [type GiftCardIssuerStatus](<#GiftCardIssuerStatus>)
@@ -150,7 +152,10 @@ REST also implies a nice and clean structure for URLs or endpoints. This means y
   - [func \(is \*InvoicesService\) Get\(ctx context.Context, id string\) \(res \*Response, i \*Invoice, err error\)](<#InvoicesService.Get>)
   - [func \(is \*InvoicesService\) List\(ctx context.Context, options \*InvoicesListOptions\) \(res \*Response, il \*InvoicesList, err error\)](<#InvoicesService.List>)
 - [type LineItem](<#LineItem>)
-- [type ListPartnerClientsOptions](<#ListPartnerClientsOptions>)
+- [type LinkedClient](<#LinkedClient>)
+- [type LinkedClientLinks](<#LinkedClientLinks>)
+- [type LinkedClientList](<#LinkedClientList>)
+- [type ListLinkedClientsOptions](<#ListLinkedClientsOptions>)
 - [type ListPaymentOptions](<#ListPaymentOptions>)
 - [type ListRefundOptions](<#ListRefundOptions>)
 - [type Locale](<#Locale>)
@@ -218,12 +223,6 @@ REST also implies a nice and clean structure for URLs or endpoints. This means y
   - [func \(os \*OrganizationsService\) GetPartnerStatus\(ctx context.Context\) \(res \*Response, ops \*OrganizationPartnerStatus, err error\)](<#OrganizationsService.GetPartnerStatus>)
 - [type Owner](<#Owner>)
 - [type PaginationLinks](<#PaginationLinks>)
-- [type PartnerClient](<#PartnerClient>)
-- [type PartnerClientLinks](<#PartnerClientLinks>)
-- [type PartnerClientList](<#PartnerClientList>)
-- [type PartnerService](<#PartnerService>)
-  - [func \(ps \*PartnerService\) Get\(ctx context.Context, id string, opts \*GetPartnerClientOptions\) \(res \*Response, pc \*PartnerClient, err error\)](<#PartnerService.Get>)
-  - [func \(ps \*PartnerService\) List\(ctx context.Context, opts \*ListPartnerClientsOptions\) \(res \*Response, pc \*PartnerClientList, err error\)](<#PartnerService.List>)
 - [type PartnerType](<#PartnerType>)
 - [type Payment](<#Payment>)
 - [type PaymentDestination](<#PaymentDestination>)
@@ -1393,7 +1392,7 @@ type Client struct {
     Permissions    *PermissionsService
     Onboarding     *OnboardingService
     PaymentLinks   *PaymentLinksService
-    Partners       *PartnerService
+    Clients        *ClientsService
     Balances       *BalancesService
     ClientLinks    *ClientLinksService
     Terminals      *TerminalsService
@@ -1533,18 +1532,37 @@ func (cls *ClientLinksService) GetFinalClientLink(ctx context.Context, clientLin
 
 GetFinalClientLink returns the final client link URI with the provided options.
 
-<a name="Commission"></a>
-## type [Commission](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L38-L41>)
+<a name="ClientsService"></a>
+## type [ClientsService](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L48>)
 
-Commission describes a partner take from any operation on Mollie's API.
+ClientsService operates over the partners API.
 
 ```go
-type Commission struct {
-    Count       int     `json:"count,omitempty"`
-    TotalAmount *Amount `json:"totalAmount,omitempty"`
-}
+type ClientsService service
+```
+
+<a name="ClientsService.Get"></a>
+### func \(\*ClientsService\) [Get](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L73-L77>)
+
+```go
+func (ps *ClientsService) Get(ctx context.Context, id string, opts *GetLinkedClientOptions) (res *Response, pc *LinkedClient, err error)
 ```
 
+Get retrieves a single client, linked to your partner account, by its ID.
+
+See: https://docs.mollie.com/reference/v2/partners-api/get-client
+
+<a name="ClientsService.List"></a>
+### func \(\*ClientsService\) [List](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L53-L57>)
+
+```go
+func (ps *ClientsService) List(ctx context.Context, opts *ListLinkedClientsOptions) (res *Response, pc *LinkedClientList, err error)
+```
+
+List retrieves all clients.
+
+See: https://docs.mollie.com/reference/v2/partners-api/list-clients
+
 <a name="Company"></a>
 ## type [Company](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L52-L56>)
 
@@ -2211,11 +2229,13 @@ type EmbedValue string
 
 ```go
 const (
-    EmbedPayments    EmbedValue = "payments"
-    EmbedRefunds     EmbedValue = "refunds"
-    EmbedShipments   EmbedValue = "shipments"
-    EmbedChargebacks EmbedValue = "chargebacks"
-    EmbedCaptures    EmbedValue = "captures"
+    EmbedPayments     EmbedValue = "payments"
+    EmbedRefunds      EmbedValue = "refunds"
+    EmbedShipments    EmbedValue = "shipments"
+    EmbedChargebacks  EmbedValue = "chargebacks"
+    EmbedCaptures     EmbedValue = "captures"
+    EmbedOrganization EmbedValue = "organization"
+    EmbedOnboarding   EmbedValue = "onboarding"
 )
 ```
 
@@ -2313,14 +2333,14 @@ const (
 )
 ```
 
-<a name="GetPartnerClientOptions"></a>
-## type [GetPartnerClientOptions](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L44-L46>)
+<a name="GetLinkedClientOptions"></a>
+## type [GetLinkedClientOptions](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L27-L29>)
 
-GetPartnerClientOptions contains valid query parameters for the get clients endpoint.
+GetLinkedClientOptions contains valid query parameters for the get clients endpoint.
 
 ```go
-type GetPartnerClientOptions struct {
-    Embed string `url:"embed,omitempty"`
+type GetLinkedClientOptions struct {
+    Embed []EmbedValue `url:"embed,omitempty"`
 }
 ```
 
@@ -2420,7 +2440,7 @@ type GiftCardLinks struct {
 ```
 
 <a name="Image"></a>
-## type [Image](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L352-L356>)
+## type [Image](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L354-L358>)
 
 Image describes a generic image resource retrieved by Mollie.
 
@@ -2576,17 +2596,59 @@ type LineItem struct {
 }
 ```
 
-<a name="ListPartnerClientsOptions"></a>
-## type [ListPartnerClientsOptions](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L49-L54>)
+<a name="LinkedClient"></a>
+## type [LinkedClient](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L11-L16>)
+
+LinkedClient describes a single client, linked to your partner account.
+
+```go
+type LinkedClient struct {
+    Resource              string            `json:"resource,omitempty"`
+    ID                    string            `json:"id,omitempty"`
+    OrganizationCreatedAt *time.Time        `json:"organizationCreatedAt,omitempty"`
+    Links                 LinkedClientLinks `json:"_links,omitempty"`
+}
+```
+
+<a name="LinkedClientLinks"></a>
+## type [LinkedClientLinks](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L19-L24>)
 
-ListPartnerClientsOptions contains valid query parameters for the list clients endpoint.
+LinkedClientLinks contains URL objects relevant to the client.
 
 ```go
-type ListPartnerClientsOptions struct {
-    From  int `url:"from,omitempty"`
-    Limit int `url:"limit,omitempty"`
-    Year  int `url:"year,omitempty"`
-    Month int `url:"month,omitempty"`
+type LinkedClientLinks struct {
+    Self          *URL `json:"self,omitempty"`
+    Organization  *URL `json:"organization,omitempty"`
+    Onboarding    *URL `json:"onboarding,omitempty"`
+    Documentation *URL `json:"documentation,omitempty"`
+}
+```
+
+<a name="LinkedClientList"></a>
+## type [LinkedClientList](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L32-L38>)
+
+LinkedClientList describes a list of partner clients.
+
+```go
+type LinkedClientList struct {
+    Count          int `json:"count,omitempty"`
+    PartnerClients struct {
+        Clients []*LinkedClient `json:"clients,omitempty"`
+    }   `json:"_embedded,omitempty"`
+    Links PaginationLinks `json:"_links,omitempty"`
+}
+```
+
+<a name="ListLinkedClientsOptions"></a>
+## type [ListLinkedClientsOptions](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/clients.go#L41-L45>)
+
+ListLinkedClientsOptions contains valid query parameters for the list clients endpoint.
+
+```go
+type ListLinkedClientsOptions struct {
+    Limit int          `url:"limit,omitempty"`
+    From  string       `url:"from,omitempty"`
+    Embed []EmbedValue `url:"embed,omitempty"`
 }
 ```
 
@@ -3595,7 +3657,7 @@ GetPartnerStatus retrieves details about the partner status of the currently aut
 See: https://docs.mollie.com/reference/v2/organizations-api/get-partner
 
 <a name="Owner"></a>
-## type [Owner](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L359-L364>)
+## type [Owner](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L361-L366>)
 
 Personal data of your customer.
 
@@ -3622,81 +3684,6 @@ type PaginationLinks struct {
 }
 ```
 
-<a name="PartnerClient"></a>
-## type [PartnerClient](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L11-L17>)
-
-PartnerClient describes a partner client.
-
-```go
-type PartnerClient struct {
-    Resource              string             `json:"resource,omitempty"`
-    ID                    string             `json:"id,omitempty"`
-    OrganizationCreatedAt *time.Time         `json:"organizationCreatedAt,omitempty"`
-    Commission            Commission         `json:"commission,omitempty"`
-    Links                 PartnerClientLinks `json:"_links,omitempty"`
-}
-```
-
-<a name="PartnerClientLinks"></a>
-## type [PartnerClientLinks](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L29-L34>)
-
-PartnerClientLinks contains URL objects relevant to the client.
-
-```go
-type PartnerClientLinks struct {
-    Self          *URL `json:"self,omitempty"`
-    Organization  *URL `json:"organization,omitempty"`
-    Onboarding    *URL `json:"onboarding,omitempty"`
-    Documentation *URL `json:"documentation,omitempty"`
-}
-```
-
-<a name="PartnerClientList"></a>
-## type [PartnerClientList](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L20-L26>)
-
-PartnerClientList describes a list of partner clients.
-
-```go
-type PartnerClientList struct {
-    Count          int `json:"count,omitempty"`
-    PartnerClients struct {
-        Clients []*PartnerClient `json:"clients,omitempty"`
-    }   `json:"_embedded,omitempty"`
-    Links PaginationLinks `json:"_links,omitempty"`
-}
-```
-
-<a name="PartnerService"></a>
-## type [PartnerService](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L57>)
-
-PartnerService operates over the partners API.
-
-```go
-type PartnerService service
-```
-
-<a name="PartnerService.Get"></a>
-### func \(\*PartnerService\) [Get](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L82-L86>)
-
-```go
-func (ps *PartnerService) Get(ctx context.Context, id string, opts *GetPartnerClientOptions) (res *Response, pc *PartnerClient, err error)
-```
-
-Get retrieves a single client, linked to your partner account, by its ID.
-
-See: https://docs.mollie.com/reference/v2/partners-api/get-client
-
-<a name="PartnerService.List"></a>
-### func \(\*PartnerService\) [List](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/partners.go#L62-L66>)
-
-```go
-func (ps *PartnerService) List(ctx context.Context, opts *ListPartnerClientsOptions) (res *Response, pc *PartnerClientList, err error)
-```
-
-List retrieves all clients.
-
-See: https://docs.mollie.com/reference/v2/partners-api/list-clients
-
 <a name="PartnerType"></a>
 ## type [PartnerType](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/organizations.go#L40>)
 
@@ -4668,7 +4655,7 @@ type QRCode struct {
 ```
 
 <a name="Rate"></a>
-## type [Rate](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L346-L349>)
+## type [Rate](<https://github.com/VictorAvelar/mollie-api-go/blob/master/mollie/common_types.go#L348-L351>)
 
 Rate describes service rates, further divided into fixed and percentage costs.
 
diff --git a/mollie/clients.go b/mollie/clients.go
new file mode 100644
index 0000000..1ec59c2
--- /dev/null
+++ b/mollie/clients.go
@@ -0,0 +1,88 @@
+package mollie
+
+import (
+	"context"
+	"encoding/json"
+	"fmt"
+	"time"
+)
+
+// LinkedClient describes a single client, linked to your partner account.
+type LinkedClient struct {
+	Resource              string            `json:"resource,omitempty"`
+	ID                    string            `json:"id,omitempty"`
+	OrganizationCreatedAt *time.Time        `json:"organizationCreatedAt,omitempty"`
+	Links                 LinkedClientLinks `json:"_links,omitempty"`
+}
+
+// LinkedClientLinks contains URL objects relevant to the client.
+type LinkedClientLinks struct {
+	Self          *URL `json:"self,omitempty"`
+	Organization  *URL `json:"organization,omitempty"`
+	Onboarding    *URL `json:"onboarding,omitempty"`
+	Documentation *URL `json:"documentation,omitempty"`
+}
+
+// GetLinkedClientOptions contains valid query parameters for the get clients endpoint.
+type GetLinkedClientOptions struct {
+	Embed []EmbedValue `url:"embed,omitempty"`
+}
+
+// LinkedClientList describes a list of partner clients.
+type LinkedClientList struct {
+	Count          int `json:"count,omitempty"`
+	PartnerClients struct {
+		Clients []*LinkedClient `json:"clients,omitempty"`
+	} `json:"_embedded,omitempty"`
+	Links PaginationLinks `json:"_links,omitempty"`
+}
+
+// ListLinkedClientsOptions contains valid query parameters for the list clients endpoint.
+type ListLinkedClientsOptions struct {
+	Limit int          `url:"limit,omitempty"`
+	From  string       `url:"from,omitempty"`
+	Embed []EmbedValue `url:"embed,omitempty"`
+}
+
+// ClientsService operates over the partners API.
+type ClientsService service
+
+// List retrieves all clients.
+//
+// See: https://docs.mollie.com/reference/v2/partners-api/list-clients
+func (ps *ClientsService) List(ctx context.Context, opts *ListLinkedClientsOptions) (
+	res *Response,
+	pc *LinkedClientList,
+	err error,
+) {
+	res, err = ps.client.get(ctx, "v2/clients", opts)
+	if err != nil {
+		return
+	}
+
+	if err = json.Unmarshal(res.content, &pc); err != nil {
+		return
+	}
+
+	return
+}
+
+// Get retrieves a single client, linked to your partner account, by its ID.
+//
+// See: https://docs.mollie.com/reference/v2/partners-api/get-client
+func (ps *ClientsService) Get(ctx context.Context, id string, opts *GetLinkedClientOptions) (
+	res *Response,
+	pc *LinkedClient,
+	err error,
+) {
+	res, err = ps.client.get(ctx, fmt.Sprintf("v2/clients/%s", id), opts)
+	if err != nil {
+		return
+	}
+
+	if err = json.Unmarshal(res.content, &pc); err != nil {
+		return
+	}
+
+	return
+}
diff --git a/mollie/common_types.go b/mollie/common_types.go
index 5dd26c9..b40d7bd 100644
--- a/mollie/common_types.go
+++ b/mollie/common_types.go
@@ -335,11 +335,13 @@ type EmbedValue string
 
 // Valid Embed query string value.
 const (
-	EmbedPayments    EmbedValue = "payments"
-	EmbedRefunds     EmbedValue = "refunds"
-	EmbedShipments   EmbedValue = "shipments"
-	EmbedChargebacks EmbedValue = "chargebacks"
-	EmbedCaptures    EmbedValue = "captures"
+	EmbedPayments     EmbedValue = "payments"
+	EmbedRefunds      EmbedValue = "refunds"
+	EmbedShipments    EmbedValue = "shipments"
+	EmbedChargebacks  EmbedValue = "chargebacks"
+	EmbedCaptures     EmbedValue = "captures"
+	EmbedOrganization EmbedValue = "organization"
+	EmbedOnboarding   EmbedValue = "onboarding"
 )
 
 // Rate describes service rates, further divided into fixed and percentage costs.
diff --git a/mollie/mollie.go b/mollie/mollie.go
index f3b2f44..b19e52c 100644
--- a/mollie/mollie.go
+++ b/mollie/mollie.go
@@ -68,7 +68,7 @@ type Client struct {
 	Permissions    *PermissionsService
 	Onboarding     *OnboardingService
 	PaymentLinks   *PaymentLinksService
-	Partners       *PartnerService
+	Clients        *ClientsService
 	Balances       *BalancesService
 	ClientLinks    *ClientLinksService
 	Terminals      *TerminalsService
@@ -304,7 +304,7 @@ func NewClient(baseClient *http.Client, conf *Config) (mollie *Client, err error
 	mollie.Permissions = (*PermissionsService)(&mollie.common)
 	mollie.Onboarding = (*OnboardingService)(&mollie.common)
 	mollie.PaymentLinks = (*PaymentLinksService)(&mollie.common)
-	mollie.Partners = (*PartnerService)(&mollie.common)
+	mollie.Clients = (*ClientsService)(&mollie.common)
 	mollie.Balances = (*BalancesService)(&mollie.common)
 	mollie.ClientLinks = (*ClientLinksService)(&mollie.common)
 	mollie.Terminals = (*TerminalsService)(&mollie.common)
diff --git a/mollie/partners.go b/mollie/partners.go
deleted file mode 100644
index 3f3ca67..0000000
--- a/mollie/partners.go
+++ /dev/null
@@ -1,97 +0,0 @@
-package mollie
-
-import (
-	"context"
-	"encoding/json"
-	"fmt"
-	"time"
-)
-
-// PartnerClient describes a partner client.
-type PartnerClient struct {
-	Resource              string             `json:"resource,omitempty"`
-	ID                    string             `json:"id,omitempty"`
-	OrganizationCreatedAt *time.Time         `json:"organizationCreatedAt,omitempty"`
-	Commission            Commission         `json:"commission,omitempty"`
-	Links                 PartnerClientLinks `json:"_links,omitempty"`
-}
-
-// PartnerClientList describes a list of partner clients.
-type PartnerClientList struct {
-	Count          int `json:"count,omitempty"`
-	PartnerClients struct {
-		Clients []*PartnerClient `json:"clients,omitempty"`
-	} `json:"_embedded,omitempty"`
-	Links PaginationLinks `json:"_links,omitempty"`
-}
-
-// PartnerClientLinks contains URL objects relevant to the client.
-type PartnerClientLinks struct {
-	Self          *URL `json:"self,omitempty"`
-	Organization  *URL `json:"organization,omitempty"`
-	Onboarding    *URL `json:"onboarding,omitempty"`
-	Documentation *URL `json:"documentation,omitempty"`
-}
-
-// Commission describes a partner take from any
-// operation on Mollie's API.
-type Commission struct {
-	Count       int     `json:"count,omitempty"`
-	TotalAmount *Amount `json:"totalAmount,omitempty"`
-}
-
-// GetPartnerClientOptions contains valid query parameters for the get clients endpoint.
-type GetPartnerClientOptions struct {
-	Embed string `url:"embed,omitempty"`
-}
-
-// ListPartnerClientsOptions contains valid query parameters for the list clients endpoint.
-type ListPartnerClientsOptions struct {
-	From  int `url:"from,omitempty"`
-	Limit int `url:"limit,omitempty"`
-	Year  int `url:"year,omitempty"`
-	Month int `url:"month,omitempty"`
-}
-
-// PartnerService operates over the partners API.
-type PartnerService service
-
-// List retrieves all clients.
-//
-// See: https://docs.mollie.com/reference/v2/partners-api/list-clients
-func (ps *PartnerService) List(ctx context.Context, opts *ListPartnerClientsOptions) (
-	res *Response,
-	pc *PartnerClientList,
-	err error,
-) {
-	res, err = ps.client.get(ctx, "v2/clients", opts)
-	if err != nil {
-		return
-	}
-
-	if err = json.Unmarshal(res.content, &pc); err != nil {
-		return
-	}
-
-	return
-}
-
-// Get retrieves a single client, linked to your partner account, by its ID.
-//
-// See: https://docs.mollie.com/reference/v2/partners-api/get-client
-func (ps *PartnerService) Get(ctx context.Context, id string, opts *GetPartnerClientOptions) (
-	res *Response,
-	pc *PartnerClient,
-	err error,
-) {
-	res, err = ps.client.get(ctx, fmt.Sprintf("v2/clients/%s", id), opts)
-	if err != nil {
-		return
-	}
-
-	if err = json.Unmarshal(res.content, &pc); err != nil {
-		return
-	}
-
-	return
-}


Test patch:
diff --git a/mollie/partners_test.go b/mollie/clients_test.go
similarity index 89%
rename from mollie/partners_test.go
rename to mollie/clients_test.go
index 1f7b224..9736afb 100644
--- a/mollie/partners_test.go
+++ b/mollie/clients_test.go
@@ -10,14 +10,14 @@ import (
 	"github.com/stretchr/testify/assert"
 )
 
-func TestPartnerService_Get(t *testing.T) {
+func TestClientsService_Get(t *testing.T) {
 	setEnv()
 	defer unsetEnv()
 
 	type args struct {
 		ctx    context.Context
 		client string
-		opts   *GetPartnerClientOptions
+		opts   *GetLinkedClientOptions
 	}
 
 	cases := []struct {
@@ -53,8 +53,8 @@ func TestPartnerService_Get(t *testing.T) {
 			args{
 				context.Background(),
 				"org_1337",
-				&GetPartnerClientOptions{
-					Embed: "organization",
+				&GetLinkedClientOptions{
+					Embed: []EmbedValue{EmbedOrganization},
 				},
 			},
 			false,
@@ -117,27 +117,27 @@ func TestPartnerService_Get(t *testing.T) {
 			c.pre()
 			tMux.HandleFunc(fmt.Sprintf("/v2/clients/%s", c.args.client), c.handler)
 
-			res, m, err := tClient.Partners.Get(c.args.ctx, c.args.client, c.args.opts)
+			res, m, err := tClient.Clients.Get(c.args.ctx, c.args.client, c.args.opts)
 			if c.wantErr {
 				assert.NotNil(t, err)
 				assert.EqualError(t, err, c.err.Error())
 			} else {
 				assert.Nil(t, err)
-				assert.IsType(t, &PartnerClient{}, m)
+				assert.IsType(t, &LinkedClient{}, m)
 				assert.IsType(t, &http.Response{}, res.Response)
 			}
 		})
 	}
 }
 
-func TestPartnerService_List(t *testing.T) {
+func TestClientService_List(t *testing.T) {
 	setEnv()
 	defer unsetEnv()
 
 	type args struct {
 		ctx    context.Context
 		client string
-		opts   *ListPartnerClientsOptions
+		opts   *ListLinkedClientsOptions
 	}
 
 	cases := []struct {
@@ -173,8 +173,8 @@ func TestPartnerService_List(t *testing.T) {
 			args{
 				context.Background(),
 				"org_1337",
-				&ListPartnerClientsOptions{
-					Year: 2021,
+				&ListLinkedClientsOptions{
+					Embed: []EmbedValue{EmbedOrganization},
 				},
 			},
 			false,
@@ -183,7 +183,7 @@ func TestPartnerService_List(t *testing.T) {
 			func(w http.ResponseWriter, r *http.Request) {
 				testHeader(t, r, AuthHeader, "Bearer token_X12b31ggg23")
 				testMethod(t, r, "GET")
-				testQuery(t, r, "year=2021")
+				testQuery(t, r, "embed=organization")
 
 				if _, ok := r.Header[AuthHeader]; !ok {
 					w.WriteHeader(http.StatusUnauthorized)
@@ -237,13 +237,13 @@ func TestPartnerService_List(t *testing.T) {
 			c.pre()
 			tMux.HandleFunc("/v2/clients", c.handler)
 
-			res, m, err := tClient.Partners.List(c.args.ctx, c.args.opts)
+			res, m, err := tClient.Clients.List(c.args.ctx, c.args.opts)
 			if c.wantErr {
 				assert.NotNil(t, err)
 				assert.EqualError(t, err, c.err.Error())
 			} else {
 				assert.Nil(t, err)
-				assert.IsType(t, &PartnerClientList{}, m)
+				assert.IsType(t, &LinkedClientList{}, m)
 				assert.IsType(t, &http.Response{}, res.Response)
 			}
 		})