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) (7) {
 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      ["isarchived"]=>
15      bool(false)
16      ["createdts"]=>
17      object(\DateTime) (3) {
18        ["date"]=>
19        string(26) "2014-09-26 15:24:36.000000"
20        ["timezone_type"]=>
21        int(3)
22        ["timezone"]=>
23        string(3) "UTC"
24      }
25      ["lastupdatets"]=>
26      object(\DateTime) (3) {
27        ["date"]=>
28        string(26) "2014-09-26 15:24:36.000000"
29        ["timezone_type"]=>
30        int(3)
31        ["timezone"]=>
32        string(3) "UTC"
33      }
34    }
35  }
36}

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            Isarchived: false,
 9            Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10            Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
11        },
12    },
13}

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            "isarchived": false,
12            "createdts": "2014-09-26 15:24:36",
13            "lastupdatets": "2014-09-26 15:24:36"
14        }
15    ]
16}

Parameters

FieldDescription
filter
        </td>
        <td class="description">
            <p>Filter the returned items by specifying a query on the public datamodel that returns the ids.</p> 
            <strong>Example value:</strong><code>&#34;SELECT id FROM tm.paymentmethod WHERE paymentmethodtypeid=1001&#34;</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">includearchived</div>
            
        </td>
        <td class="description">
            <p>If this parameter is true, archived items will be returned as well.</p> 
            <strong>Example value:</strong><code>true</code>
        </td>
    </tr><tr>
        <td class="field">
            <div class="name">lastupdatesince</div>
            
        </td>
        <td class="description">
            <p>All items that were updated since this timestamp will be returned. Timestamp should be passed in <code>YYYY-MM-DD hh:mm:ss</code> format.</p> 
            <strong>Example value:</strong><code>&#34;2014-09-26 15:24:36&#34;</code>
        </td>
    </tr>
</tbody>

Type reference: PaymentMethodQuery

Result fields

This call returns an object with an array of objects in the data field.

FieldDescription
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
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[]