Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/main/java/com/dnsimple/data/Domain.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Domain {
private final String state;
private final Boolean autoRenew;
private final Boolean privateWhois;
private final Boolean trusteeService;
private final Boolean trustee;
private final OffsetDateTime expiresAt;
private final OffsetDateTime createdAt;
private final OffsetDateTime updatedAt;
Expand All @@ -27,7 +27,7 @@ public Domain(
String state,
Boolean autoRenew,
Boolean privateWhois,
Boolean trusteeService,
Boolean trustee,
OffsetDateTime expiresAt,
OffsetDateTime createdAt,
OffsetDateTime updatedAt
Expand All @@ -41,7 +41,7 @@ public Domain(
this.state = state;
this.autoRenew = autoRenew;
this.privateWhois = privateWhois;
this.trusteeService = trusteeService;
this.trustee = trustee;
this.expiresAt = expiresAt;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
Expand Down Expand Up @@ -83,8 +83,8 @@ public Boolean hasPrivateWhois() {
return privateWhois;
}

public Boolean hasTrusteeService() {
return trusteeService;
public Boolean hasTrustee() {
return trustee;
}

public OffsetDateTime getExpiresAt() {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/dnsimple/data/DomainPrice.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ public class DomainPrice {
private final double registrationPrice;
private final double renewalPrice;
private final double transferPrice;
private final double trusteeServicePrice;
private final double trusteePrice;

public DomainPrice(String domain, boolean premium, double registrationPrice, double renewalPrice, double transferPrice, double trusteeServicePrice) {
public DomainPrice(String domain, boolean premium, double registrationPrice, double renewalPrice, double transferPrice, double trusteePrice) {
this.domain = domain;
this.premium = premium;
this.registrationPrice = registrationPrice;
this.renewalPrice = renewalPrice;
this.transferPrice = transferPrice;
this.trusteeServicePrice = trusteeServicePrice;
this.trusteePrice = trusteePrice;
}

public String getDomain() {
Expand All @@ -37,7 +37,7 @@ public double getTransferPrice() {
return transferPrice;
}

public double getTrusteeServicePrice() {
return trusteeServicePrice;
public double getTrusteePrice() {
return trusteePrice;
}
}
10 changes: 5 additions & 5 deletions src/main/java/com/dnsimple/data/DomainRegistration.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class DomainRegistration {
private final String state;
private final Boolean autoRenew;
private final Boolean whoisPrivacy;
private final Boolean trusteeService;
private final Boolean trustee;
private final OffsetDateTime createdAt;
private final OffsetDateTime updatedAt;

Expand All @@ -22,7 +22,7 @@ public DomainRegistration(
String state,
Boolean autoRenew,
Boolean whoisPrivacy,
Boolean trusteeService,
Boolean trustee,
OffsetDateTime createdAt,
OffsetDateTime updatedAt
) {
Expand All @@ -33,7 +33,7 @@ public DomainRegistration(
this.state = state;
this.autoRenew = autoRenew;
this.whoisPrivacy = whoisPrivacy;
this.trusteeService = trusteeService;
this.trustee = trustee;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
}
Expand Down Expand Up @@ -66,8 +66,8 @@ public Boolean hasWhoisPrivacy() {
return whoisPrivacy;
}

public Boolean hasTrusteeService() {
return trusteeService;
public Boolean hasTrustee() {
return trustee;
}

public OffsetDateTime getCreatedAt() {
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/dnsimple/data/DomainTransfer.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ public class DomainTransfer {
private final String state;
private final boolean autoRenew;
private final boolean whoisPrivacy;
private final boolean trusteeService;
private final boolean trustee;
private final String statusDescription;
private final String createdAt;
private final String updatedAt;

public DomainTransfer(Integer id, Integer domainId, Integer registrantId, String state, boolean autoRenew, boolean whoisPrivacy, boolean trusteeService, String statusDescription, String createdAt, String updatedAt) {
public DomainTransfer(Integer id, Integer domainId, Integer registrantId, String state, boolean autoRenew, boolean whoisPrivacy, boolean trustee, String statusDescription, String createdAt, String updatedAt) {
this.id = id;
this.domainId = domainId;
this.registrantId = registrantId;
this.state = state;
this.autoRenew = autoRenew;
this.whoisPrivacy = whoisPrivacy;
this.trusteeService = trusteeService;
this.trustee = trustee;
this.statusDescription = statusDescription;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
Expand Down Expand Up @@ -49,8 +49,8 @@ public boolean hasWhoisPrivacy() {
return whoisPrivacy;
}

public boolean hasTrusteeService() {
return trusteeService;
public boolean hasTrustee() {
return trustee;
}

public String getStatusDescription() {
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/com/dnsimple/request/RegistrationOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ public class RegistrationOptions {
private final boolean autoRenew;
private final Map<String, String> extendedAttributes;
private final String premiumPrice;
private final Boolean trusteeService;
private final Boolean trustee;

private RegistrationOptions(
Long registrantId,
boolean whoisPrivacy,
boolean autoRenew,
Map<String, String> extendedAttributes,
String premiumPrice,
Boolean trusteeService
Boolean trustee
) {
this.registrantId = registrantId;
this.whoisPrivacy = whoisPrivacy;
this.autoRenew = autoRenew;
this.extendedAttributes = extendedAttributes;
this.premiumPrice = premiumPrice;
this.trusteeService = trusteeService;
this.trustee = trustee;
}

/**
Expand All @@ -40,14 +40,14 @@ public static RegistrationOptions of(Number registrantId) {
* Enable the whois privacy as part of the transfer. An extra cost may apply.
*/
public RegistrationOptions whoisPrivacy() {
return new RegistrationOptions(registrantId, true, autoRenew, extendedAttributes, premiumPrice, trusteeService);
return new RegistrationOptions(registrantId, true, autoRenew, extendedAttributes, premiumPrice, trustee);
}

/**
* Disable the auto-renewal of the domain.
*/
public RegistrationOptions noAutoRenew() {
return new RegistrationOptions(registrantId, whoisPrivacy, false, extendedAttributes, premiumPrice, trusteeService);
return new RegistrationOptions(registrantId, whoisPrivacy, false, extendedAttributes, premiumPrice, trustee);
}

/**
Expand All @@ -57,23 +57,23 @@ public RegistrationOptions noAutoRenew() {
public RegistrationOptions extendedAttribute(String name, String value) {
Map<String, String> newExtendedAttributes = new HashMap<>(extendedAttributes);
newExtendedAttributes.put(name, value);
return new RegistrationOptions(registrantId, whoisPrivacy, autoRenew, newExtendedAttributes, premiumPrice, trusteeService);
return new RegistrationOptions(registrantId, whoisPrivacy, autoRenew, newExtendedAttributes, premiumPrice, trustee);
}

/**
* Required as confirmation of the price, only if the domain is premium.
*/
public RegistrationOptions premiumPrice(String premiumPrice) {
return new RegistrationOptions(registrantId, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trusteeService);
return new RegistrationOptions(registrantId, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trustee);
}

/**
* Enable trustee service as part of the domain registration.
* Enable trustee as part of the domain registration.
*
* <p>This parameter is optional; if you never call this method, the SDK will omit
* {@code trustee_service} from the JSON request payload.</p>
* {@code trustee} from the JSON request payload.</p>
*/
public RegistrationOptions trusteeService() {
public RegistrationOptions trustee() {
return new RegistrationOptions(registrantId, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, true);
}
}
22 changes: 11 additions & 11 deletions src/main/java/com/dnsimple/request/TransferOptions.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ public class TransferOptions {
private final Boolean autoRenew;
private final Map<String, String> extendedAttributes;
private final String premiumPrice;
private final Boolean trusteeService;
private final Boolean trustee;

private TransferOptions(Long registrantId, String authCode, Boolean whoisPrivacy, Boolean autoRenew, Map<String, String> extendedAttributes, String premiumPrice, Boolean trusteeService) {
private TransferOptions(Long registrantId, String authCode, Boolean whoisPrivacy, Boolean autoRenew, Map<String, String> extendedAttributes, String premiumPrice, Boolean trustee) {
this.registrantId = registrantId;
this.authCode = authCode;
this.whoisPrivacy = whoisPrivacy;
this.autoRenew = autoRenew;
this.extendedAttributes = extendedAttributes;
this.premiumPrice = premiumPrice;
this.trusteeService = trusteeService;
this.trustee = trustee;
}

/**
Expand All @@ -35,21 +35,21 @@ public static TransferOptions of(Number registrantId) {
* Set the authCode required for TLDS that require authorization-based transfer (the vast majority of TLDs).
*/
public TransferOptions authCode(String authCode) {
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trusteeService);
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trustee);
}

/**
* Enable the whois privacy as part of the transfer. An extra cost may apply.
*/
public TransferOptions whoisPrivacy() {
return new TransferOptions(registrantId, authCode, true, autoRenew, extendedAttributes, premiumPrice, trusteeService);
return new TransferOptions(registrantId, authCode, true, autoRenew, extendedAttributes, premiumPrice, trustee);
}

/**
* Disable the auto-renewal of the domain.
*/
public TransferOptions noAutoRenew() {
return new TransferOptions(registrantId, authCode, whoisPrivacy, false, extendedAttributes, premiumPrice, trusteeService);
return new TransferOptions(registrantId, authCode, whoisPrivacy, false, extendedAttributes, premiumPrice, trustee);
}

/**
Expand All @@ -59,23 +59,23 @@ public TransferOptions noAutoRenew() {
public TransferOptions extendedAttribute(String name, String value) {
Map<String, String> newExtendedAttributes = new HashMap<>(extendedAttributes);
newExtendedAttributes.put(name, value);
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, newExtendedAttributes, premiumPrice, trusteeService);
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, newExtendedAttributes, premiumPrice, trustee);
}

/**
* Required as confirmation of the price, only if the domain is premium.
*/
public TransferOptions premiumPrice(String premiumPrice) {
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trusteeService);
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, trustee);
}

/**
* Enable trustee service as part of the domain transfer.
* Enable trustee as part of the domain transfer.
*
* <p>This parameter is optional; if you never call this method, the SDK will omit
* {@code trustee_service} from the JSON request payload.</p>
* {@code trustee} from the JSON request payload.</p>
*/
public TransferOptions trusteeService() {
public TransferOptions trustee() {
return new TransferOptions(registrantId, authCode, whoisPrivacy, autoRenew, extendedAttributes, premiumPrice, true);
}
}
2 changes: 1 addition & 1 deletion src/test/java/com/dnsimple/endpoints/DomainsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public void testGetDomain() {
assertThat(domain.getState(), is("registered"));
assertThat(domain.hasAutoRenew(), is(false));
assertThat(domain.hasPrivateWhois(), is(false));
assertThat(domain.hasTrusteeService(), is(false));
assertThat(domain.hasTrustee(), is(false));
assertThat(domain.getExpiresAt(), is(OffsetDateTime.of(2021, 6, 5, 2, 15, 0, 0, UTC)));
assertThat(domain.getCreatedAt(), is(OffsetDateTime.of(2020, 6, 4, 19, 15, 14, 0, UTC)));
assertThat(domain.getUpdatedAt(), is(OffsetDateTime.of(2020, 6, 4, 19, 15, 21, 0, UTC)));
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/com/dnsimple/endpoints/RegistrarTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void testGetDomainPrices() {
assertThat(prices.getRegistrationPrice(), is(20.0));
assertThat(prices.getRenewalPrice(), is(20.0));
assertThat(prices.getTransferPrice(), is(20.0));
assertThat(prices.getTrusteeServicePrice(), is(20.0));
assertThat(prices.getTrusteePrice(), is(20.0));
}

@Test(expected = DnsimpleException.class)
Expand All @@ -70,7 +70,7 @@ public void testGetDomainRegistration() {
assertThat(registration.getState(), is("registering"));
assertThat(registration.hasAutoRenew(), is(false));
assertThat(registration.hasWhoisPrivacy(), is(false));
assertThat(registration.hasTrusteeService(), is(false));
assertThat(registration.hasTrustee(), is(false));
assertThat(registration.getCreatedAt(), is(OffsetDateTime.of(2023, 1, 27, 17, 44, 32, 0, UTC)));
assertThat(registration.getUpdatedAt(), is(OffsetDateTime.of(2023, 1, 27, 17, 44, 40, 0, UTC)));
}
Expand Down Expand Up @@ -106,7 +106,7 @@ public void testRegisterDomain() {
assertThat(registration.getState(), is("new"));
assertThat(registration.hasAutoRenew(), is(false));
assertThat(registration.hasWhoisPrivacy(), is(false));
assertThat(registration.hasTrusteeService(), is(false));
assertThat(registration.hasTrustee(), is(false));
assertThat(registration.getCreatedAt(), is(OffsetDateTime.of(2016, 12, 9, 19, 35, 31, 0, UTC)));
assertThat(registration.getUpdatedAt(), is(OffsetDateTime.of(2016, 12, 9, 19, 35, 31, 0, UTC)));
}
Expand Down Expand Up @@ -165,7 +165,7 @@ public void testGetDomainTransfer() {
assertThat(transfer.getState(), is("cancelled"));
assertThat(transfer.hasAutoRenew(), is(false));
assertThat(transfer.hasWhoisPrivacy(), is(false));
assertThat(transfer.hasTrusteeService(), is(false));
assertThat(transfer.hasTrustee(), is(false));
assertThat(transfer.getStatusDescription(), is("Canceled by customer"));
assertThat(transfer.getCreatedAt(), is("2020-06-05T18:08:00Z"));
assertThat(transfer.getUpdatedAt(), is("2020-06-05T18:10:01Z"));
Expand All @@ -184,7 +184,7 @@ public void testCancelDomainTransfer() {
assertThat(transfer.getState(), is("transferring"));
assertThat(transfer.hasAutoRenew(), is(false));
assertThat(transfer.hasWhoisPrivacy(), is(false));
assertThat(transfer.hasTrusteeService(), is(false));
assertThat(transfer.hasTrustee(), is(false));
assertThat(transfer.getStatusDescription(), isEmptyOrNullString());
assertThat(transfer.getCreatedAt(), is("2020-06-05T18:08:00Z"));
assertThat(transfer.getUpdatedAt(), is("2020-06-05T18:08:04Z"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ x-xss-protection: 1; mode=block
x-download-options: noopen
x-permitted-cross-domain-policies: none

{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
2 changes: 1 addition & 1 deletion src/test/resources/com/dnsimple/getDomain/success.http
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"trustee_service":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"}}
{"data":{"id":181984,"account_id":1385,"registrant_id":2715,"name":"example-alpha.com","unicode_name":"example-alpha.com","state":"registered","auto_renew":false,"private_whois":false,"trustee":false,"expires_on":"2021-06-05","expires_at":"2021-06-05T02:15:00Z","created_at":"2020-06-04T19:15:14Z","updated_at":"2020-06-04T19:15:21Z"}}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ x-permitted-cross-domain-policies: none
content-security-policy: frame-ancestors 'none'
strict-transport-security: max-age=31536000

{"data":{"domain":"bingo.pizza","premium":true,"registration_price":20.0,"renewal_price":20.0,"transfer_price":20.0,"restore_price":20.0,"trustee_service_price":20.0}}
{"data":{"domain":"bingo.pizza","premium":true,"registration_price":20.0,"renewal_price":20.0,"transfer_price":20.0,"restore_price":20.0,"trustee_price":20.0}}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":361,"domain_id":104040,"registrant_id":2715,"period":1,"state":"registering","auto_renew":false,"whois_privacy":false,"trustee_service":false,"created_at":"2023-01-27T17:44:32Z","updated_at":"2023-01-27T17:44:40Z"}}
{"data":{"id":361,"domain_id":104040,"registrant_id":2715,"period":1,"state":"registering","auto_renew":false,"whois_privacy":false,"trustee":false,"created_at":"2023-01-27T17:44:32Z","updated_at":"2023-01-27T17:44:40Z"}}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ x-download-options: noopen
x-permitted-cross-domain-policies: none
strict-transport-security: max-age=31536000

{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
{"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"trustee":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
Loading