Skip to content

Commit

Permalink
SessionQueryResponseAdapter for easy querying session status with Kse…
Browse files Browse the repository at this point in the history
…fResultStream
  • Loading branch information
alapierre committed Oct 12, 2023
1 parent c0d0035 commit dc874cb
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package io.alapierre.ksef.client.iterator;

import io.alapierre.ksef.client.model.rest.auth.SessionStatus;
import lombok.RequiredArgsConstructor;

import java.util.List;

/**
* @author Adrian Lapierre {@literal [email protected]}
* Copyrights by original author 2023.10.12
*/
@RequiredArgsConstructor
public class SessionQueryResponseAdapter implements PageableResult<SessionStatus.InvoiceStatusList> {

private final SessionStatus sessionStatus;

@Override
public int getNumberOfElements() {
return sessionStatus.getNumberOfElements();
}

@Override
public int getPageSize() {
return sessionStatus.getPageSize();
}

@Override
public int getPageOffset() {
return sessionStatus.getPageOffset();
}

@Override
public List<SessionStatus.InvoiceStatusList> getItems() {
return sessionStatus.getInvoiceStatusList();
}
}

0 comments on commit dc874cb

Please sign in to comment.