/** * Returns if the user agreed to the terms of service. * * @return {@code true} if the user agreed to the terms of service. May be * {@code null} if the server did not provide such an information. */ @CheckForNull public Boolean getTermsOfServiceAgreed() { return getJSON().get(KEY_TOS_AGREED).map(Value::asBoolean).orElse(null); }
/** * Returns if the user agreed to the terms of service. * * @return {@code true} if the user agreed to the terms of service. May be * {@code null} if the server did not provide such an information. */ @CheckForNull public Boolean getTermsOfServiceAgreed() { return getJSON().get(KEY_TOS_AGREED).map(Value::asBoolean).orElse(null); }
/** * List of contact addresses (emails, phone numbers etc). */ public List<URI> getContacts() { return Collections.unmodifiableList(getJSON().get(KEY_CONTACT) .asArray() .stream() .map(JSON.Value::asURI) .collect(toList())); }
/** * List of contact addresses (emails, phone numbers etc). */ public List<URI> getContacts() { return Collections.unmodifiableList(getJSON().get(KEY_CONTACT) .asArray() .stream() .map(JSON.Value::asURI) .collect(toList())); }
/** * Returns the current status of the account. * <p> * Possible values are: {@link Status#VALID}, {@link Status#DEACTIVATED}, * {@link Status#REVOKED}. */ public Status getStatus() { return getJSON().get(KEY_STATUS).asStatus(); }
/** * Returns the current status of the account. * <p> * Possible values are: {@link Status#VALID}, {@link Status#DEACTIVATED}, * {@link Status#REVOKED}. */ public Status getStatus() { return getJSON().get(KEY_STATUS).asStatus(); }
/** * Returns an {@link Iterator} of all {@link Order} belonging to this {@link Account}. * <p> * Using the iterator will initiate one or more requests to the ACME server. * * @return {@link Iterator} instance that returns {@link Order} objects in no specific * order. {@link Iterator#hasNext()} and {@link Iterator#next()} may throw * {@link AcmeProtocolException} if a batch of authorization URIs could not be * fetched from the server. Each {@link Iterator} instance may provide the * {@link Order} objects in a different order. */ public Iterator<Order> getOrders() { URL ordersUrl = getJSON().get(KEY_ORDERS).asURL(); return new ResourceIterator<>(getLogin(), KEY_ORDERS, ordersUrl, Login::bindOrder); }
/** * Returns an {@link Iterator} of all {@link Order} belonging to this {@link Account}. * <p> * Using the iterator will initiate one or more requests to the ACME server. * * @return {@link Iterator} instance that returns {@link Order} objects in no specific * order. {@link Iterator#hasNext()} and {@link Iterator#next()} may throw * {@link AcmeProtocolException} if a batch of authorization URIs could not be * fetched from the server. Each {@link Iterator} instance may provide the * {@link Order} objects in a different order. */ public Iterator<Order> getOrders() { URL ordersUrl = getJSON().get(KEY_ORDERS).asURL(); return new ResourceIterator<>(getLogin(), KEY_ORDERS, ordersUrl, Login::bindOrder); }