Repository: VictorAvelar/mollie-api-go
Pull request #7 (2019-09-29 18:38:44)

Methods service


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4dbc4ad..6fc61e6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,9 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
 - 8e3130d Added scrutinizer check for code style and coverage
 - dbaf84f Added Mollie standard types
 - 1b53ea9-payments resource implementation
+- f658c63-fixed go linting errors
+- 8893236-methods resource implementation
+
 
 ### Deprecated
 - Nothing
diff --git a/docs/README.md b/docs/README.md
index 690cc86..54762c4 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -94,6 +94,7 @@ type Client struct {
 
 	// Services
 	Payments *PaymentsService
+	Methods  *MethodsService
 }
 ```
 
@@ -190,6 +191,7 @@ Error functions implement the Error interface on the zuora.Error struct.
 type FailureReason string
 ```
 
+FailureReason provides a description on a failed payment
 
 ```go
 const (
@@ -205,6 +207,7 @@ const (
 	ReasonPossibleFraud         FailureReason = "possible_fraud"
 )
 ```
+Possible failure reasons
 
 #### type FeeRegion
 
@@ -225,6 +228,32 @@ const (
 ```
 Valid Fee regions
 
+#### type Image
+
+```go
+type Image struct {
+	Size1x string `json:"size1X,omitempty"`
+	Size2X string `json:"size2X,omitempty"`
+	Svg    string `json:"svg,omitempty"`
+}
+```
+
+Image describes a generic image resource retrieved by Mollie.
+
+#### type ListMethods
+
+```go
+type ListMethods struct {
+	Count    int `json:"count,omitempty"`
+	Embedded struct {
+		Methods []PaymentMethodInfo
+	} `json:"_embedded,omitempty"`
+	Links PaginationLinks `json:"_links,omitempty"`
+}
+```
+
+ListMethods describes a list of paginated payment methods.
+
 #### type ListPaymentOptions
 
 ```go
@@ -273,6 +302,74 @@ const (
 ```
 Mollie supported locales
 
+#### type MethodsLinks
+
+```go
+type MethodsLinks struct {
+	Self URL `json:"self,omitempty"`
+	Docs URL `json:"documentation,omitempty"`
+}
+```
+
+MethodsLinks describes links attached to methods service responses.
+
+#### type MethodsOptions
+
+```go
+type MethodsOptions struct {
+	Locale    Locale `url:"locale,omitempty"`
+	Currency  string `url:"currency,omitempty"`
+	ProfileID string `url:"profileId,omitempty"`
+	Include   string `url:"include,omitempty"`
+	// Use for List method only
+	SequenceType   SequenceType `url:"sequenceType,omitempty"`
+	Amount         Amount       `url:"amount,omitempty"`
+	Resource       string       `url:"resource,omitempty"`
+	BillingCountry string       `url:"billingCountry,omitempty"`
+	IncludeWallets string       `json:"includeWallets,omitempty"`
+}
+```
+
+MethodsOptions are applicable query string parameters to methods service
+endpoints.
+
+#### type MethodsService
+
+```go
+type MethodsService service
+```
+
+MethodsService operates on methods endpoints
+
+#### func (*MethodsService) All
+
+```go
+func (ms *MethodsService) All(options *MethodsOptions) (pm *ListMethods, err error)
+```
+All retrieves all the payment methods enabled for your account/organization
+
+See: https://docs.mollie.com/reference/v2/methods-api/list-all-methods
+
+#### func (*MethodsService) Get
+
+```go
+func (ms *MethodsService) Get(id string, options *MethodsOptions) (pmi *PaymentMethodInfo, err error)
+```
+Get returns information about the payment method specified by id, it also
+receives a pointer to the method options containing applicable query string
+parameters
+
+See: https://docs.mollie.com/reference/v2/methods-api/get-method
+
+#### func (*MethodsService) List
+
+```go
+func (ms *MethodsService) List(options *MethodsOptions) (pm *ListMethods, err error)
+```
+List retrieves all enabled payment methods. The results are not paginated.
+
+See: https://docs.mollie.com/reference/v2/methods-api/list-methods
+
 #### type Mode
 
 ```go
@@ -342,6 +439,7 @@ type Payment struct {
 }
 ```
 
+Payment describes a transaction between a customer and a merchant
 
 #### type PaymentDetails
 
@@ -387,7 +485,7 @@ type PaymentDetails struct {
 }
 ```
 
-BankTransferDetails contains details for the specified payment method
+PaymentDetails contains details for the specified payment method
 
 #### type PaymentLinks
 
@@ -431,6 +529,7 @@ PaymentList describes how a list of payments will be retrieved by Mollie.
 type PaymentMethod string
 ```
 
+PaymentMethod is a payment method supported by Mollie.
 
 ```go
 const (
@@ -454,6 +553,37 @@ const (
 	Sofort         PaymentMethod = "sofort"
 )
 ```
+Supported payment methods
+
+#### type PaymentMethodInfo
+
+```go
+type PaymentMethodInfo struct {
+	Resource      string                 `json:"resource,omitempty"`
+	ID            string                 `json:"id,omitempty"`
+	Description   string                 `json:"description,omitempty"`
+	MinimumAmount *Amount                `json:"minimumAmount,omitempty"`
+	MaximumAmount *Amount                `json:"maximumAmount,omitempty"`
+	Image         Image                  `json:"image,omitempty"`
+	Pricing       []PaymentMethodPricing `json:"pricing,omitempty"`
+	Links         MethodsLinks           `json:"_links,omitempty"`
+}
+```
+
+PaymentMethodInfo describes a single method with details.
+
+#### type PaymentMethodPricing
+
+```go
+type PaymentMethodPricing struct {
+	Description string  `json:"description,omitempty"`
+	Fixed       *Amount `json:"fixed,omitempty"`
+	Variable    string  `json:"variable,omitempty"`
+}
+```
+
+PaymentMethodPricing contains information about commissions and fees applicable
+to a payment method.
 
 #### type PaymentOptions
 
@@ -537,7 +667,7 @@ type QRCode struct {
 }
 ```
 
-QR code object represents an image of a QR code.
+QRCode object represents an image of a QR code.
 
 #### type Response
 
@@ -595,7 +725,7 @@ type URL struct {
 }
 ```
 
-URLs in Mollie are commonly represented as objects with an href and type field.
+URL in Mollie are commonly represented as objects with an href and type field.
 
 #### type UsedGiftCard
 
diff --git a/mollie/common_types.go b/mollie/common_types.go
index b469ac1..8b44dd1 100644
--- a/mollie/common_types.go
+++ b/mollie/common_types.go
@@ -77,14 +77,14 @@ const (
 // PhoneNumber represents a phone number in the E.164 format.
 type PhoneNumber string
 
-// QR code object represents an image of a QR code.
+// QRCode object represents an image of a QR code.
 type QRCode struct {
 	Height int    `json:"height,omitempty"`
 	Width  int    `json:"width,omitempty"`
 	Src    string `json:"src,omitempty"`
 }
 
-// URLs in Mollie are commonly represented as objects with an href and type field.
+// URL in Mollie are commonly represented as objects with an href and type field.
 type URL struct {
 	Href string `json:"href,omitempty"`
 	Type string `json:"type,omitempty"`
diff --git a/mollie/methods.go b/mollie/methods.go
new file mode 100644
index 0000000..67bef27
--- /dev/null
+++ b/mollie/methods.go
@@ -0,0 +1,141 @@
+package mollie
+
+import (
+	"encoding/json"
+	"fmt"
+	"net/http"
+
+	"github.com/google/go-querystring/query"
+)
+
+// PaymentMethodInfo describes a single method with details.
+type PaymentMethodInfo struct {
+	Resource      string                 `json:"resource,omitempty"`
+	ID            string                 `json:"id,omitempty"`
+	Description   string                 `json:"description,omitempty"`
+	MinimumAmount *Amount                `json:"minimumAmount,omitempty"`
+	MaximumAmount *Amount                `json:"maximumAmount,omitempty"`
+	Image         Image                  `json:"image,omitempty"`
+	Pricing       []PaymentMethodPricing `json:"pricing,omitempty"`
+	Links         MethodsLinks           `json:"_links,omitempty"`
+}
+
+// MethodsLinks describes links attached to methods service responses.
+type MethodsLinks struct {
+	Self URL `json:"self,omitempty"`
+	Docs URL `json:"documentation,omitempty"`
+}
+
+// Image describes a generic image resource retrieved by Mollie.
+type Image struct {
+	Size1x string `json:"size1X,omitempty"`
+	Size2X string `json:"size2X,omitempty"`
+	Svg    string `json:"svg,omitempty"`
+}
+
+// PaymentMethodPricing contains information about commissions and fees
+// applicable to a payment method.
+type PaymentMethodPricing struct {
+	Description string  `json:"description,omitempty"`
+	Fixed       *Amount `json:"fixed,omitempty"`
+	Variable    string  `json:"variable,omitempty"`
+}
+
+// ListMethods describes a list of paginated payment methods.
+type ListMethods struct {
+	Count    int `json:"count,omitempty"`
+	Embedded struct {
+		Methods []PaymentMethodInfo
+	} `json:"_embedded,omitempty"`
+	Links PaginationLinks `json:"_links,omitempty"`
+}
+
+// MethodsOptions are applicable query string parameters to methods
+// service endpoints.
+type MethodsOptions struct {
+	Locale    Locale `url:"locale,omitempty"`
+	Currency  string `url:"currency,omitempty"`
+	ProfileID string `url:"profileId,omitempty"`
+	Include   string `url:"include,omitempty"`
+	// Use for List method only
+	SequenceType   SequenceType `url:"sequenceType,omitempty"`
+	Amount         Amount       `url:"amount,omitempty"`
+	Resource       string       `url:"resource,omitempty"`
+	BillingCountry string       `url:"billingCountry,omitempty"`
+	IncludeWallets string       `json:"includeWallets,omitempty"`
+}
+
+// MethodsService operates on methods endpoints
+type MethodsService service
+
+// Get returns information about the payment method specified by id,
+// it also receives a pointer to the method options containing applicable
+// query string parameters
+//
+// See: https://docs.mollie.com/reference/v2/methods-api/get-method
+func (ms *MethodsService) Get(id string, options *MethodsOptions) (pmi *PaymentMethodInfo, err error) {
+	u := fmt.Sprintf("v2/methods/%s", id)
+	if options != nil {
+		v, _ := query.Values(options)
+		u = fmt.Sprintf("%s?%s", u, v.Encode())
+	}
+	req, err := ms.client.NewAPIRequest(http.MethodGet, u, nil)
+	if err != nil {
+		return
+	}
+	res, err := ms.client.Do(req)
+	if err != nil {
+		return
+	}
+	if err = json.Unmarshal(res.content, &pmi); err != nil {
+		return
+	}
+	return
+}
+
+// All retrieves all the payment methods enabled for your account/organization
+//
+// See: https://docs.mollie.com/reference/v2/methods-api/list-all-methods
+func (ms *MethodsService) All(options *MethodsOptions) (pm *ListMethods, err error) {
+	u := fmt.Sprintf("v2/methods/all")
+	if options != nil {
+		v, _ := query.Values(options)
+		u = fmt.Sprintf("%s?%s", u, v.Encode())
+	}
+	req, err := ms.client.NewAPIRequest(http.MethodGet, u, nil)
+	if err != nil {
+		return
+	}
+	res, err := ms.client.Do(req)
+	if err != nil {
+		return
+	}
+	if err = json.Unmarshal(res.content, &pm); err != nil {
+		return
+	}
+	return
+}
+
+// List retrieves all enabled payment methods.
+// The results are not paginated.
+//
+// See: https://docs.mollie.com/reference/v2/methods-api/list-methods
+func (ms *MethodsService) List(options *MethodsOptions) (pm *ListMethods, err error) {
+	u := fmt.Sprintf("v2/methods")
+	if options != nil {
+		v, _ := query.Values(options)
+		u = fmt.Sprintf("%s?%s", u, v.Encode())
+	}
+	req, err := ms.client.NewAPIRequest(http.MethodGet, u, nil)
+	if err != nil {
+		return
+	}
+	res, err := ms.client.Do(req)
+	if err != nil {
+		return
+	}
+	if err = json.Unmarshal(res.content, &pm); err != nil {
+		return
+	}
+	return
+}
diff --git a/mollie/mollie.go b/mollie/mollie.go
index ad02899..fe3e8fc 100644
--- a/mollie/mollie.go
+++ b/mollie/mollie.go
@@ -37,6 +37,7 @@ type Client struct {
 	config         *Config
 	// Services
 	Payments *PaymentsService
+	Methods  *MethodsService
 }
 
 type service struct {
@@ -146,6 +147,7 @@ func NewClient(baseClient *http.Client, c *Config) (mollie *Client, err error) {
 
 	// services for resources
 	mollie.Payments = (*PaymentsService)(&mollie.common)
+	mollie.Methods = (*MethodsService)(&mollie.common)
 
 	// Parse authorization from environment
 	if tkn, ok := os.LookupEnv(APITokenEnv); ok {
diff --git a/mollie/payment_details.go b/mollie/payment_details.go
index d98ff9e..86a9325 100644
--- a/mollie/payment_details.go
+++ b/mollie/payment_details.go
@@ -12,8 +12,10 @@ const (
 	Other           FeeRegion = "other"
 )
 
+// FailureReason provides a description on a failed payment
 type FailureReason string
 
+// Possible failure reasons
 const (
 	ReasonInvalidCardNumber     FailureReason = "invalid_card_number"
 	ReasonInvalidCCV            FailureReason = "invalid_ccv"
@@ -34,7 +36,7 @@ type UsedGiftCard struct {
 	VoucherNumber string  `json:"voucherNumber,omitempty"`
 }
 
-// BankTransferDetails contains details for the specified payment method
+// PaymentDetails contains details for the specified payment method
 type PaymentDetails struct {
 	BankAccount        string         `json:"bankAccount,omitempty"`
 	BankBIC            string         `json:"bankBic,omitempty"`
diff --git a/mollie/payments.go b/mollie/payments.go
index 73d70a3..203dd18 100644
--- a/mollie/payments.go
+++ b/mollie/payments.go
@@ -18,8 +18,10 @@ const (
 	TestMode Mode = "test"
 )
 
+// PaymentMethod is a payment method supported by Mollie.
 type PaymentMethod string
 
+// Supported payment methods
 const (
 	Bancontact     PaymentMethod = "bancontact"
 	BankTransfer   PaymentMethod = "banktransfer"
@@ -51,6 +53,7 @@ const (
 	RecurringSequence SequenceType = "recurring"
 )
 
+// Payment describes a transaction between a customer and a merchant
 type Payment struct {
 	Resource         string          `json:"resource,omitempty"`
 	ID               string          `json:"id,omitempty"`


Test patch:
diff --git a/mollie/methods_test.go b/mollie/methods_test.go
new file mode 100644
index 0000000..485a618
--- /dev/null
+++ b/mollie/methods_test.go
@@ -0,0 +1,159 @@
+package mollie
+
+import (
+	"net/http"
+	"net/url"
+	"strings"
+	"testing"
+
+	"github.com/VictorAvelar/mollie-api-go/testdata"
+)
+
+func TestMethodsService_Get(t *testing.T) {
+	setup()
+	defer teardown()
+	id := "ideal"
+	_ = tClient.WithAuthenticationValue("test_token")
+	tMux.HandleFunc("/v2/methods/"+id, func(w http.ResponseWriter, r *http.Request) {
+		testHeader(t, r, AuthHeader, "Bearer test_token")
+		testMethod(t, r, "GET")
+		if _, ok := r.Header[AuthHeader]; !ok {
+			w.WriteHeader(http.StatusUnauthorized)
+		}
+
+		w.WriteHeader(http.StatusOK)
+		_, _ = w.Write([]byte(testdata.GetMethodResponse))
+	})
+
+	res, err := tClient.Methods.Get(id, nil)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if res.ID != id {
+		t.Errorf("mismatching info. want %v, got %v", id, res.ID)
+	}
+
+	// 404 when not found
+	mo := &MethodsOptions{
+		Locale: English,
+	}
+	_, err2 := tClient.Methods.Get("sofort", mo)
+	if err2 == nil {
+		t.Fatal(err)
+	} else if !strings.Contains(err2.Error(), "Not Found") {
+		t.Fail()
+	}
+}
+
+func TestMethodsService_All(t *testing.T) {
+	setup()
+	defer teardown()
+	_ = tClient.WithAuthenticationValue("test_token")
+	tMux.HandleFunc("/v2/methods/all", func(w http.ResponseWriter, r *http.Request) {
+		testHeader(t, r, AuthHeader, "Bearer test_token")
+		testMethod(t, r, "GET")
+		if _, ok := r.Header[AuthHeader]; !ok {
+			w.WriteHeader(http.StatusUnauthorized)
+		}
+
+		w.WriteHeader(http.StatusOK)
+		_, _ = w.Write([]byte(testdata.ListMethodsResponse))
+	})
+
+	res, err := tClient.Methods.All(&MethodsOptions{
+		Locale: Dutch,
+	})
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if res.Count == 0 {
+		t.Errorf("mismatching info. want %v, got %v", 13, res.Count)
+	}
+}
+
+func TestMethodsService_List(t *testing.T) {
+	setup()
+	defer teardown()
+	_ = tClient.WithAuthenticationValue("test_token")
+	tMux.HandleFunc("/v2/methods", func(w http.ResponseWriter, r *http.Request) {
+		testHeader(t, r, AuthHeader, "Bearer test_token")
+		testMethod(t, r, "GET")
+		if _, ok := r.Header[AuthHeader]; !ok {
+			w.WriteHeader(http.StatusUnauthorized)
+		}
+
+		w.WriteHeader(http.StatusOK)
+		_, _ = w.Write([]byte(testdata.ListMethodsResponse))
+	})
+
+	res, err := tClient.Methods.List(&MethodsOptions{
+		SequenceType: FirstSequence,
+	})
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	if res.Count == 0 {
+		t.Errorf("mismatching info. want %v, got %v", 13, res.Count)
+	}
+}
+
+func TestMethodsService_HttpRequestErrors(t *testing.T) {
+	setup()
+	defer teardown()
+	tMux.HandleFunc("/v2/methods/", errorHandler)
+
+	_, lerr := tClient.Methods.List(nil)
+	_, aerr := tClient.Methods.All(nil)
+	_, gerr := tClient.Methods.Get("ideal", nil)
+
+	tests := []error{lerr, aerr, gerr}
+
+	for _, tt := range tests {
+		if tt == nil {
+			t.Fail()
+		}
+	}
+}
+
+func TestMethodsService_NewAPIRequestErrors(t *testing.T) {
+	setup()
+	defer teardown()
+	u, _ := url.Parse(tServer.URL)
+	tClient.BaseURL = u
+	tMux.HandleFunc("/v2/methods/", errorHandler)
+
+	_, rerr := tClient.Methods.List(nil)
+	_, derr := tClient.Methods.All(nil)
+	_, gerr := tClient.Methods.Get("1212", nil)
+
+	tests := []error{rerr, derr, gerr}
+
+	for _, tt := range tests {
+		if tt != errBadBaseURL {
+			t.Fail()
+		}
+	}
+}
+
+func TestMethodsService_EncodingResponseErrors(t *testing.T) {
+	setup()
+	defer teardown()
+	tMux.HandleFunc("/v2/methods/", encodingHandler)
+
+	_, cerr := tClient.Methods.All(nil)
+	_, rerr := tClient.Methods.List(nil)
+	_, uerr := tClient.Methods.Get("1212", nil)
+
+	tests := []error{cerr, rerr, uerr}
+
+	for _, tt := range tests {
+		if tt == nil {
+			t.Fail()
+		} else if !strings.Contains(tt.Error(), "invalid character") {
+			t.Errorf("unexpected error %v", tt)
+		}
+	}
+}
diff --git a/testdata/methods.go b/testdata/methods.go
new file mode 100644
index 0000000..f1ea3c0
--- /dev/null
+++ b/testdata/methods.go
@@ -0,0 +1,168 @@
+package testdata
+
+// ListMethodsResponse example
+var ListMethodsResponse = `{
+    "count": 13,
+    "_embedded": {
+        "methods": [
+            {
+                 "resource": "method",
+                 "id": "ideal",
+                 "description": "iDEAL",
+                 "minimumAmount": {
+                     "value": "0.01",
+                     "currency": "EUR"
+                 },
+                 "maximumAmount": {
+                     "value": "50000.00",
+                     "currency": "EUR"
+                 },
+                 "image": {
+                     "size1x": "https://mollie.com/external/icons/payment-methods/ideal.png",
+                     "size2x": "https://mollie.com/external/icons/payment-methods/ideal%402x.png",
+                     "svg": "https://mollie.com/external/icons/payment-methods/ideal.svg"
+                 },
+                 "pricing": [
+                     {
+                         "description": "Netherlands",
+                         "fixed": {
+                             "value": "0.29",
+                             "currency": "EUR"
+                         },
+                         "variable": "0"
+                     }
+                 ],
+                 "_links": {
+                     "self": {
+                         "href": "https://api.mollie.com/v2/methods/ideal",
+                         "type": "application/hal+json"
+                     }
+                 }
+            },
+            {
+                 "resource": "method",
+                 "id": "creditcard",
+                 "description": "Credit card",
+                 "minimumAmount": {
+                     "value": "0.01",
+                     "currency": "EUR"
+                 },
+                 "maximumAmount": {
+                     "value": "2000.00",
+                     "currency": "EUR"
+                 },
+                 "image": {
+                     "size1x": "https://mollie.com/external/icons/payment-methods/creditcard.png",
+                     "size2x": "https://mollie.com/external/icons/payment-methods/creditcard%402x.png",
+                     "svg": "https://mollie.com/external/icons/payment-methods/creditcard.svg"
+                 },
+                 "pricing": [
+                     {
+                         "description": "Commercial & non-European cards",
+                         "fixed": {
+                             "value": "0.25",
+                             "currency": "EUR"
+                         },
+                         "variable": "2.8"
+                     },
+                     {
+                         "description": "European cards",
+                         "fixed": {
+                             "value": "0.25",
+                             "currency": "EUR"
+                         },
+                         "variable": "1.8"
+                     },
+                     {
+                         "description": "American Express",
+                         "fixed": {
+                             "value": "0.25",
+                             "currency": "EUR"
+                         },
+                         "variable": "2.8"
+                     }
+                 ],
+                 "_links": {
+                     "self": {
+                         "href": "https://api.mollie.com/v2/methods/creditcard",
+                         "type": "application/hal+json"
+                     }
+                 }
+            }
+        ]
+    },
+    "_links": {
+        "self": {
+            "href": "https://api.mollie.com/v2/methods",
+            "type": "application/hal+json"
+        },
+        "documentation": {
+            "href": "https://docs.mollie.com/reference/v2/methods-api/list-methods",
+            "type": "text/html"
+        }
+    }
+}`
+
+// GetMethodResponse example
+var GetMethodResponse = `{
+     "resource": "method",
+     "id": "ideal",
+     "description": "iDEAL",
+     "minimumAmount": {
+         "value": "0.01",
+         "currency": "EUR"
+     },
+     "maximumAmount": {
+         "value": "50000.00",
+         "currency": "EUR"
+     },
+     "image": {
+         "size1x": "https://www.mollie.com/external/icons/payment-methods/ideal.png",
+         "size2x": "https://www.mollie.com/external/icons/payment-methods/ideal%402x.png",
+         "svg": "https://www.mollie.com/external/icons/payment-methods/ideal.svg"
+     },
+     "issuers": [
+         {
+             "resource": "issuer",
+             "id": "ideal_ABNANL2A",
+             "name": "ABN AMRO",
+             "image": {
+                 "size1x": "https://www.mollie.com/external/icons/ideal-issuers/ABNANL2A.png",
+                 "size2x": "https://www.mollie.com/external/icons/ideal-issuers/ABNANL2A%402x.png",
+                 "svg": "https://www.mollie.com/external/icons/ideal-issuers/ABNANL2A.svg"
+             }
+         },
+         {
+             "resource": "issuer",
+             "id": "ideal_ASNBNL21",
+             "name": "ASN Bank",
+             "image": {
+                 "size1x": "https://www.mollie.com/external/icons/ideal-issuers/ASNBNL21.png",
+                 "size2x": "https://www.mollie.com/external/icons/ideal-issuers/ASNBNL21%402x.png",
+                 "svg": "https://www.mollie.com/external/icons/ideal-issuers/ASNBNL21.svg"
+             }
+         },
+         { },
+         { }
+     ],
+     "pricing": [
+         {
+             "description": "The Netherlands",
+             "fixed": {
+                 "value": "0.29",
+                 "currency": "EUR"
+             },
+             "variable": "0"
+         }
+     ],
+     "_links": {
+         "self": {
+             "href": "https://api.mollie.com/v2/methods/ideal",
+             "type": "application/hal+json"
+         },
+         "documentation": {
+             "href": "https://docs.mollie.com/reference/v2/methods-api/get-method",
+             "type": "text/html"
+         }
+     }
+ }`