use of org.wso2.carbon.apimgt.rest.api.admin.v1.dto.MonetizationUsagePublishInfoDTO in project carbon-apimgt by wso2.
the class MonetizationAPIMappinUtil method fromUsageStateToDTO.
/**
* Set the info of monetization usage publisher to DTO of the monetization usage status
*
* @param info info about the monetization usage publisher job
* @return the DTO for monetization usage publish status
*/
public static MonetizationUsagePublishInfoDTO fromUsageStateToDTO(MonetizationUsagePublishInfo info) {
MonetizationUsagePublishInfoDTO monetizationUsagePublishInfo = new MonetizationUsagePublishInfoDTO();
monetizationUsagePublishInfo.setState(info.getState());
monetizationUsagePublishInfo.setStatus(info.getStatus());
monetizationUsagePublishInfo.setStartedTime(Long.toString(info.getStartedTime()));
monetizationUsagePublishInfo.setLastPublsihedTime(Long.toString(info.getLastPublishTime()));
return monetizationUsagePublishInfo;
}
Aggregations