Search in sources :

Example 1 with MonetizationUsagePublishInfoDTO

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;
}
Also used : MonetizationUsagePublishInfoDTO(org.wso2.carbon.apimgt.rest.api.admin.v1.dto.MonetizationUsagePublishInfoDTO)

Aggregations

MonetizationUsagePublishInfoDTO (org.wso2.carbon.apimgt.rest.api.admin.v1.dto.MonetizationUsagePublishInfoDTO)1