com.sinch.sdk.domains.verification.adapters.converters.LinkDtoConverter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sinch-sdk-java Show documentation
Show all versions of sinch-sdk-java Show documentation
SDK providing a Java API for the Sinch REST APIs.
package com.sinch.sdk.domains.verification.adapters.converters;
import com.sinch.sdk.core.http.HttpMethod;
import com.sinch.sdk.domains.verification.models.Link;
import com.sinch.sdk.domains.verification.models.LinkRelType;
import java.util.Collection;
import java.util.stream.Collectors;
public class LinkDtoConverter {
public static Collection convert(
Collection dto) {
return dto.stream().map(LinkDtoConverter::convert).collect(Collectors.toList());
}
public static Link convert(com.sinch.sdk.domains.verification.models.v1.start.response.Link dto) {
return Link.builder()
.setRel(LinkRelType.from(dto.getRel().value()))
.setHref(dto.getHref())
.setMethod(HttpMethod.valueOf(dto.getMethod()))
.build();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy