Skip to content

LnpOrder Class does not have getNotes() method #10

@MattDN93

Description

@MattDN93

The LnpOrder class does not have the same getNotes() method as the Order class. This is a problem because you cannot query notes on an LNPOrder since calling getNotes() for an Order that is not of type LNPOrder does not work.

Since the API endpoint supports calling /notes on the /orders/ and the /portIns/ resource, I fixed this by adding the same methods from the Order class to the LnpOrder class and changing the orderId and URI path before recompiling the SDK:

    public void addNote(Note note) throws Exception {
        client.put(client.buildAccountModelUri(new String[] { IrisPath.LNP_URI_PATH, orderId, "notes" }), note);
    }

    public Notes getNotes() throws Exception {
        return client.get(client.buildAccountModelUri(new String[] { IrisPath.LNP_URI_PATH, orderId, "notes" }), Notes.class);
    }

I'll add a PR and unit tests soon.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions