diff --git a/api_keys.go b/api_keys.go index 862b83d..8951cc5 100755 --- a/api_keys.go +++ b/api_keys.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/authorization.go b/authorization.go index 7a298b3..741a234 100755 --- a/authorization.go +++ b/authorization.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/checkouts.go b/checkouts.go index 9904202..2adda44 100755 --- a/checkouts.go +++ b/checkouts.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/client.go b/client.go index 8017b9d..e0bb7fb 100755 --- a/client.go +++ b/client.go @@ -1,3 +1,18 @@ +// Package sumup provides a client for using the SumUp API. +// Usage: +// +// import "github.com/sumup/sumup-go" +// +// Construct a new SumUp client, then use the various services on the client to +// access different parts of the SumUp API. For example: +// +// client := sumup.NewClient().WithAuth(os.Getenv("SUMUP_KEY")) +// +// // get the account the client is currently authorized for +// account, err := client.Merchant.Get(context.Background(), sumup.GetAccountParams{}) +// +// The client is structured around individual services that correspond to the tags +// in SumUp documentation https://developer.sumup.com/docs/api/sum-up-rest-api/. package sumup import ( @@ -23,6 +38,7 @@ type service struct { client *Client } +// Client manages communication with the SumUp APIs. type Client struct { // service is the shared service struct re-used for all services. svc service @@ -48,7 +64,7 @@ type Client struct { Transactions *TransactionsService } -// NewClient creates new SumUp API client. +// NewClient creates new SumUp API [Client]. // To use APIs that require authentication use [Client.WithAuth]. func NewClient() *Client { c := &Client{ @@ -60,7 +76,7 @@ func NewClient() *Client { return c } -// WithAuth returns a copy of the client configured with the provided Authorization key. +// WithAuth returns a copy of the [Client] configured with the provided Authorization key. func (c *Client) WithAuth(key string) *Client { clone := Client{ client: c.client, @@ -72,7 +88,7 @@ func (c *Client) WithAuth(key string) *Client { return &clone } -// WithClient returns a copy of the client configured with the provided http client. +// WithClient returns a copy of the [Client] configured with the provided http client. func (c *Client) WithHTTPClient(client *http.Client) *Client { clone := Client{ client: client, diff --git a/customers.go b/customers.go index 90b8038..52f1799 100755 --- a/customers.go +++ b/customers.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/doc.go b/doc.go deleted file mode 100644 index b493dd5..0000000 --- a/doc.go +++ /dev/null @@ -1,18 +0,0 @@ -// Package sumup provides a client for using the SumUp API. -/* -Usage: - - import "github.com/sumup/sumup-go" - -Construct a new SumUp client, then use the various services on the client to -access different parts of the SumUp API. For example: - - client := sumup.NewClient().WithAuth(os.Getenv("SUMUP_KEY")) - - // get the account the client is currently authorized for - account, err := client.Merchant.Get(context.Background(), sumup.GetAccountParams{}) - -The client is structured around individual services that correspond to the tags -in SumUp documentation https://developer.sumup.com/docs/api/sum-up-rest-api/. -*/ -package sumup diff --git a/merchant.go b/merchant.go index 1ff5d01..c2c542b 100755 --- a/merchant.go +++ b/merchant.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/models.go b/models.go index 2707200..43f65c9 100755 --- a/models.go +++ b/models.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/payouts.go b/payouts.go index da115d2..5bb1260 100755 --- a/payouts.go +++ b/payouts.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/receipts.go b/receipts.go index eac1df9..4d599b8 100755 --- a/receipts.go +++ b/receipts.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/subaccounts.go b/subaccounts.go index 3116a47..76264da 100755 --- a/subaccounts.go +++ b/subaccounts.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import ( diff --git a/transactions.go b/transactions.go index a116d6d..96bd22f 100755 --- a/transactions.go +++ b/transactions.go @@ -1,4 +1,5 @@ // Code generated by `gocodegen`. DO NOT EDIT. + package sumup import (