Skip to content

Rename trustee JSON fields and refresh v2 API fixtures#252

Merged
juankuquintana merged 1 commit into
mainfrom
change/trustee-api-fields
May 4, 2026
Merged

Rename trustee JSON fields and refresh v2 API fixtures#252
juankuquintana merged 1 commit into
mainfrom
change/trustee-api-fields

Conversation

@juankuquintana
Copy link
Copy Markdown
Contributor

@juankuquintana juankuquintana commented May 1, 2026

Belongs to https://github.com/dnsimple/dnsimple-business/issues/2641

Rename trustee JSON fields and refresh v2 API fixtures

🔍 QA

From the rake console

// add to build.gradle
task runTestLocal(type: JavaExec) {
    group = 'application'
    mainClass = 'com.dnsimple.TestLocal'
    classpath = sourceSets.main.runtimeClasspath
}

package com.dnsimple;

import com.dnsimple.data.Domain;
import com.dnsimple.data.DomainPrice;
import com.dnsimple.data.DomainRegistration;
import com.dnsimple.data.Tld;
import com.dnsimple.request.RegistrationOptions;
import com.dnsimple.response.PaginatedResponse;
import com.dnsimple.response.SimpleResponse;

/**
 * From the {@code dnsimple-java} repository root:
 * <pre>
 *   1. ./gradlew runTestLocal
 * </pre>
 */
public final class TestLocal {

    private TestLocal() {
    }

    public static void main(String[] args) {
        String token = "dnsimpletest_a_FSYtfYn7p74jfPd3GBUUsnLoOXia8hkR";
        long accountId = 2L;
        long registrantId = 1L;
        String tldName = "com";
        String domainName = "asdf.com";
        String newDomainName = "javadomain";

        Client client = new Client.Builder()
                .apiBase("http://api.localhost:5000")
                .accessToken(token)
                .build();

        PaginatedResponse<Tld> list = client.tlds.listTlds();
        for (Tld t : list.getData()) {
            System.out.printf(
                    "tld=%s trustee_service_enabled=%s trustee_service_required=%s%n",
                    t.getTld(), t.isTrusteeServiceEnabled(), t.isTrusteeServiceRequired());
        }

        Tld tld = client.tlds.getTld(tldName).getData();
        System.out.printf(
                "tld=%s trustee_service_enabled=%s trustee_service_required=%s%n",
                tld.getTld(), tld.isTrusteeServiceEnabled(), tld.isTrusteeServiceRequired());

        Domain domain = client.domains.getDomain(accountId, domainName).getData();
        System.out.printf("domain=%s trustee=%s%n", domain.getName(), domain.hasTrustee());

        DomainPrice prices = client.registrar.getDomainPrices(accountId, domainName).getData();
        System.out.printf("prices domain=%s trustee_price=%s%n",
                prices.getDomain(), prices.getTrusteePrice());

        SimpleResponse<DomainRegistration> regResponse = client.registrar.registerDomain(
                accountId, newDomainName + ".com", RegistrationOptions.of(registrantId));
        DomainRegistration registration = regResponse.getData();
        System.out.printf("registration domain_id=%s trustee=%s%n",
                registration.getDomainId(), registration.hasTrustee());
    }
}

📋 Deployment Pre/Post tasks

:shipit: Deployment Verification

  • QAd

@juankuquintana juankuquintana self-assigned this May 1, 2026
@juankuquintana juankuquintana requested a review from lokst May 1, 2026 02:32
@juankuquintana juankuquintana merged commit 4017cae into main May 4, 2026
3 checks passed
@juankuquintana juankuquintana deleted the change/trustee-api-fields branch May 4, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants