Skip to content

Commit 6cd6f1a

Browse files
author
Kate Döen
committed
Fix metadata type
1 parent a5af6ec commit 6cd6f1a

File tree

2 files changed

+29
-29
lines changed

2 files changed

+29
-29
lines changed

mollie/customers.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ type CustomerLinks struct {
2222

2323
// Customer represents buyers.
2424
type Customer struct {
25-
Resource string `json:"resource,omitempty"`
26-
ID string `json:"id,omitempty"`
27-
Mode Mode `json:"mode,omitempty"`
28-
Name string `json:"name,omitempty"`
29-
Email string `json:"email,omitempty"`
30-
Locale Locale `json:"locale,omitempty"`
31-
Metadata map[string]interface{} `json:"metadata,omitempty"`
32-
CreatedAt *time.Time `json:"createdAt,omitempty"`
33-
Links CustomerLinks `json:"_links,omitempty"`
25+
Resource string `json:"resource,omitempty"`
26+
ID string `json:"id,omitempty"`
27+
Mode Mode `json:"mode,omitempty"`
28+
Name string `json:"name,omitempty"`
29+
Email string `json:"email,omitempty"`
30+
Locale Locale `json:"locale,omitempty"`
31+
Metadata interface{} `json:"metadata,omitempty"`
32+
CreatedAt *time.Time `json:"createdAt,omitempty"`
33+
Links CustomerLinks `json:"_links,omitempty"`
3434
}
3535

3636
// CustomersListOptions contains valid query parameters for the list customers endpoint.

mollie/subscriptions.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -32,26 +32,26 @@ type SubscriptionLinks struct {
3232

3333
// Subscription contains information about a customer subscription.
3434
type Subscription struct {
35-
Resource string `json:"resource,omitempty"`
36-
ID string `json:"id,omitempty"`
37-
MandateID string `json:"mandateId,omitempty"`
38-
Mode Mode `json:"mode,omitempty"`
39-
CreatedAT *time.Time `json:"createdAt,omitempty"`
40-
Status SubscriptionStatus `json:"status,omitempty"`
41-
Amount *Amount `json:"amount,omitempty"`
42-
Times int `json:"times,omitempty"`
43-
TimesRemaining int `json:"timesRemaining,omitempty"`
44-
Interval string `json:"interval,omitempty"`
45-
StartDate *ShortDate `json:"startDate,omitempty"`
46-
NextPaymentDate *ShortDate `json:"nextPaymentDate,omitempty"`
47-
Description string `json:"description,omitempty"`
48-
Method PaymentMethod `json:"method,omitempty"`
49-
CanceledAt *time.Time `json:"canceledAt,omitempty"`
50-
WebhookURL string `json:"webhookUrl,omitempty"`
51-
Metadata map[string]interface{} `json:"metadata,omitempty"`
52-
ApplicationFee *ApplicationFee `json:"applicationFee,omitempty"`
53-
TestMode bool `json:"testmode,omitempty"`
54-
Links SubscriptionLinks `json:"_links,omitempty"`
35+
Resource string `json:"resource,omitempty"`
36+
ID string `json:"id,omitempty"`
37+
MandateID string `json:"mandateId,omitempty"`
38+
Mode Mode `json:"mode,omitempty"`
39+
CreatedAT *time.Time `json:"createdAt,omitempty"`
40+
Status SubscriptionStatus `json:"status,omitempty"`
41+
Amount *Amount `json:"amount,omitempty"`
42+
Times int `json:"times,omitempty"`
43+
TimesRemaining int `json:"timesRemaining,omitempty"`
44+
Interval string `json:"interval,omitempty"`
45+
StartDate *ShortDate `json:"startDate,omitempty"`
46+
NextPaymentDate *ShortDate `json:"nextPaymentDate,omitempty"`
47+
Description string `json:"description,omitempty"`
48+
Method PaymentMethod `json:"method,omitempty"`
49+
CanceledAt *time.Time `json:"canceledAt,omitempty"`
50+
WebhookURL string `json:"webhookUrl,omitempty"`
51+
Metadata interface{} `json:"metadata,omitempty"`
52+
ApplicationFee *ApplicationFee `json:"applicationFee,omitempty"`
53+
TestMode bool `json:"testmode,omitempty"`
54+
Links SubscriptionLinks `json:"_links,omitempty"`
5555
}
5656

5757
// SubscriptionList describes the response for subscription list endpoints.

0 commit comments

Comments
 (0)