Setting payment fields on transfer types via API

Any issue about Cyclos 4 scripting and Webservices

Moderators: hugo, alexandre, rmvanarkel

Post Reply
Joel.Wegman
Posts: 2
Joined: Mon Oct 28, 2019 4:45 pm

Setting payment fields on transfer types via API

Post by Joel.Wegman » Mon Oct 28, 2019 5:16 pm

screenshot.png
screenshot.png (104.02 KiB) Viewed 39 times
I need to be able to add/remove these via the API from an external application (i.e. not a script). In all other cases I've run into so far, this is just a matter of finding the correct DTO and Service, modifying the DTO, and passing it to the Service.save() method. Unfortunately, TransferTypeDTO and all of its subclasses are missing properties corresponding to payment fields.

EditTransferTypeData does have the RELATED_CUSTOM_FIELDS property, which has this information, so I can at least read this from the API. I can even modify that with EditTransferTypeData.setRelatedCustomFields(), but I don't see any way to save that back to the Cyclos server, since TransferTypeService.save() only takes TransferTypeDTOs.

Is there an API call that saves EditTransferTypeDatas? Is there some other way to do this?

Joel.Wegman
Posts: 2
Joined: Mon Oct 28, 2019 4:45 pm

Re: Setting payment fields on transfer types via API

Post by Joel.Wegman » Wed Oct 30, 2019 6:12 pm

This is also a problem with custom operations. CustomOperationData has a FORM_PARAMETERS property, but CustomOperationDTO doesn't.

Post Reply