Documentation ¶
Index ¶
- func NewClient(accessToken string) *sling.Sling
- type Customer
- type CustomerList
- type CustomerPayment
- type CustomerRequest
- type CustomerService
- func (s *CustomerService) Create(customerBody *CustomerRequest) (Customer, *http.Response, error)
- func (s *CustomerService) Fetch(customerId string) (Customer, *http.Response, error)
- func (s *CustomerService) List(params *ListParams) (CustomerList, *http.Response, error)
- func (s *CustomerService) Payment(customerId string, paymentBody PaymentRequest) (CustomerPayment, *http.Response, error)
- func (s *CustomerService) PaymentList(customerId string, params *ListParams) (PaymentList, *http.Response, error)
- type ListLinks
- type ListMetadata
- type ListParams
- type Method
- type MethodList
- type MethodService
- type MollieError
- type Payment
- type PaymentLinks
- type PaymentList
- type PaymentRequest
- type PaymentService
- type Subscription
- type SubscriptionList
- type SubscriptionRequest
- type SubscriptionService
- func (s *SubscriptionService) Create(customerId string, subscriptionBody *SubscriptionRequest) (Subscription, *http.Response, error)
- func (s *SubscriptionService) Fetch(customerId string, subscriptionId string) (Subscription, *http.Response, error)
- func (s *SubscriptionService) List(customerId string, params *ListParams) (SubscriptionList, *http.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Customer ¶
type Customer struct { Resource string `json:"resource"` ID string `json:"id"` Mode string `json:"mode"` Name string `json:"name"` Email string `json:"email"` Locale string `json:"locale"` Metadata string `json:"metadata"` Methods []string `json:"recentlyUsedMethods"` CreatedAt time.Time `json:"createdDatetime"` }
Customer is a customer object https://www.mollie.com/nl/docs/reference/customers/get#response
type CustomerList ¶
type CustomerList struct { Data []*Customer `json:"data"` ListMetadata `bson:",inline"` }
CustomerList is a list of customer objects and list metadata https://www.mollie.com/nl/docs/reference/customers/list#response
type CustomerPayment ¶
type CustomerPayment struct { Resource string `json:"respurce"` ID string `json:"id"` Description string `json:"description"` Amount decimal.Decimal `json:"amount"` Mode string `json:"mode"` Method string `json:"method"` Status string `json:"status"` Locale string `json:"locale"` ProfileID string `json:"profileId"` CustomerID string `json:"customerId"` Metadata interface{} `json:"metadata"` Links PaymentLinks `json:"links"` }
CustomerPayment is a customer payment object https://www.mollie.com/nl/docs/reference/customers/get#response
type CustomerRequest ¶
type CustomerRequest struct { Name string `json:"name,omitempty"` Email string `json:"email,omitempty"` Locale string `json:"locale,omitempty"` Metadata interface{} `json:"metadata,omitempty"` }
CustomerRequest is a customer create request https://www.mollie.com/nl/docs/reference/customers/create#parameters
type CustomerService ¶
type CustomerService struct {
// contains filtered or unexported fields
}
CustomerService provides methods for accessing customer records.
func NewCustomerService ¶
func NewCustomerService(accessToken string) *CustomerService
NewCustomerService returns a new CustomerService.
func (*CustomerService) Create ¶
func (s *CustomerService) Create(customerBody *CustomerRequest) (Customer, *http.Response, error)
Create creates a new payment
func (*CustomerService) List ¶
func (s *CustomerService) List(params *ListParams) (CustomerList, *http.Response, error)
List returns all customers created.
func (*CustomerService) Payment ¶
func (s *CustomerService) Payment(customerId string, paymentBody PaymentRequest) (CustomerPayment, *http.Response, error)
Payment creates a new customer payment
func (*CustomerService) PaymentList ¶
func (s *CustomerService) PaymentList(customerId string, params *ListParams) (PaymentList, *http.Response, error)
PaymentList returns all customer payments created
type ListLinks ¶
type ListLinks struct { Previous string `json:"previous"` Next string `json:"next"` First string `json:"first"` Last string `json:"last"` }
ListLinks is a standard list links object for a resource list query
type ListMetadata ¶
type ListMetadata struct { TotalCount int `json:"totalCount"` Offset int `json:"offset"` Count int `json:"count"` Links ListLinks `json:"links"` }
ListMetadata is basic metadata for list queries
type ListParams ¶
ListParams are the params for any list request https://www.mollie.com/nl/docs/reference/payments/list#parameters
type Method ¶
type Method struct { ID string `json:"id"` Description string `json:"description"` Image struct { Normal string `json:"normal"` Bigger string `json:"bigger"` } `json:"image"` Amount struct { Minimum string `json:"minimum"` Maximum string `json:"maximum"` } `json:"amount"` }
Method is a payment method type https://www.mollie.com/nl/docs/reference/methods/get
type MethodList ¶
type MethodList struct { Data []*Method `json:"data"` ListMetadata `bson:",inline"` }
MethodList is a list of method objects and list metadata https://www.mollie.com/nl/docs/reference/methods/list#response
type MethodService ¶
type MethodService struct {
// contains filtered or unexported fields
}
MethodService provides methods for accessing payment methods.
func NewMethodService ¶
func NewMethodService(accessToken string) *MethodService
NewMethodService returns a new MethodService.
func (*MethodService) List ¶
func (s *MethodService) List() (MethodList, *http.Response, error)
List returns the methods available for payments
type MollieError ¶
type MollieError struct { Err struct { Type string `json:"type"` Message string `json:"message"` Field string `json:"field"` } `json:"error"` }
MollieError represents a Mollie API error response
type Payment ¶
type Payment struct { ID string `json:"id"` Description string `json:"description"` Amount decimal.Decimal `json:"amount"` Mode string `json:"mode"` Method string `json:"method"` Status string `json:"status"` Locale string `json:"locale"` ProfileID string `json:"profileId"` Metadata interface{} `json:"metadata"` Links PaymentLinks `json:"links"` }
Payment is a payment object https://www.mollie.com/nl/docs/reference/payments/get#response
type PaymentLinks ¶
type PaymentList ¶
type PaymentList struct { Data []*Payment `json:"data"` ListMetadata `bson:",inline"` }
PaymentList is a list of payment objects and list metadata https://www.mollie.com/nl/docs/reference/payments/list#response
type PaymentRequest ¶
type PaymentRequest struct { Amount decimal.Decimal `json:"amount,omitempty"` Description string `json:"description,omitempty"` RedirectUrl string `json:"redirectUrl,omitempty"` WebhookUrl string `json:"webhookUrl,omitempty"` Method string `json:"method,omitempty"` Locale string `json:"locale,omitempty"` RecurringType string `json:"recurringType,omitempty"` Metadata interface{} `json:"metadata,omitempty"` }
PaymentRequest is a payment request https://www.mollie.com/nl/docs/reference/payments/create
type PaymentService ¶
type PaymentService struct {
// contains filtered or unexported fields
}
PaymentService provides methods for creating and reading payments.
func NewPaymentService ¶
func NewPaymentService(accessToken string) *PaymentService
NewPaymentService returns a new PaymentService.
func (*PaymentService) Create ¶
func (s *PaymentService) Create(paymentBody *PaymentRequest) (Payment, *http.Response, error)
Creates a new payment
func (*PaymentService) List ¶
func (s *PaymentService) List(params *ListParams) (PaymentList, *http.Response, error)
List returns the accessible payments
type Subscription ¶
type Subscription struct { Resource string `json:"respurce"` ID string `json:"id"` Description string `json:"description"` Amount decimal.Decimal `json:"amount"` Interval string `json:"interval"` Times int `json:"times"` Mode string `json:"mode"` Method string `json:"method"` Status string `json:"status"` Locale string `json:"locale"` ProfileID string `json:"profileId"` CustomerID string `json:"customerId"` Metadata interface{} `json:"metadata"` CancelledAt time.Time `json:"cancelledDatetime"` CreatedAt time.Time `json:"createdDatetime"` Links PaymentLinks `json:"links"` }
Subscription is a subscription object https://www.mollie.com/nl/docs/reference/subscriptions/get#response
type SubscriptionList ¶
type SubscriptionList struct { Data []*Subscription `json:"data"` ListMetadata `bson:",inline"` }
SubscriptionList is a list of subscription objects and list metadata https://www.mollie.com/nl/docs/reference/subscriptions/list#response
type SubscriptionRequest ¶
type SubscriptionRequest struct { Amount decimal.Decimal `json:"amount,omitempty"` Times int `json:"times,omitempty"` Interval string `json:"interval,omitempty"` Method string `json:"method,omitempty"` Description string `json:"description,omitempty"` WebhookUrl string `json:"webhookUrl,omitempty"` }
SubscriptionRequest is a subscription create request https://www.mollie.com/nl/docs/reference/subscriptions/create#parameters
type SubscriptionService ¶
type SubscriptionService struct {
// contains filtered or unexported fields
}
SubscriptionService provides methods for accessing subscription records.
func NewSubscriptionService ¶
func NewSubscriptionService(accessToken string) *SubscriptionService
NewSubscriptionService returns a new SubscriptionService.
func (*SubscriptionService) Create ¶
func (s *SubscriptionService) Create(customerId string, subscriptionBody *SubscriptionRequest) (Subscription, *http.Response, error)
Create creates a new subscription
func (*SubscriptionService) Fetch ¶
func (s *SubscriptionService) Fetch(customerId string, subscriptionId string) (Subscription, *http.Response, error)
Fetch returns a created subscription
func (*SubscriptionService) List ¶
func (s *SubscriptionService) List(customerId string, params *ListParams) (SubscriptionList, *http.Response, error)
List returns all subscriptions created.