Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ It has a fairly straightforward interface, essentially

::

mtd-cli init|init-creds|init-oauth|init-nino|bd|biss|bsas|cisd|ic|ical|icgi|id|idi|ie|iei|ifi|iipi|ilos|ioi|ipi|ir|isb|isi|ob|od|pb|saa|saass|said|seb|vat|test_cu|test_fph|test_sa
mtd-cli init|init-creds|init-oauth|init-nino|bd|biss|bsas|cisd|ic|ical|icgi|id|idi|ie|iei|ifi|iipi|ilos|ioi|ipi|ir|isb|isi|itla|ob|od|pb|saa|saass|said|seb|vat|test_cu|test_fph|test_sa

The first argument specifies the API to interface with

Expand Down
1 change: 1 addition & 0 deletions src/endpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern const struct _endpoint ipi_endpoint;
extern const struct _endpoint ir_endpoint;
extern const struct _endpoint isb_endpoint;
extern const struct _endpoint isi_endpoint;
extern const struct _endpoint itla_endpoint;
extern const struct _endpoint ob_endpoint;
extern const struct _endpoint od_endpoint;
extern const struct _endpoint pb_endpoint;
Expand Down
47 changes: 47 additions & 0 deletions src/mtd-cli-itla.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/* SPDX-License-Identifier: GPL-2.0 */

/*
* mtd-cli-itla.c - Make Tax Digital - Individuals Tax Liability Adjustments
*
* Copyright (C) 2026 Andrew Clayton <ac@sigsegv.uk>
*/

#include <stdbool.h>

#include <libmtdac/mtd.h>

#include "mtd-cli.h"

#define API itla

#define API_NAME "Individuals Tax Liability Adjustments"
#define CMDS \
"get update delete"

static const struct endpoint endpoints[] = {
{
.name = "get",
.api_ep = MTD_API_EP_ITLA_GET,
.nr_req_args = 1,
.args = "taxYear"
}, {
.name = "update",
.api_ep = MTD_API_EP_ITLA_UPDATE,
.nr_req_args = 2,
.file_data = true,
.args = "<file> taxYear"
}, {
.name = "delete",
.api_ep = MTD_API_EP_ITLA_DELETE,
.nr_req_args = 1,
.args = "taxYear"
},
Comment thread
ac000 marked this conversation as resolved.

{}
};

const struct _endpoint ENDPOINT = {
.endpoints = endpoints,
.api_name = API_NAME,
.cmds = CMDS
};
1 change: 1 addition & 0 deletions src/mtd-cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ static const struct api_ep {
EP_MAP_ENT(ir),
EP_MAP_ENT(isb),
EP_MAP_ENT(isi),
EP_MAP_ENT(itla),
EP_MAP_ENT(ob),
EP_MAP_ENT(od),
EP_MAP_ENT(pb),
Expand Down
Loading