Get a list of payment methods
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/paymentmethods
Example
Request
1use Ticketmatic\Endpoints\Settings\Ticketsales\Paymentmethods;
2
3$result = Paymentmethods::getlist($client, array(
4 "filter" => "SELECT id FROM tm.paymentmethod WHERE paymentmethodtypeid=1001",
5 "includearchived" => true,
6 "lastupdatesince" => "2014-09-26 15:24:36",
7));
8
9// The parameters array is optional, it can be omitted when empty.
10$result = Paymentmethods::getlist($client);
Response
1object(Ticketmatic\Endpoints\Settings\Ticketsales\PaymentmethodsList) (1) {
2 ["data"]=>
3 array(1) {
4 [0]=>
5 object(\Ticketmatic\Model\PaymentMethod) (8) {
6 ["id"]=>
7 int(0)
8 ["name"]=>
9 string(10) "Creditcard"
10 ["internalremark"]=>
11 string(19) "Processed by Mollie"
12 ["paymentmethodtypeid"]=>
13 int(0)
14 ["pspid"]=>
15 int(0)
16 ["isarchived"]=>
17 bool(false)
18 ["createdts"]=>
19 object(\DateTime) (3) {
20 ["date"]=>
21 string(26) "2014-09-26 15:24:36.000000"
22 ["timezone_type"]=>
23 int(3)
24 ["timezone"]=>
25 string(3) "UTC"
26 }
27 ["lastupdatets"]=>
28 object(\DateTime) (3) {
29 ["date"]=>
30 string(26) "2014-09-26 15:24:36.000000"
31 ["timezone_type"]=>
32 int(3)
33 ["timezone"]=>
34 string(3) "UTC"
35 }
36 }
37 }
38}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/settings/ticketsales/paymentmethods"
4)
5
6result, err := paymentmethods.Getlist(client, &ticketmatic.PaymentMethodQuery{
7 Filter: "SELECT id FROM tm.paymentmethod WHERE paymentmethodtypeid=1001",
8 Includearchived: true,
9 Lastupdatesince: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10})
11
12// The query object is optional, it can be omitted when empty.
13result, err := paymentmethods.Getlist(client, nil)
Response
1result := paymentmethods.&List{
2 Data: []*ticketmatic.PaymentMethod{
3 &ticketmatic.PaymentMethod{
4 Id: 123,
5 Name: "Creditcard",
6 Internalremark: "Processed by Mollie",
7 Paymentmethodtypeid: 1001,
8 Pspid: 10001,
9 Isarchived: false,
10 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
12 },
13 },
14}
Request
1GET /api/1/{accountname}/settings/ticketsales/paymentmethods HTTP/1.1
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "data": [
6 {
7 "id": 123,
8 "name": "Creditcard",
9 "internalremark": "Processed by Mollie",
10 "paymentmethodtypeid": 1001,
11 "pspid": 10001,
12 "isarchived": false,
13 "createdts": "2014-09-26 15:24:36",
14 "lastupdatets": "2014-09-26 15:24:36"
15 }
16 ]
17}
Parameters
Field | Description |
---|---|
filter
|
Type reference: PaymentMethodQuery
Result fields
This call returns an object with an array of objects in the data
field.
Field | Description |
---|---|
id int | Unique ID Example value:123 |
name | Name of the payment method Example value:"Creditcard" |
internalremark string | Internal remark, will not be shown to customers Example value:"Processed by Mollie" |
paymentmethodtypeid int | Type of the paymentmethod. For a list of possible types see here Example value:1001 |
pspid int | Payment Service Provider this payment method is linked to Example value:10001 |
isarchived bool | Whether or not this item is archived |
createdts timestamp | Created timestamp Example value:"2014-09-26 15:24:36" |
lastupdatets timestamp | Last updated timestamp Example value:"2014-09-26 15:24:36" |
This type can have custom fields.
Type reference: PaymentMethod[]