Skip to content

Commit

Permalink
Merge pull request #274 from VictorAvelar/chore/housekeeping-august-2023
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorAvelar committed Aug 8, 2023
2 parents 58c2729 + c91e545 commit f830092
Show file tree
Hide file tree
Showing 12 changed files with 198 additions and 1,555 deletions.
36 changes: 17 additions & 19 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,23 @@
"customizations": {
"vscode": {
"extensions": [
// Editor extensions
"GitHub.vscode-pull-request-github",
"pnp.polacode",
"eamodio.gitlens",
"jasonlhy.hungry-delete",
"formulahendry.auto-rename-tag",
"DavidAnson.vscode-markdownlint",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"PKief.material-icon-theme",
"ms-azuretools.vscode-docker",
"Gruntfuggly.todo-tree",
"shardulm94.trailing-spaces",
"ms-vscode.makefile-tools",
"redhat.vscode-yaml",
"bungcip.better-toml",
// Go
"golang.Go"
],
"GitHub.vscode-pull-request-github",
"pnp.polacode",
"eamodio.gitlens",
"jasonlhy.hungry-delete",
"formulahendry.auto-rename-tag",
"DavidAnson.vscode-markdownlint",
"aaron-bond.better-comments",
"streetsidesoftware.code-spell-checker",
"PKief.material-icon-theme",
"ms-azuretools.vscode-docker",
"Gruntfuggly.todo-tree",
"shardulm94.trailing-spaces",
"ms-vscode.makefile-tools",
"redhat.vscode-yaml",
"golang.Go",
"tamasfe.even-better-toml"
],
"settings": {
"files.eol": "\n",
"remote.extensionKind": {
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,7 @@
*.out

# Visual Studio Code
.vscode
.vscode

# Wiki pages
wiki
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.
Loading

0 comments on commit f830092

Please sign in to comment.