]> git.basschouten.com Git - openhab-addons.git/blob
86b05e7f7d82644965af4797bc9b6c865923ddcd
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
7  * This program and the accompanying materials are made available under the
8  * terms of the Eclipse Public License 2.0 which is available at
9  * http://www.eclipse.org/legal/epl-2.0
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.sensibo.internal.dto.deletetimer;
14
15 import org.eclipse.jetty.http.HttpMethod;
16 import org.openhab.binding.sensibo.internal.dto.AbstractRequest;
17
18 /**
19  * All classes in the ..binding.sensibo.dto are data transfer classes used by the GSON mapper. This class reflects a
20  * part of a request/response data structure.
21  *
22  * @author Arne Seime - Initial contribution.
23  */
24 public class DeleteTimerRequest extends AbstractRequest {
25     public final transient String podId; // Transient fields are ignored by gson
26
27     public DeleteTimerRequest(String podId) {
28         this.podId = podId;
29     }
30
31     @Override
32     public String getRequestUrl() {
33         return String.format("/v1/pods/%s/timer/", podId);
34     }
35
36     @Override
37     public String getMethod() {
38         return HttpMethod.DELETE.asString();
39     }
40 }