@@ -12,42 +12,44 @@ public class TransferOptions {
1212 private final Boolean autoRenew ;
1313 private final Map <String , String > extendedAttributes ;
1414 private final String premiumPrice ;
15+ private final Boolean trusteeService ;
1516
16- private TransferOptions (Long registrantId , String authCode , Boolean whoisPrivacy , Boolean autoRenew , Map <String , String > extendedAttributes , String premiumPrice ) {
17+ private TransferOptions (Long registrantId , String authCode , Boolean whoisPrivacy , Boolean autoRenew , Map <String , String > extendedAttributes , String premiumPrice , Boolean trusteeService ) {
1718 this .registrantId = registrantId ;
1819 this .authCode = authCode ;
1920 this .whoisPrivacy = whoisPrivacy ;
2021 this .autoRenew = autoRenew ;
2122 this .extendedAttributes = extendedAttributes ;
2223 this .premiumPrice = premiumPrice ;
24+ this .trusteeService = trusteeService ;
2325 }
2426
2527 /**
2628 * @param registrantId The ID of an existing contact in your account.
2729 */
2830 public static TransferOptions of (Number registrantId ) {
29- return new TransferOptions (registrantId .longValue (), null , false , true , emptyMap (), null );
31+ return new TransferOptions (registrantId .longValue (), null , false , true , emptyMap (), null , null );
3032 }
3133
3234 /**
3335 * Set the authCode required for TLDS that require authorization-based transfer (the vast majority of TLDs).
3436 */
3537 public TransferOptions authCode (String authCode ) {
36- return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , extendedAttributes , premiumPrice );
38+ return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , extendedAttributes , premiumPrice , trusteeService );
3739 }
3840
3941 /**
4042 * Enable the whois privacy as part of the transfer. An extra cost may apply.
4143 */
4244 public TransferOptions whoisPrivacy () {
43- return new TransferOptions (registrantId , authCode , true , autoRenew , extendedAttributes , premiumPrice );
45+ return new TransferOptions (registrantId , authCode , true , autoRenew , extendedAttributes , premiumPrice , trusteeService );
4446 }
4547
4648 /**
4749 * Disable the auto-renewal of the domain.
4850 */
4951 public TransferOptions noAutoRenew () {
50- return new TransferOptions (registrantId , authCode , whoisPrivacy , false , extendedAttributes , premiumPrice );
52+ return new TransferOptions (registrantId , authCode , whoisPrivacy , false , extendedAttributes , premiumPrice , trusteeService );
5153 }
5254
5355 /**
@@ -57,13 +59,23 @@ public TransferOptions noAutoRenew() {
5759 public TransferOptions extendedAttribute (String name , String value ) {
5860 Map <String , String > newExtendedAttributes = new HashMap <>(extendedAttributes );
5961 newExtendedAttributes .put (name , value );
60- return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , newExtendedAttributes , premiumPrice );
62+ return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , newExtendedAttributes , premiumPrice , trusteeService );
6163 }
6264
6365 /**
6466 * Required as confirmation of the price, only if the domain is premium.
6567 */
6668 public TransferOptions premiumPrice (String premiumPrice ) {
67- return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , extendedAttributes , premiumPrice );
69+ return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , extendedAttributes , premiumPrice , trusteeService );
70+ }
71+
72+ /**
73+ * Enable trustee service as part of the domain transfer.
74+ *
75+ * <p>This parameter is optional; if you never call this method, the SDK will omit
76+ * {@code trustee_service} from the JSON request payload.</p>
77+ */
78+ public TransferOptions trusteeService () {
79+ return new TransferOptions (registrantId , authCode , whoisPrivacy , autoRenew , extendedAttributes , premiumPrice , true );
6880 }
6981}
0 commit comments