Create a new order fee
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/settings/ticketsales/orderfees
Example
Request
1use Ticketmatic\Endpoints\Settings\Ticketsales\Orderfees;
2
3$result = Orderfees::create($client, array(
4 "typeid" => 2401,
5 "name" => "Payment cost",
6 "rule" => array(
7 "auto" => array(
8 array(
9 "paymentscenarioids" => array(
10 2,
11 ),
12 "status" => "percentagefee",
13 "value" => 3,
14 ),
15 ),
16 ),
17));
Response
1object(\Ticketmatic\Model\OrderFee) (8) {
2 ["id"]=>
3 int(0)
4 ["typeid"]=>
5 int(0)
6 ["name"]=>
7 string(12) "Payment cost"
8 ["rule"]=>
9 object(\Ticketmatic\Model\OrderfeeRule) (1) {
10 ["auto"]=>
11 array(1) {
12 [0]=>
13 object(\Ticketmatic\Model\OrderfeeAutoRule) (3) {
14 ["paymentscenarioids"]=>
15 array(1) {
16 [0]=>
17 int(0)
18 }
19 ["status"]=>
20 string(13) "percentagefee"
21 ["value"]=>
22 float(3.000000)
23 }
24 }
25 }
26 ["isarchived"]=>
27 bool(false)
28 ["archivedts"]=>
29 object(\DateTime) (3) {
30 ["date"]=>
31 string(26) "2014-09-26 15:24:36.000000"
32 ["timezone_type"]=>
33 int(3)
34 ["timezone"]=>
35 string(3) "UTC"
36 }
37 ["createdts"]=>
38 object(\DateTime) (3) {
39 ["date"]=>
40 string(26) "2014-09-26 15:24:36.000000"
41 ["timezone_type"]=>
42 int(3)
43 ["timezone"]=>
44 string(3) "UTC"
45 }
46 ["lastupdatets"]=>
47 object(\DateTime) (3) {
48 ["date"]=>
49 string(26) "2014-09-26 15:24:36.000000"
50 ["timezone_type"]=>
51 int(3)
52 ["timezone"]=>
53 string(3) "UTC"
54 }
55}
Request body fields
Field | Description |
---|---|
typeid int (required) | Type of the order fee. Can be Automatic (2401), Script (2402) or Manual (2403) Example value:2401 |
name mlstring (required) | Name for the order fee Example value:"Payment cost" |
rule OrderfeeRule (required) | Definition of the rule that defines when the order fee will be applied Example value:{ "auto": [ { "paymentscenarioids": [ 2 ], "status": "percentagefee", "value": 3.000000 } ] } |
Type reference: OrderFee
Result fields
Field | Description |
---|---|
id int | Unique ID Example value:123 |
typeid int | Type of the order fee. Can be Automatic (2401), Script (2402) or Manual (2403) Example value:2401 |
name | Name for the order fee Example value:"Payment cost" |
rule | Definition of the rule that defines when the order fee will be applied Example value:{ "auto": [ { "paymentscenarioids": [ 2 ], "status": "percentagefee", "value": 3.000000 } ] } |
isarchived bool | Whether or not this item is archived |
archivedts timestamp | Archived timestamp Example value:"2014-09-26 15:24:36" |
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" |
Type reference: OrderFee