3333/**
3434 * The type Payout recipients client.
3535 */
36- public class PayoutRecipientsClient {
36+ public class PayoutRecipientsClient implements ResourceClient {
3737
38+ private static PayoutRecipientsClient instance ;
3839 private final BitPayClient bitPayClient ;
3940 private final TokenContainer accessTokens ;
4041 private final GuidGenerator guidGenerator ;
@@ -46,7 +47,7 @@ public class PayoutRecipientsClient {
4647 * @param accessTokens the access tokens
4748 * @param guidGenerator the Guid generator
4849 */
49- public PayoutRecipientsClient (
50+ private PayoutRecipientsClient (
5051 BitPayClient bitPayClient ,
5152 TokenContainer accessTokens ,
5253 GuidGenerator guidGenerator
@@ -56,6 +57,26 @@ public PayoutRecipientsClient(
5657 this .guidGenerator = guidGenerator ;
5758 }
5859
60+ /**
61+ * Factory method for Bill Client.
62+ *
63+ * @param bitPayClient BitPay Client
64+ * @param accessTokens Access Tokens
65+ * @param guidGenerator Guid Generator
66+ * @return PayoutRecipientsClient
67+ */
68+ public static PayoutRecipientsClient getInstance (
69+ BitPayClient bitPayClient ,
70+ TokenContainer accessTokens ,
71+ GuidGenerator guidGenerator
72+ ) {
73+ if (Objects .isNull (instance )) {
74+ instance = new PayoutRecipientsClient (bitPayClient , accessTokens , guidGenerator );
75+ }
76+
77+ return instance ;
78+ }
79+
5980 /**
6081 * Submit BitPay Payout Recipients.
6182 *
0 commit comments