diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md
index f5d3360..5a57aa9 100644
--- a/DOCUMENTATION.md
+++ b/DOCUMENTATION.md
@@ -199,6 +199,7 @@ import "github.com/sumup/sumup-go"
- [type Person](<#Person>)
- [type PersonalDetails](<#PersonalDetails>)
- [type PersonalIdentifier](<#PersonalIdentifier>)
+- [type PersonalIdentifiers](<#PersonalIdentifiers>)
- [type PhoneNumber](<#PhoneNumber>)
- [type Problem](<#Problem>)
- [func \(e \*Problem\) Error\(\) string](<#Problem.Error>)
@@ -533,7 +534,7 @@ type BasePerson struct {
ID string `json:"id"`
// A list of country-specific personal identifiers.
// Max items: 5
- Identifiers []PersonalIdentifier `json:"identifiers,omitempty"`
+ Identifiers PersonalIdentifiers `json:"identifiers,omitempty"`
// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can
// be present, with the names being separated by space characters. Also note that in some cultures, middle names
// are not used.
@@ -590,7 +591,7 @@ type Branding struct {
```
-## type [BusinessProfile]()
+## type [BusinessProfile]()
Business information about the merchant. This information will be visible to the merchant's customers.
@@ -622,7 +623,6 @@ type BusinessProfile struct {
// Max length: 16
PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
// The business's publicly available website.
- // Format: uri
// Max length: 255
Website *string `json:"website,omitempty"`
}
@@ -750,7 +750,7 @@ const (
```
-## type [ChangeStatus]()
+## type [ChangeStatus]()
Reflects the status of changes submitted through the \`PATCH\` endpoints for the merchant or persons. If some changes have not been applied yet, the status will be \`pending\`. If all changes have been applied, the status \`done\`. The status is only returned after write operations or on read endpoints when the \`version\` query parameter is provided.
@@ -1427,7 +1427,7 @@ func (r *CheckoutsProcessResponse) AsCheckoutSuccess() (*CheckoutSuccess, bool)
-## type [ClassicMerchantIdentifiers]()
+## type [ClassicMerchantIdentifiers]()
ClassicMerchantIdentifiers is a schema definition.
@@ -1503,7 +1503,7 @@ func NewClient(opts ...client.ClientOption) *Client
NewClient creates new SumUp API client. The client is by default configured environment variables \(\`SUMUP\_API\_KEY\`\). To override the default configuration use \[ClientOption\]s.
-## type [Company]()
+## type [Company]()
Information about the company or business. This is legal information that is used for verification.
@@ -1548,14 +1548,13 @@ type Company struct {
// Address documentation: https://developer.sumup.com/tools/glossary/merchant#addresses
TradingAddress *Address `json:"trading_address,omitempty"`
// HTTP(S) URL of the company's website.
- // Format: uri
// Max length: 255
- Website *nullable.Field[string] `json:"website,omitempty"`
+ Website *string `json:"website,omitempty"`
}
```
-## type [CompanyIdentifier]()
+## type [CompanyIdentifier]()
CompanyIdentifier is a schema definition. Company identifier documentation: https://developer.sumup.com/tools/glossary/merchant#company-identifiers
@@ -1570,7 +1569,7 @@ type CompanyIdentifier struct {
```
-## type [CompanyIdentifiers]()
+## type [CompanyIdentifiers]()
A list of country\-specific company identifiers.
@@ -1579,7 +1578,7 @@ type CompanyIdentifiers []CompanyIdentifier
```
-## type [CountryCode]()
+## type [CountryCode]()
An \[ISO3166\-1 alpha\-2\]\(https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\) country code. This definition users \`oneOf\` with a two\-character string type to allow for support of future countries in client code.
@@ -2474,7 +2473,7 @@ type Lat float32
```
-## type [LegalType]()
+## type [LegalType]()
The unique legal type reference as defined in the country SDK. We do not rely on IDs as used by other services. Consumers of this API are expected to use the country SDK to map to any other IDs, translation keys, or descriptions.
@@ -2506,7 +2505,7 @@ type Link struct {
```
-## type [ListPersonsResponseBody]()
+## type [ListPersonsResponseBody]()
ListPersonsResponseBody is a schema definition.
@@ -2795,7 +2794,7 @@ Allows you to update user data of managed users.
```go
type MembersUpdateParamsUser struct {
- // User's preferred name. Used for display purposes only.
+ // User's nickname. Used for display purposes only.
Nickname *string `json:"nickname,omitempty"`
// Password of the member to add. Only used if `is_managed_user` is true.
// Format: password
@@ -2914,7 +2913,7 @@ type MembershipUser struct {
ID string `json:"id"`
// True if the user has enabled MFA on login.
MfaOnLoginEnabled bool `json:"mfa_on_login_enabled"`
- // User's preferred name. Used for display purposes only.
+ // User's nickname. Used for display purposes only.
Nickname *string `json:"nickname,omitempty"`
// URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF
// image file), rather than to a Web page containing an image.
@@ -3026,7 +3025,7 @@ type MembershipsListResponse struct {
```
-## type [Merchant]()
+## type [Merchant]()
Merchant is a schema definition. Merchant documentation: https://developer.sumup.com/tools/glossary/merchant
@@ -3107,7 +3106,7 @@ type Merchant struct {
```
-## type [MerchantsClient]()
+## type [MerchantsClient]()
MerchantsClient provides access to the Merchants API.
@@ -3120,7 +3119,7 @@ type MerchantsClient struct {
```
-### func [NewMerchantsClient]()
+### func [NewMerchantsClient]()
```go
func NewMerchantsClient(c *client.Client) *MerchantsClient
@@ -3129,7 +3128,7 @@ func NewMerchantsClient(c *client.Client) *MerchantsClient
-### func \(\*MerchantsClient\) [Get]()
+### func \(\*MerchantsClient\) [Get]()
```go
func (c *MerchantsClient) Get(ctx context.Context, merchantCode string, params MerchantsGetParams) (*Merchant, error)
@@ -3138,7 +3137,7 @@ func (c *MerchantsClient) Get(ctx context.Context, merchantCode string, params M
Retrieve a merchant. Merchant documentation: https://developer.sumup.com/tools/models/merchant
-### func \(\*MerchantsClient\) [GetPerson]()
+### func \(\*MerchantsClient\) [GetPerson]()
```go
func (c *MerchantsClient) GetPerson(ctx context.Context, merchantCode string, personID string, params MerchantsGetPersonParams) (*Person, error)
@@ -3147,7 +3146,7 @@ func (c *MerchantsClient) GetPerson(ctx context.Context, merchantCode string, pe
Returns a single person related to the merchant. Persons documentation: https://developer.sumup.com/tools/models/merchant#persons
-### func \(\*MerchantsClient\) [ListPersons]()
+### func \(\*MerchantsClient\) [ListPersons]()
```go
func (c *MerchantsClient) ListPersons(ctx context.Context, merchantCode string, params MerchantsListPersonsParams) (*ListPersonsResponseBody, error)
@@ -3156,7 +3155,7 @@ func (c *MerchantsClient) ListPersons(ctx context.Context, merchantCode string,
Returns a list of persons related to the merchant. Persons documentation: https://developer.sumup.com/tools/models/merchant#persons
-## type [MerchantsGetParams]()
+## type [MerchantsGetParams]()
MerchantsGetParams are query parameters for GetMerchant.
@@ -3171,7 +3170,7 @@ type MerchantsGetParams struct {
```
-### func \(\*MerchantsGetParams\) [QueryValues]()
+### func \(\*MerchantsGetParams\) [QueryValues]()
```go
func (p *MerchantsGetParams) QueryValues() url.Values
@@ -3180,7 +3179,7 @@ func (p *MerchantsGetParams) QueryValues() url.Values
QueryValues converts [MerchantsGetParams](<#MerchantsGetParams>) into \[url.Values\].
-## type [MerchantsGetPersonParams]()
+## type [MerchantsGetPersonParams]()
MerchantsGetPersonParams are query parameters for GetPerson.
@@ -3195,7 +3194,7 @@ type MerchantsGetPersonParams struct {
```
-### func \(\*MerchantsGetPersonParams\) [QueryValues]()
+### func \(\*MerchantsGetPersonParams\) [QueryValues]()
```go
func (p *MerchantsGetPersonParams) QueryValues() url.Values
@@ -3204,7 +3203,7 @@ func (p *MerchantsGetPersonParams) QueryValues() url.Values
QueryValues converts [MerchantsGetPersonParams](<#MerchantsGetPersonParams>) into \[url.Values\].
-## type [MerchantsListPersonsParams]()
+## type [MerchantsListPersonsParams]()
MerchantsListPersonsParams are query parameters for ListPersons.
@@ -3219,7 +3218,7 @@ type MerchantsListPersonsParams struct {
```
-### func \(\*MerchantsListPersonsParams\) [QueryValues]()
+### func \(\*MerchantsListPersonsParams\) [QueryValues]()
```go
func (p *MerchantsListPersonsParams) QueryValues() url.Values
@@ -3228,7 +3227,7 @@ func (p *MerchantsListPersonsParams) QueryValues() url.Values
QueryValues converts [MerchantsListPersonsParams](<#MerchantsListPersonsParams>) into \[url.Values\].
-## type [Meta]()
+## type [Meta]()
A set of key\-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
@@ -3320,7 +3319,7 @@ const (
```
-## type [Ownership]()
+## type [Ownership]()
Ownership is a schema definition.
@@ -3560,7 +3559,7 @@ type Permissions struct {
```
-## type [Person]()
+## type [Person]()
Person is a schema definition.
@@ -3604,7 +3603,7 @@ type Person struct {
ID string `json:"id"`
// A list of country-specific personal identifiers.
// Max items: 5
- Identifiers []PersonalIdentifier `json:"identifiers,omitempty"`
+ Identifiers PersonalIdentifiers `json:"identifiers,omitempty"`
// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can
// be present, with the names being separated by space characters. Also note that in some cultures, middle names
// are not used.
@@ -3657,7 +3656,7 @@ type PersonalDetails struct {
```
-## type [PersonalIdentifier]()
+## type [PersonalIdentifier]()
PersonalIdentifier is a schema definition.
@@ -3665,14 +3664,25 @@ PersonalIdentifier is a schema definition.
type PersonalIdentifier struct {
// The unique reference for the personal identifier type as defined in the country SDK.
Ref string `json:"ref"`
- // The company identifier value.
+ // The value of the personal identifier.
// Max length: 30
Value string `json:"value"`
}
```
+
+## type [PersonalIdentifiers]()
+
+A list of country\-specific personal identifiers.
+
+Max items: 5
+
+```go
+type PersonalIdentifiers []PersonalIdentifier
+```
+
-## type [PhoneNumber]()
+## type [PhoneNumber]()
A publicly available phone number in \[E.164\]\(https://en.wikipedia.org/wiki/E.164\) format.
@@ -4884,7 +4894,7 @@ type SubaccountsUpdateSubAccountParamsPermissions struct {
```
-## type [Timestamps]()
+## type [Timestamps]()
Timestamps is a schema definition.
@@ -5774,7 +5784,7 @@ const (
```
-## type [Version]()
+## type [Version]()
The version of the resource. The version reflects a specific change submitted to the API via one of the \`PATCH\` endpoints.
diff --git a/members.go b/members.go
index e4a2147..3cfe331 100755
--- a/members.go
+++ b/members.go
@@ -57,7 +57,7 @@ type MembershipUser struct {
ID string `json:"id"`
// True if the user has enabled MFA on login.
MfaOnLoginEnabled bool `json:"mfa_on_login_enabled"`
- // User's preferred name. Used for display purposes only.
+ // User's nickname. Used for display purposes only.
Nickname *string `json:"nickname,omitempty"`
// URL of the End-User's profile picture. This URL refers to an image file (for example, a PNG, JPEG, or GIF
// image file), rather than to a Web page containing an image.
@@ -116,7 +116,7 @@ type MembersUpdateParams struct {
// Allows you to update user data of managed users.
type MembersUpdateParamsUser struct {
- // User's preferred name. Used for display purposes only.
+ // User's nickname. Used for display purposes only.
Nickname *string `json:"nickname,omitempty"`
// Password of the member to add. Only used if `is_managed_user` is true.
// Format: password
diff --git a/merchants.go b/merchants.go
index e7520d0..5ff5cbd 100755
--- a/merchants.go
+++ b/merchants.go
@@ -130,7 +130,7 @@ type BasePerson struct {
ID string `json:"id"`
// A list of country-specific personal identifiers.
// Max items: 5
- Identifiers []PersonalIdentifier `json:"identifiers,omitempty"`
+ Identifiers PersonalIdentifiers `json:"identifiers,omitempty"`
// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can
// be present, with the names being separated by space characters. Also note that in some cultures, middle names
// are not used.
@@ -207,7 +207,6 @@ type BusinessProfile struct {
// Max length: 16
PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
// The business's publicly available website.
- // Format: uri
// Max length: 255
Website *string `json:"website,omitempty"`
}
@@ -270,9 +269,8 @@ type Company struct {
// Address documentation: https://developer.sumup.com/tools/glossary/merchant#addresses
TradingAddress *Address `json:"trading_address,omitempty"`
// HTTP(S) URL of the company's website.
- // Format: uri
// Max length: 255
- Website *nullable.Field[string] `json:"website,omitempty"`
+ Website *string `json:"website,omitempty"`
}
// CompanyIdentifier is a schema definition.
@@ -442,7 +440,7 @@ type Person struct {
ID string `json:"id"`
// A list of country-specific personal identifiers.
// Max items: 5
- Identifiers []PersonalIdentifier `json:"identifiers,omitempty"`
+ Identifiers PersonalIdentifiers `json:"identifiers,omitempty"`
// Middle name(s) of the End-User. Note that in some cultures, people can have multiple middle names; all can
// be present, with the names being separated by space characters. Also note that in some cultures, middle names
// are not used.
@@ -471,11 +469,16 @@ type Person struct {
type PersonalIdentifier struct {
// The unique reference for the personal identifier type as defined in the country SDK.
Ref string `json:"ref"`
- // The company identifier value.
+ // The value of the personal identifier.
// Max length: 30
Value string `json:"value"`
}
+// A list of country-specific personal identifiers.
+//
+// Max items: 5
+type PersonalIdentifiers []PersonalIdentifier
+
// A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
//
// Max length: 16
diff --git a/openapi.json b/openapi.json
index 412977f..955a34f 100755
--- a/openapi.json
+++ b/openapi.json
@@ -3436,7 +3436,7 @@
"type": "object",
"properties": {
"nickname": {
- "description": "User's preferred name. Used for display purposes only.",
+ "description": "User's nickname. Used for display purposes only.",
"type": "string",
"example": "Test User"
},
@@ -8016,7 +8016,7 @@
"format": "date-time"
},
"nickname": {
- "description": "User's preferred name. Used for display purposes only.",
+ "description": "User's nickname. Used for display purposes only.",
"type": "string",
"example": "Test User"
},
@@ -8226,57 +8226,6 @@
},
"title": "Merchant"
},
- "Company": {
- "description": "Information about the company or business. This is legal information that is used for verification.\n",
- "type": "object",
- "properties": {
- "name": {
- "description": "The company's legal name.",
- "type": "string",
- "example": "Gin & Doughnuts Bar GmbH",
- "maxLength": 150,
- "minLength": 1
- },
- "merchant_category_code": {
- "description": "The merchant category code for the account as specified by [ISO18245](https://www.iso.org/standard/33365.html). MCCs are used to classify businesses based on the goods or services they provide.\n",
- "type": "string",
- "example": "1532",
- "pattern": "^[0-9]{4}$"
- },
- "legal_type": {
- "$ref": "#/components/schemas/LegalType"
- },
- "address": {
- "$ref": "#/components/schemas/Address"
- },
- "trading_address": {
- "$ref": "#/components/schemas/Address"
- },
- "identifiers": {
- "$ref": "#/components/schemas/CompanyIdentifiers"
- },
- "phone_number": {
- "$ref": "#/components/schemas/PhoneNumber"
- },
- "website": {
- "description": "HTTP(S) URL of the company's website.\n",
- "type": "string",
- "format": "uri",
- "examples": [
- "https://www.sumup.com"
- ],
- "maxLength": 255,
- "nullable": true
- },
- "attributes": {
- "$ref": "#/components/schemas/Attributes"
- }
- },
- "externalDocs": {
- "description": "Company documentation",
- "url": "https://developer.sumup.com/tools/glossary/merchant#company"
- }
- },
"Meta": {
"description": "A set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.\n\n**Warning**: Updating Meta will overwrite the existing data. Make sure to always include the complete JSON object.",
"type": "object",
@@ -8308,7 +8257,6 @@
"website": {
"description": "The business's publicly available website.",
"type": "string",
- "format": "uri",
"example": "https://example.com",
"maxLength": 255
},
@@ -8668,35 +8616,13 @@
"share"
]
},
- "PersonalIdentifier": {
- "type": "object",
- "properties": {
- "ref": {
- "description": "The unique reference for the personal identifier type as defined in the country SDK.\n",
- "type": "string",
- "examples": [
- "br.cpf"
- ]
- },
- "value": {
- "description": "The company identifier value.\n",
- "type": "string",
- "examples": [
- "847.060.136-90"
- ],
- "maxLength": 30
- }
+ "PersonalIdentifiers": {
+ "description": "A list of country-specific personal identifiers.\n",
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/PersonalIdentifier"
},
- "examples": [
- {
- "ref": "br.cpf",
- "value": "847.060.136-90"
- }
- ],
- "required": [
- "ref",
- "value"
- ]
+ "maxItems": 5
},
"Version": {
"description": "The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.\n",
@@ -8778,12 +8704,7 @@
"$ref": "#/components/schemas/Address"
},
"identifiers": {
- "description": "A list of country-specific personal identifiers.\n",
- "type": "array",
- "items": {
- "$ref": "#/components/schemas/PersonalIdentifier"
- },
- "maxItems": 5
+ "$ref": "#/components/schemas/PersonalIdentifiers"
},
"citizenship": {
"$ref": "#/components/schemas/CountryCode"
@@ -8815,6 +8736,85 @@
"id"
]
},
+ "PersonalIdentifier": {
+ "type": "object",
+ "properties": {
+ "ref": {
+ "description": "The unique reference for the personal identifier type as defined in the country SDK.\n",
+ "type": "string",
+ "examples": [
+ "br.cpf"
+ ]
+ },
+ "value": {
+ "description": "The value of the personal identifier.\n",
+ "type": "string",
+ "examples": [
+ "847.060.136-90"
+ ],
+ "maxLength": 30
+ }
+ },
+ "examples": [
+ {
+ "ref": "br.cpf",
+ "value": "847.060.136-90"
+ }
+ ],
+ "required": [
+ "ref",
+ "value"
+ ]
+ },
+ "Company": {
+ "description": "Information about the company or business. This is legal information that is used for verification.\n",
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The company's legal name.",
+ "type": "string",
+ "example": "Gin & Doughnuts Bar GmbH",
+ "maxLength": 150,
+ "minLength": 1
+ },
+ "merchant_category_code": {
+ "description": "The merchant category code for the account as specified by [ISO18245](https://www.iso.org/standard/33365.html). MCCs are used to classify businesses based on the goods or services they provide.\n",
+ "type": "string",
+ "example": "1532",
+ "pattern": "^[0-9]{4}$"
+ },
+ "legal_type": {
+ "$ref": "#/components/schemas/LegalType"
+ },
+ "address": {
+ "$ref": "#/components/schemas/Address"
+ },
+ "trading_address": {
+ "$ref": "#/components/schemas/Address"
+ },
+ "identifiers": {
+ "$ref": "#/components/schemas/CompanyIdentifiers"
+ },
+ "phone_number": {
+ "$ref": "#/components/schemas/PhoneNumber"
+ },
+ "website": {
+ "description": "HTTP(S) URL of the company's website.\n",
+ "type": "string",
+ "examples": [
+ "https://www.sumup.com"
+ ],
+ "maxLength": 255
+ },
+ "attributes": {
+ "$ref": "#/components/schemas/Attributes"
+ }
+ },
+ "externalDocs": {
+ "description": "Company documentation",
+ "url": "https://developer.sumup.com/tools/glossary/merchant#company"
+ }
+ },
"ClassicMerchantIdentifiers": {
"type": "object",
"properties": {