Skip to content

Commit

Permalink
Merge pull request #184 from stack11/fix/metadata-type
Browse files Browse the repository at this point in the history
Fix metadata type
  • Loading branch information
VictorAvelar authored May 9, 2022
2 parents a5af6ec + 6cd6f1a commit 9fae424
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
18 changes: 9 additions & 9 deletions mollie/customers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ type CustomerLinks struct {

// Customer represents buyers.
type Customer struct {
Resource string `json:"resource,omitempty"`
ID string `json:"id,omitempty"`
Mode Mode `json:"mode,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Locale Locale `json:"locale,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Links CustomerLinks `json:"_links,omitempty"`
Resource string `json:"resource,omitempty"`
ID string `json:"id,omitempty"`
Mode Mode `json:"mode,omitempty"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
Locale Locale `json:"locale,omitempty"`
Metadata interface{} `json:"metadata,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
Links CustomerLinks `json:"_links,omitempty"`
}

// CustomersListOptions contains valid query parameters for the list customers endpoint.
Expand Down
40 changes: 20 additions & 20 deletions mollie/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,26 +32,26 @@ type SubscriptionLinks struct {

// Subscription contains information about a customer subscription.
type Subscription struct {
Resource string `json:"resource,omitempty"`
ID string `json:"id,omitempty"`
MandateID string `json:"mandateId,omitempty"`
Mode Mode `json:"mode,omitempty"`
CreatedAT *time.Time `json:"createdAt,omitempty"`
Status SubscriptionStatus `json:"status,omitempty"`
Amount *Amount `json:"amount,omitempty"`
Times int `json:"times,omitempty"`
TimesRemaining int `json:"timesRemaining,omitempty"`
Interval string `json:"interval,omitempty"`
StartDate *ShortDate `json:"startDate,omitempty"`
NextPaymentDate *ShortDate `json:"nextPaymentDate,omitempty"`
Description string `json:"description,omitempty"`
Method PaymentMethod `json:"method,omitempty"`
CanceledAt *time.Time `json:"canceledAt,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
ApplicationFee *ApplicationFee `json:"applicationFee,omitempty"`
TestMode bool `json:"testmode,omitempty"`
Links SubscriptionLinks `json:"_links,omitempty"`
Resource string `json:"resource,omitempty"`
ID string `json:"id,omitempty"`
MandateID string `json:"mandateId,omitempty"`
Mode Mode `json:"mode,omitempty"`
CreatedAT *time.Time `json:"createdAt,omitempty"`
Status SubscriptionStatus `json:"status,omitempty"`
Amount *Amount `json:"amount,omitempty"`
Times int `json:"times,omitempty"`
TimesRemaining int `json:"timesRemaining,omitempty"`
Interval string `json:"interval,omitempty"`
StartDate *ShortDate `json:"startDate,omitempty"`
NextPaymentDate *ShortDate `json:"nextPaymentDate,omitempty"`
Description string `json:"description,omitempty"`
Method PaymentMethod `json:"method,omitempty"`
CanceledAt *time.Time `json:"canceledAt,omitempty"`
WebhookURL string `json:"webhookUrl,omitempty"`
Metadata interface{} `json:"metadata,omitempty"`
ApplicationFee *ApplicationFee `json:"applicationFee,omitempty"`
TestMode bool `json:"testmode,omitempty"`
Links SubscriptionLinks `json:"_links,omitempty"`
}

// SubscriptionList describes the response for subscription list endpoints.
Expand Down

0 comments on commit 9fae424

Please sign in to comment.