Skip to content

Commit

Permalink
chore(docs): update generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorAvelar committed Aug 8, 2023
1 parent 81ec7aa commit c91e545
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ sub-pkg-docs:
@godocdown ./mollie/connect > docs/connect/README.md
@godocdown ./mollie/tools > docs/tools/README.md
@godocdown ./mollie/tools/idempotency > docs/tools/idempotency/README.md
@godocdown ./mollie/tools/pagination > docs/tools/pagination/README.md
.PHONY: sub-pkg-docs
45 changes: 45 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ response body.

```go
type Address struct {
GivenName string `json:"givenName,omitempty"`
FamilyName string `json:"familyName,omitempty"`
StreetAndNumber string `json:"streetAndNumber,omitempty"`
StreetAdditional string `json:"streetAdditional,omitempty"`
PostalCode string `json:"postalCode,omitempty"`
Expand Down Expand Up @@ -1013,6 +1015,19 @@ type Commission struct {

Commission describes a partner take from any operation on Mollie's API.

#### type Company

```go
type Company struct {
RegistrationNumber string `json:"registrationNumber,omitempty"`
VATNumber string `json:"vatNumber,omitempty"`
EntityType EntityType `json:"entityType,omitempty"`
}
```

Company information that allows to identify the business that is interacting
with Mollie.

#### type Config

```go
Expand Down Expand Up @@ -1336,6 +1351,31 @@ const (

Valid Embed query string value.

#### type EntityType

```go
type EntityType string
```

EntityType for an organization.

```go
const (
LimitedCompany EntityType = "limited-company"
PublicLimitedCompany EntityType = "public-limited-company"
EntrepreneurialCompany EntityType = "entrepreneurial-company"
LimitedPartnershipLimitedCompany EntityType = "limited-partnership-limited-company"
LimitedPartnership EntityType = "limited-partnership"
GeneralPartnership EntityType = "general-partnership"
RegisteredSoleTrader EntityType = "registered-sole-trader"
SoleTrader EntityType = "sole-trader"
CivilLawPartnership EntityType = "civil-law-partnership"
PublicInstitution EntityType = "public-institution"
)
```

Supported entity types.

#### type ErrorLinks

```go
Expand Down Expand Up @@ -2027,6 +2067,10 @@ SubmitOnboardingData sends data that will be prefilled in the merchant’s
onboarding. Please note that the data you submit will only be processed when the
onboarding status is needs-data.

This endpoint has been deprecated. It will be supported for the foreseeable
future, but new implementations should use the Create client link endpoint to
create new clients and submit their organization’s details in one go.

See: <https://docs.mollie.com/reference/v2/onboarding-api/submit-onboarding-data>

#### type OnboardingStatus
Expand Down Expand Up @@ -2829,6 +2873,7 @@ type Payment struct {
Method PaymentMethod `json:"method,omitempty"`
Links PaymentLinks `json:"_links,omitempty"`
SequenceType SequenceType `json:"sequenceType,omitempty"`
Company Company `json:"company,omitempty"`
}
```

Expand Down
24 changes: 24 additions & 0 deletions docs/tools/pagination/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# pagination

--
import "github.com/VictorAvelar/mollie-api-go/v3/mollie/tools/pagination"

Package pagination provides utilities to handle pagination in API responses.

Pagination is a common feature in APIs that allows retrieval of large datasets
in smaller chunks, enhancing performance and resource usage. This package aims
to simplify pagination-related tasks by providing helpful functions.

## Usage

#### func ExtractFromQueryParam

```go
func ExtractFromQueryParam(uri string) (lastID string, err error)
```

ExtractFromQueryParam extracts the lastID from the given URI, which is assumed
to be a URL with query parameters. It specifically looks for a query parameter
named 'from' and returns its value as a string. If the URI cannot be parsed or
the query parameter is not found, it returns an empty string and the encountered
error.

0 comments on commit c91e545

Please sign in to comment.