Create utility endpoint for currency conversion

This commit is contained in:
Moxie Marlinspike
2020-12-17 10:27:54 -08:00
committed by Moxie Marlinspike
parent 47916ecb0f
commit 2dbab70c8c
10 changed files with 515 additions and 9 deletions

View File

@@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.codec.DecoderException;
import org.apache.commons.codec.binary.Hex;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import java.util.List;
public class PaymentsServiceConfiguration {
@@ -17,8 +19,23 @@ public class PaymentsServiceConfiguration {
@JsonProperty
private String userAuthenticationTokenSharedSecret;
@NotEmpty
@JsonProperty
private String fixerApiKey;
@NotEmpty
@JsonProperty
private List<String> paymentCurrencies;
public byte[] getUserAuthenticationTokenSharedSecret() throws DecoderException {
return Hex.decodeHex(userAuthenticationTokenSharedSecret.toCharArray());
}
public String getFixerApiKey() {
return fixerApiKey;
}
public List<String> getPaymentCurrencies() {
return paymentCurrencies;
}
}