merchants

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	// In Spain, an autonomous community is the first sub-national level of political and administrative division.
	// Max length: 512
	AutonomousCommunity *string `json:"autonomous_community,omitempty"`
	// The city of the address.
	// Max length: 512
	City *string `json:"city,omitempty"`
	// In many countries, terms cognate with "commune" are used, referring to the community living in the area and
	// the common interest. Used in countries such as Chile.
	// Max length: 512
	Commune *string `json:"commune,omitempty"`
	// 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.
	// Min length: 2
	// Max length: 2
	Country CountryCode `json:"country"`
	// A county is a geographic region of a country used for administrative or other purposes in some nations. Used
	// in countries such as Ireland, Romania, etc.
	// Max length: 512
	County *string `json:"county,omitempty"`
	// A department (French: département, Spanish: departamento) is an administrative or political division in
	// several countries. Used in countries such as Colombia.
	// Max length: 512
	Department *string `json:"department,omitempty"`
	// A district is a type of administrative division that in some countries is managed by the local government. Used
	// in countries such as Portugal.
	// Max length: 512
	District *string `json:"district,omitempty"`
	// A postal address in Ireland.
	// Max length: 512
	Eircode *string `json:"eircode,omitempty"`
	// A municipality is usually a single administrative division having corporate status and powers of self-government or
	// jurisdiction as granted by national and regional laws to which it is subordinate. Used in countries such as
	// Colombia.
	// Max length: 512
	Municipality *string `json:"municipality,omitempty"`
	// Locality level of the address. Used in countries such as Brazil or Chile.
	// Max length: 512
	Neighborhood *string `json:"neighborhood,omitempty"`
	// The postal code (aka. zip code) of the address.
	// Max length: 32
	PostCode *string `json:"post_code,omitempty"`
	// A post town is a required part of all postal addresses in the United Kingdom and Ireland, and a basic unit
	// of the postal delivery system.
	// Max length: 512
	PostTown *string `json:"post_town,omitempty"`
	// The province where the address is located. This may not be relevant in some countries.
	// Max length: 512
	Province *string `json:"province,omitempty"`
	// The region where the address is located. This may not be relevant in some countries.
	// Max length: 512
	Region *string `json:"region,omitempty"`
	// Most often, a country has a single state, with various administrative divisions. The term "state" is sometimes
	// used to refer to the federated polities that make up the federation. Used in countries such as the United States
	// and Brazil.
	// Max length: 512
	State *string `json:"state,omitempty"`
	// Max items: 2
	StreetAddress *[]string `json:"street_address,omitempty"`
	// A US system of postal codes used by the United States Postal Service (USPS).
	// Max length: 512
	ZipCode *string `json:"zip_code,omitempty"`
}

Address: An address somewhere in the world. The address fields used depend on the country conventions. For example, in Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses is `state`, whereas in Chile it's `region`. Whether an address is valid or not depends on whether the locally required fields are present. Fields not supported in a country will be ignored. Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses

type BaseError

type BaseError struct {
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

BaseError is a schema definition.

type BasePerson

type BasePerson struct {
	// An address somewhere in the world. The address fields used depend on the country conventions. For example, in
	// Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses
	// is `state`, whereas in Chile it's `region`.
	// Whether an address is valid or not depends on whether the locally required fields are present. Fields not
	// supported in a country will be ignored.
	// Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses
	Address *Address `json:"address,omitempty"`
	// The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.
	// Format: date
	Birthdate *shared.Date `json:"birthdate,omitempty"`
	// 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.
	// Read only
	ChangeStatus *ChangeStatus `json:"change_status,omitempty"`
	// 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.
	// Min length: 2
	// Max length: 2
	Citizenship *CountryCode `json:"citizenship,omitempty"`
	// The last name(s) of the individual.
	// Max length: 60
	FamilyName *string `json:"family_name,omitempty"`
	// The first name(s) of the individual.
	// Max length: 60
	GivenName *string `json:"given_name,omitempty"`
	// The unique identifier for the person. This is a [typeid](https://github.com/sumup/typeid).
	// Read only
	Id string `json:"id"`
	// A list of country-specific personal identifiers.
	// Max items: 5
	Identifiers *[]PersonalIdentifier `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.
	// Max length: 60
	MiddleName *string    `json:"middle_name,omitempty"`
	Ownership  *Ownership `json:"ownership,omitempty"`
	// A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
	// Max length: 64
	PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
	// A list of roles the person has in the merchant or towards SumUp. A merchant must have at least one person with
	// the relationship `representative`.
	// Min items: 1
	// Max items: 1
	Relationships *[]string `json:"relationships,omitempty"`
	// A corresponding identity user ID for the person, if they have a user account.
	UserId *string `json:"user_id,omitempty"`
	// The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH`
	// endpoints.
	Version *Version `json:"version,omitempty"`
}

BasePerson: Base schema for a person associated with a merchant. This can be a legal representative, business owner (ultimate beneficial owner), or an officer. A legal representative is the person who registered the merchant with SumUp. They should always have a `user_id`.

Person documentation: https://developer.sumup.com/tools/models/merchant#persons

type Branding

type Branding struct {
	// A hex color value representing the preferred background color of this merchant.
	BackgroundColor *string `json:"background_color,omitempty"`
	// Data-URL encoded hero image for the merchant business.
	// Format: uri
	Hero *string `json:"hero,omitempty"`
	// An icon for the merchant. Must be square.
	// Format: uri
	Icon *string `json:"icon,omitempty"`
	// if there's sufficient space.
	// Format: uri
	Logo *string `json:"logo,omitempty"`
	// A hex color value representing the primary branding color of this merchant (your brand color).
	PrimaryColor *string `json:"primary_color,omitempty"`
	// A hex color value representing the color of the text displayed on branding color of this merchant.
	PrimaryColorFg *string `json:"primary_color_fg,omitempty"`
	// A hex color value representing the secondary branding color of this merchant (accent color used for buttons).
	SecondaryColor *string `json:"secondary_color,omitempty"`
	// A hex color value representing the color of the text displayed on secondary branding color of this merchant.
	SecondaryColorFg *string `json:"secondary_color_fg,omitempty"`
}

Branding: Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.

type BusinessProfile

type BusinessProfile struct {
	// An address somewhere in the world. The address fields used depend on the country conventions. For example, in
	// Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses
	// is `state`, whereas in Chile it's `region`.
	// Whether an address is valid or not depends on whether the locally required fields are present. Fields not
	// supported in a country will be ignored.
	// Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses
	Address *Address `json:"address,omitempty"`
	// Settings used to apply the Merchant's branding to email receipts, invoices, checkouts, and other products.
	Branding *Branding `json:"branding,omitempty"`
	// The descriptor is the text that your customer sees on their bank account statement.
	// The more recognisable your descriptor is, the less risk you have of receiving disputes (e.g. chargebacks).
	// Max length: 30
	// Pattern: ^[a-zA-Z0-9 \-+\'_.]{0,30}$
	DynamicDescriptor *string `json:"dynamic_descriptor,omitempty"`
	// A publicly available email address.
	// Max length: 256
	Email *string `json:"email,omitempty"`
	// The customer-facing business name.
	// Max length: 512
	Name *string `json:"name,omitempty"`
	// A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
	// Max length: 64
	PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
	// The business's publicly available website.
	// Max length: 512
	Website *string `json:"website,omitempty"`
}

BusinessProfile: Business information about the merchant. This information will be visible to the merchant's customers.

type ChangeStatus

type ChangeStatus string

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.

Read only

type ClassicMerchantIdentifiers

type ClassicMerchantIdentifiers struct {
	// Classic (serial) merchant ID.
	// Format: int64
	// Deprecated: this operation is deprecated
	Id int `json:"id"`
}

ClassicMerchantIdentifiers is a schema definition.

type Company

type Company struct {
	// An address somewhere in the world. The address fields used depend on the country conventions. For example, in
	// Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses
	// is `state`, whereas in Chile it's `region`.
	// Whether an address is valid or not depends on whether the locally required fields are present. Fields not
	// supported in a country will be ignored.
	// Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses
	Address *Address `json:"address,omitempty"`
	// Object attributes that are modifiable only by SumUp applications.
	Attributes *shared.Attributes `json:"attributes,omitempty"`
	// A list of country-specific company identifiers.
	Identifiers *CompanyIdentifiers `json:"identifiers,omitempty"`
	// 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.
	// Min length: 4
	// Max length: 64
	// The country SDK documentation for legal types.: https://developer.sumup.com/tools/models/merchant#legal-types
	LegalType *LegalType `json:"legal_type,omitempty"`
	// 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.
	// Pattern: ^[0-9]{4}$
	MerchantCategoryCode *string `json:"merchant_category_code,omitempty"`
	// The company's legal name.
	// Max length: 512
	Name *string `json:"name,omitempty"`
	// A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
	// Max length: 64
	PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
	// An address somewhere in the world. The address fields used depend on the country conventions. For example, in
	// Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses
	// is `state`, whereas in Chile it's `region`.
	// Whether an address is valid or not depends on whether the locally required fields are present. Fields not
	// supported in a country will be ignored.
	// Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses
	TradingAddress *Address `json:"trading_address,omitempty"`
	// HTTP(S) URL of the company's website.
	// Max length: 255
	Website *string `json:"website,omitempty"`
}

Company: Information about the company or business. This is legal information that is used for verification.

Company documentation: https://developer.sumup.com/tools/models/merchant#company

type CompanyIdentifier

type CompanyIdentifier struct {
	// The unique reference for the company identifier type as defined in the country SDK.
	Ref string `json:"ref"`
	// The company identifier value.
	// Max length: 100
	Value string `json:"value"`
}

CompanyIdentifier is a schema definition. Company identifier documentation: https://developer.sumup.com/tools/models/merchant#company-identifiers

type CompanyIdentifiers

type CompanyIdentifiers []CompanyIdentifier

CompanyIdentifiers: A list of country-specific company identifiers.

type CountryCode

type CountryCode string

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. Min length: 2 Max length: 2

type ErrorCategoryClient

type ErrorCategoryClient string

ErrorCategoryClient: The category of the error.

const (
	ErrorCategoryClientClientError ErrorCategoryClient = "client_error"
)

type ErrorCategoryServer

type ErrorCategoryServer string

ErrorCategoryServer: The category of the error.

const (
	ErrorCategoryServerServerError ErrorCategoryServer = "server_error"
)

type ErrorCodeInternalServerError

type ErrorCodeInternalServerError string

ErrorCodeInternalServerError: An error code specifying the exact error that occurred.

const (
	ErrorCodeInternalServerErrorInternalError ErrorCodeInternalServerError = "internal_error"
)

type ErrorCodeNotFound

type ErrorCodeNotFound string

ErrorCodeNotFound: An error code specifying the exact error that occurred.

const (
	ErrorCodeNotFoundNotFound ErrorCodeNotFound = "not_found"
)

type GetMerchant404Response

type GetMerchant404Response struct {
	// The category of the error.
	Category *ErrorCategoryClient `json:"category,omitempty"`
	// An error code specifying the exact error that occurred.
	Code *ErrorCodeNotFound `json:"code,omitempty"`
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

GetMerchant404Response is a schema definition.

func (*GetMerchant404Response) Error

func (e *GetMerchant404Response) Error() string

type GetMerchantParams

type GetMerchantParams struct {
	// The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested
	// resource's `change_status` is pending, the resource will be returned with all pending changes applied. When
	// no changes are pending the resource is returned as is. The `change_status` in the response body will reflect
	// the current state of the resource.
	Version *string
}

GetMerchantParams: query parameters for GetMerchant

func (*GetMerchantParams) QueryValues

func (p *GetMerchantParams) QueryValues() url.Values

QueryValues converts GetMerchantParams into url.Values.

type GetPerson404Response

type GetPerson404Response struct {
	// The category of the error.
	Category *ErrorCategoryClient `json:"category,omitempty"`
	// An error code specifying the exact error that occurred.
	Code *ErrorCodeNotFound `json:"code,omitempty"`
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

GetPerson404Response is a schema definition.

func (*GetPerson404Response) Error

func (e *GetPerson404Response) Error() string

type GetPerson500Response

type GetPerson500Response struct {
	// The category of the error.
	Category *ErrorCategoryServer `json:"category,omitempty"`
	// An error code specifying the exact error that occurred.
	Code *ErrorCodeInternalServerError `json:"code,omitempty"`
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

GetPerson500Response is a schema definition.

func (*GetPerson500Response) Error

func (e *GetPerson500Response) Error() string

type GetPersonParams

type GetPersonParams struct {
	// The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested
	// resource's `change_status` is pending, the resource will be returned with all pending changes applied. When
	// no changes are pending the resource is returned as is. The `change_status` in the response body will reflect
	// the current state of the resource.
	Version *string
}

GetPersonParams: query parameters for GetPerson

func (*GetPersonParams) QueryValues

func (p *GetPersonParams) QueryValues() url.Values

QueryValues converts GetPersonParams into url.Values.

type LegalType

type LegalType string

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.

Min length: 4 Max length: 64 The country SDK documentation for legal types.: https://developer.sumup.com/tools/models/merchant#legal-types

type ListPersons404Response

type ListPersons404Response struct {
	// The category of the error.
	Category *ErrorCategoryClient `json:"category,omitempty"`
	// An error code specifying the exact error that occurred.
	Code *ErrorCodeNotFound `json:"code,omitempty"`
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

ListPersons404Response is a schema definition.

func (*ListPersons404Response) Error

func (e *ListPersons404Response) Error() string

type ListPersons500Response

type ListPersons500Response struct {
	// The category of the error.
	Category *ErrorCategoryServer `json:"category,omitempty"`
	// An error code specifying the exact error that occurred.
	Code *ErrorCodeInternalServerError `json:"code,omitempty"`
	// A unique identifier for the error instance. This can be used to trace the error back to the server logs.
	Instance *string `json:"instance,omitempty"`
	// A human-readable message describing the error that occurred.
	Message *string `json:"message,omitempty"`
}

ListPersons500Response is a schema definition.

func (*ListPersons500Response) Error

func (e *ListPersons500Response) Error() string

type ListPersonsParams

type ListPersonsParams struct {
	// The version of the resource. At the moment, the only supported value is `latest`. When provided and the requested
	// resource's `change_status` is pending, the resource will be returned with all pending changes applied. When
	// no changes are pending the resource is returned as is. The `change_status` in the response body will reflect
	// the current state of the resource.
	Version *string
}

ListPersonsParams: query parameters for ListPersons

func (*ListPersonsParams) QueryValues

func (p *ListPersonsParams) QueryValues() url.Values

QueryValues converts ListPersonsParams into url.Values.

type ListPersonsResponseBody

type ListPersonsResponseBody struct {
	Items []Person `json:"items"`
}

ListPersonsResponseBody is a schema definition.

type Merchant

type Merchant struct {
	// A user-facing name of the merchant account for use in dashboards and other user-facing applications. For
	// customer-facing business name see `merchant.business_profile`.
	Alias *string `json:"alias,omitempty"`
	// A user-facing small-format logo for use in dashboards and other user-facing applications. For customer-facing branding
	// see `merchant.business_profile.branding`.
	// Format: url
	Avatar *string `json:"avatar,omitempty"`
	// Business information about the merchant. This information will be visible to the merchant's customers.
	BusinessProfile *BusinessProfile `json:"business_profile,omitempty"`
	// The business type.
	// * `sole_trader`: The business is run by an self-employed individual.
	// * `company`: The business is run as a company with one or more shareholders
	// * `partnership`: The business is run as a company with two or more shareholders that can be also other legal
	// entities
	// * `non_profit`: The business is run as a nonprofit organization that operates for public or social benefit
	// * `government_entity`: The business is state owned and operated
	BusinessType *string `json:"business_type,omitempty"`
	// 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.
	// Read only
	ChangeStatus *ChangeStatus               `json:"change_status,omitempty"`
	Classic      *ClassicMerchantIdentifiers `json:"classic,omitempty"`
	// Information about the company or business. This is legal information that is used for verification.
	// Company documentation: https://developer.sumup.com/tools/models/merchant#company
	Company *Company `json:"company,omitempty"`
	// 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.
	// Min length: 2
	// Max length: 2
	Country CountryCode `json:"country"`
	// The date and time when the resource was created. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	// Read only
	CreatedAt time.Time `json:"created_at"`
	// Three-letter [ISO currency code](https://en.wikipedia.org/wiki/ISO_4217) representing the default currency for
	// the account.
	// Read only
	// Min length: 3
	// Max length: 3
	DefaultCurrency string `json:"default_currency"`
	// Merchant's default locale, represented as a BCP47 [RFC5646](https://datatracker.ietf.org/doc/html/rfc5646) language
	// tag. This is typically an ISO 639-1 Alpha-2 [ISO639‑1](https://www.iso.org/iso-639-language-code) language code
	// in lowercase and an ISO 3166-1 Alpha-2 [ISO3166‑1](https://www.iso.org/iso-3166-country-codes.html) country
	// code in uppercase, separated by a dash. For example, en-US or fr-CA.
	// In multilingual countries this is the merchant's preferred locale out of those, that are officially spoken in
	// the country. In a countries with a single official language this will match the official language.
	// Min length: 2
	// Max length: 5
	DefaultLocale string `json:"default_locale"`
	// Short unique identifier for the merchant.
	// Read only
	MerchantCode string `json:"merchant_code"`
	// 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.
	// **Warning**: Updating Meta will overwrite the existing data. Make sure to always include the complete JSON
	// object.
	Meta *shared.Meta `json:"meta,omitempty"`
	// ID of the organization the merchant belongs to (if any).
	OrganizationId *string `json:"organization_id,omitempty"`
	// True if the merchant is a sandbox for testing.
	Sandbox *bool `json:"sandbox,omitempty"`
	// The date and time when the resource was last updated. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	//
	// Read only
	UpdatedAt time.Time `json:"updated_at"`
	// The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH`
	// endpoints.
	Version *Version `json:"version,omitempty"`
}

Merchant is a schema definition. Merchant documentation: https://developer.sumup.com/tools/models/merchant

type MerchantsService

type MerchantsService struct {
	// contains filtered or unexported fields
}

func NewMerchantsService

func NewMerchantsService(c *client.Client) *MerchantsService

func (*MerchantsService) GetMerchant

func (s *MerchantsService) GetMerchant(ctx context.Context, merchantCode string, params GetMerchantParams) (*Merchant, error)

GetMerchant: Retrieve a Merchant Retrieve a merchant. Merchant documentation: https://developer.sumup.com/tools/models/merchant

func (*MerchantsService) GetPerson

func (s *MerchantsService) GetPerson(ctx context.Context, merchantCode string, personId string, params GetPersonParams) (*Person, error)

GetPerson: Retrieve a Person Returns a single person related to the merchant. Persons documentation: https://developer.sumup.com/tools/models/merchant#persons

func (*MerchantsService) ListPersons

func (s *MerchantsService) ListPersons(ctx context.Context, merchantCode string, params ListPersonsParams) (*ListPersonsResponseBody, error)

ListPersons: List Persons Returns a list of persons related to the merchant. Persons documentation: https://developer.sumup.com/tools/models/merchant#persons

type Ownership

type Ownership struct {
	// The percent of ownership shares held by the person expressed in percent mille (1/100000). Only persons with
	// the relationship `owner` can have ownership.
	// Format: int32
	// Min: 25000
	// Max: 100000
	Share int `json:"share"`
}

Ownership is a schema definition.

type Person

type Person struct {
	// An address somewhere in the world. The address fields used depend on the country conventions. For example, in
	// Great Britain, `city` is `post_town`. In the United States, the top-level administrative unit used in addresses
	// is `state`, whereas in Chile it's `region`.
	// Whether an address is valid or not depends on whether the locally required fields are present. Fields not
	// supported in a country will be ignored.
	// Address documentation: https://sumup.roadie.so/docs/default/Component/merchants/merchant/#addresses
	Address *Address `json:"address,omitempty"`
	// The date of birth of the individual, represented as an ISO 8601:2004 [ISO8601‑2004] YYYY-MM-DD format.
	// Format: date
	Birthdate *shared.Date `json:"birthdate,omitempty"`
	// 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.
	// Read only
	ChangeStatus *ChangeStatus `json:"change_status,omitempty"`
	// 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.
	// Min length: 2
	// Max length: 2
	Citizenship *CountryCode `json:"citizenship,omitempty"`
	// The last name(s) of the individual.
	// Max length: 60
	FamilyName *string `json:"family_name,omitempty"`
	// The first name(s) of the individual.
	// Max length: 60
	GivenName *string `json:"given_name,omitempty"`
	// The unique identifier for the person. This is a [typeid](https://github.com/sumup/typeid).
	// Read only
	Id string `json:"id"`
	// A list of country-specific personal identifiers.
	// Max items: 5
	Identifiers *[]PersonalIdentifier `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.
	// Max length: 60
	MiddleName *string    `json:"middle_name,omitempty"`
	Ownership  *Ownership `json:"ownership,omitempty"`
	// A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.
	// Max length: 64
	PhoneNumber *PhoneNumber `json:"phone_number,omitempty"`
	// A list of roles the person has in the merchant or towards SumUp. A merchant must have at least one person with
	// the relationship `representative`.
	// Min items: 1
	// Max items: 1
	Relationships *[]string `json:"relationships,omitempty"`
	// A corresponding identity user ID for the person, if they have a user account.
	UserId *string `json:"user_id,omitempty"`
	// The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH`
	// endpoints.
	Version *Version `json:"version,omitempty"`
}

Person is a schema definition.

type PersonalIdentifier

type PersonalIdentifier struct {
	// The unique reference for the personal identifier type.
	Ref string `json:"ref"`
	// The company identifier value.
	Value string `json:"value"`
}

PersonalIdentifier is a schema definition.

type PhoneNumber

type PhoneNumber string

PhoneNumber: A publicly available phone number in [E.164](https://en.wikipedia.org/wiki/E.164) format.

Max length: 64

type Timestamps

type Timestamps struct {
	// The date and time when the resource was created. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	// Read only
	CreatedAt time.Time `json:"created_at"`
	// The date and time when the resource was last updated. This is a string as defined in [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6).
	//
	// Read only
	UpdatedAt time.Time `json:"updated_at"`
}

Timestamps is a schema definition.

type Version

type Version string

Version: The version of the resource. The version reflects a specific change submitted to the API via one of the `PATCH` endpoints.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL