Repository: VictorAvelar/mollie-api-go
Pull request #55 (2020-04-11 07:32:03)

Q1 2020 housekeeping


Patch:
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
new file mode 100644
index 0000000..81c433e
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -0,0 +1,5 @@
+blank_issues_enabled: true
+contact_links:
+  - name: Victor H. Avelar
+    url: https://victoravelar.com
+    about: Maintainer
diff --git a/.github/ISSUE_TEMPLATE/housekeeping.md b/.github/ISSUE_TEMPLATE/housekeeping.md
new file mode 100644
index 0000000..3b8fce8
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/housekeeping.md
@@ -0,0 +1,15 @@
+---
+name: Repository housekeeping
+about: A regular code check for improvements or tech debt
+title: 'Library housekeeping - [PERIOD]'
+labels: 'housekeeping'
+assignees: 'VictorAvelar'
+
+---
+
+**List of changes**
+- General change
+- Addition to x
+
+**External references**
+Links or additional resources to provide context to the introduced changes
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 0984d45..e90f8d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,8 +11,5 @@
 # Output of the go coverage tool, specifically when used with LiteIDE
 *.out
 
-# Goland ALL
-.idea
-
 # Visual Studio Code
 .vscode
\ No newline at end of file
diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index 10e6b75..4c3ea29 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -15,7 +15,7 @@ build:
           - 'true'
       environment:
         go:
-          version: go1.12.9
+          version: go1.14
       tests:
         override:
           - go-scrutinizer-run
diff --git a/.travis.yml b/.travis.yml
index ae850f7..4e24186 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -20,9 +20,9 @@ notifications:
   email: false
 
 go:
-  - 1.11.x
   - 1.12.x
   - 1.13.x
+  - 1.14.x
 
 # script always runs to completion (set +e). If we have linter issues AND a
 # failing test, we want to see both. Configure golangci-lint with a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b8945ea..58b3ddd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,23 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
 
 ## master
 
+## v1.2.1
+
+### Added
+- MandatesID added to Subscriptions resource as follow up to the previous release.
+
+## v1.2.0
+
+### Added
+- Mandates API resource
+
+## v1.1.0
+
+### Added
+- Added changes to provide API parity according to mollie's API changelog
+
+## v1.0.1
+
 ### Fixed
 - Fixed error reported when trying to access the `mollie.Error.Response.Body` content (#47).
 
diff --git a/docs/README.md b/docs/README.md
index 6def8d5..a2a8292 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -606,8 +606,10 @@ EmbedValue describes the valid value of embed query string.
 
 ```go
 const (
-	EmbedPayment EmbedValue = "payment"
-	EmbedRefund  EmbedValue = "refund"
+	EmbedPayment     EmbedValue = "payment"
+	EmbedRefund      EmbedValue = "refund"
+	EmbedShipments   EmbedValue = "shipments"
+	EmbedChangebacks EmbedValue = "chanrgebacks"
 )
 ```
 Valid Embed query string value.
@@ -1533,6 +1535,7 @@ type OrganizationLinks struct {
 	Self          *URL `json:"self,omitempty"`
 	Chargebacks   *URL `json:"chargebacks,omitempty"`
 	Customers     *URL `json:"customers,omitempty"`
+	Dashboard     *URL `json:"dashboard,omitempty"`
 	Invoices      *URL `json:"invoices,omitempty"`
 	Payments      *URL `json:"payments,omitempty"`
 	Profiles      *URL `json:"profiles,omitempty"`
@@ -1618,6 +1621,7 @@ type Payment struct {
 	Links                           *PaymentLinks   `json:"_links,omitempty"`
 	Details                         *PaymentDetails `json:"details,omitempty"`
 	RestrictPaymentMethodsToCountry *Locale         `json:"restrictPaymentMethodsToCountry,omitempty"`
+	SubscriptionID                  string          `json:"subscriptionId,omitempty"`
 }
 ```
 
@@ -1660,6 +1664,7 @@ type PaymentDetails struct {
 	RemainderAmount    *Amount             `json:"remainderAmount,omitempty"`
 	RemainderMethod    *PaymentMethod      `json:"remainderMethod,omitempty"`
 	SellerProtection   *EligibilityReasons `json:"sellerProtection,omitempty"`
+	ShippingAddress    string              `json:"shippingAddress,omitempty"`
 	SignatureDate      *ShortDate          `json:"signatureDate,omitempty"`
 	TransferReference  string              `json:"transferReference,omitempty"`
 	VoucherNumber      string              `json:"voucherNumber,omitempty"`
diff --git a/mollie/common_types.go b/mollie/common_types.go
index 6a8a6d7..3d79d88 100644
--- a/mollie/common_types.go
+++ b/mollie/common_types.go
@@ -138,8 +138,10 @@ type EmbedValue string
 
 // Valid Embed query string value.
 const (
-	EmbedPayment EmbedValue = "payment"
-	EmbedRefund  EmbedValue = "refund"
+	EmbedPayment     EmbedValue = "payment"
+	EmbedRefund      EmbedValue = "refund"
+	EmbedShipments   EmbedValue = "shipments"
+	EmbedChangebacks EmbedValue = "chanrgebacks"
 )
 
 // Rate describes service rates, further divided into fixed and percentage costs.
diff --git a/mollie/organizations.go b/mollie/organizations.go
index 5f188c4..7dddf05 100644
--- a/mollie/organizations.go
+++ b/mollie/organizations.go
@@ -26,6 +26,7 @@ type OrganizationLinks struct {
 	Self          *URL `json:"self,omitempty"`
 	Chargebacks   *URL `json:"chargebacks,omitempty"`
 	Customers     *URL `json:"customers,omitempty"`
+	Dashboard     *URL `json:"dashboard,omitempty"`
 	Invoices      *URL `json:"invoices,omitempty"`
 	Payments      *URL `json:"payments,omitempty"`
 	Profiles      *URL `json:"profiles,omitempty"`
diff --git a/mollie/payment_details.go b/mollie/payment_details.go
index 05a72ad..8df3f80 100644
--- a/mollie/payment_details.go
+++ b/mollie/payment_details.go
@@ -85,6 +85,7 @@ type PaymentDetails struct {
 	RemainderAmount    *Amount             `json:"remainderAmount,omitempty"`
 	RemainderMethod    *PaymentMethod      `json:"remainderMethod,omitempty"`
 	SellerProtection   *EligibilityReasons `json:"sellerProtection,omitempty"`
+	ShippingAddress    string              `json:"shippingAddress,omitempty"`
 	SignatureDate      *ShortDate          `json:"signatureDate,omitempty"`
 	TransferReference  string              `json:"transferReference,omitempty"`
 	VoucherNumber      string              `json:"voucherNumber,omitempty"`


Test patch:
diff --git a/mollie/orders_test.go b/mollie/orders_test.go
index 9f5f207..a9947fd 100644
--- a/mollie/orders_test.go
+++ b/mollie/orders_test.go
@@ -33,6 +33,7 @@ func TestOrdersService_Get(t *testing.T) {
 		Embed: []EmbedValue{
 			EmbedPayment,
 			EmbedRefund,
+			EmbedShipments,
 		},
 	}