@@ -24,7 +24,6 @@ public class RequestOptions {
24
24
private final String TARGET_ENVIRONMENT ;
25
25
private final String CURRENCY ;
26
26
27
-
28
27
public RequestOptions (String COLLECTION_API_SECRET , String COLLECTION_PRIMARY_KEY , String COLLECTION_USER_ID , String REMITTANCE_USER_ID , String REMITTANCE_PRIMARY_KEY , String REMITTANCE_API_SECRET , String DISBURSEMENT_API_SECRET , String DISBURSEMENT_PRIMARY_KEY , String DISBURSEMENT_USER_ID , String BASE_URL , String TARGET_ENVIRONMENT , String CURRENCY ) {
29
28
30
29
this .COLLECTION_API_SECRET = COLLECTION_API_SECRET ;
@@ -49,6 +48,22 @@ public static Builder builder() {
49
48
return new Builder ();
50
49
}
51
50
51
+ public Builder toBuilder () {
52
+ return new Builder ()
53
+ .setCollectionPrimaryKey (this .COLLECTION_PRIMARY_KEY )
54
+ .setCollectionApiSecret (this .COLLECTION_API_SECRET )
55
+ .setCollectionUserId (this .COLLECTION_USER_ID )
56
+ .setCurrency (this .CURRENCY )
57
+ .setBaseUrl (this .BASE_URL )
58
+ .setTargetEnvironment (this .TARGET_ENVIRONMENT )
59
+ .setDisbursementApiSecret (this .DISBURSEMENT_API_SECRET )
60
+ .setDisbursementPrimaryKey (this .DISBURSEMENT_PRIMARY_KEY )
61
+ .setDisbursementUserId (this .DISBURSEMENT_USER_ID )
62
+ .setRemittanceApiSecret (this .REMITTANCE_API_SECRET )
63
+ .setRemittancePrimaryKey (this .REMITTANCE_PRIMARY_KEY )
64
+ .setRemittanceUserId (this .REMITTANCE_USER_ID );
65
+
66
+ }
52
67
53
68
public String getCollectionUserId () {
54
69
return this .COLLECTION_USER_ID ;
@@ -149,67 +164,113 @@ private static String normalizeKey(String key) {
149
164
return normalized ;
150
165
}
151
166
167
+ public String getCollectionPrimaryKey () {
168
+ return this .COLLECTION_PRIMARY_KEY ;
169
+ }
170
+
171
+ public Builder setCollectionPrimaryKey (String collectionPrimaryKey ) {
172
+ this .COLLECTION_PRIMARY_KEY = collectionPrimaryKey ;
173
+ return this ;
174
+ }
175
+
176
+ public String getCollectionUserId () {
177
+ return this .COLLECTION_USER_ID ;
178
+ }
152
179
153
180
public Builder setCollectionUserId (String collectionUserId ) {
154
181
this .COLLECTION_USER_ID = collectionUserId ;
155
182
return this ;
156
183
}
157
184
185
+ public String getCollectionApiSecret () {
186
+ return this .COLLECTION_API_SECRET ;
187
+ }
188
+
158
189
public Builder setCollectionApiSecret (String collectionApiSecret ) {
159
190
this .COLLECTION_API_SECRET = collectionApiSecret ;
160
191
return this ;
161
192
}
162
193
163
- public Builder setCollectionPrimaryKey (String collectionPrimaryKey ) {
164
- this .COLLECTION_PRIMARY_KEY = collectionPrimaryKey ;
194
+ public String getRemittancePrimaryKey () {
195
+ return this .REMITTANCE_PRIMARY_KEY ;
196
+ }
197
+
198
+ public Builder setRemittancePrimaryKey (String remittancePrimaryKey ) {
199
+ this .REMITTANCE_PRIMARY_KEY = remittancePrimaryKey ;
165
200
return this ;
166
201
}
167
202
203
+ public String getRemittanceUserId () {
204
+ return REMITTANCE_USER_ID ;
205
+ }
206
+
168
207
public Builder setRemittanceUserId (String remittanceUserId ) {
169
208
this .REMITTANCE_USER_ID = remittanceUserId ;
170
209
return this ;
171
210
}
172
211
212
+ public String getRemittanceApiSecret () {
213
+ return this .REMITTANCE_API_SECRET ;
214
+ }
215
+
173
216
public Builder setRemittanceApiSecret (String remittanceApiSecret ) {
174
217
this .REMITTANCE_API_SECRET = remittanceApiSecret ;
175
218
return this ;
176
219
}
177
220
178
- public Builder setRemittancePrimaryKey (String remittancePrimaryKey ) {
179
- this .REMITTANCE_PRIMARY_KEY = remittancePrimaryKey ;
221
+ public String getDisbursementPrimaryKey () {
222
+ return this .DISBURSEMENT_PRIMARY_KEY ;
223
+ }
224
+
225
+ public Builder setDisbursementPrimaryKey (String disbursementPrimaryKey ) {
226
+ this .DISBURSEMENT_PRIMARY_KEY = disbursementPrimaryKey ;
180
227
return this ;
181
228
}
182
229
230
+ public String getDisbursementUserId () {
231
+ return this .DISBURSEMENT_USER_ID ;
232
+ }
233
+
183
234
public Builder setDisbursementUserId (String disbursementUserId ) {
184
235
this .DISBURSEMENT_USER_ID = disbursementUserId ;
185
236
return this ;
186
237
}
187
238
239
+ public String getDisbursementApiSecret () {
240
+ return this .DISBURSEMENT_API_SECRET ;
241
+ }
242
+
188
243
public Builder setDisbursementApiSecret (String disbursementApiSecret ) {
189
244
this .DISBURSEMENT_API_SECRET = disbursementApiSecret ;
190
245
return this ;
191
246
}
192
247
193
- public Builder setDisbursementPrimaryKey (String disbursementPrimaryKey ) {
194
- this .DISBURSEMENT_PRIMARY_KEY = disbursementPrimaryKey ;
195
- return this ;
248
+ public String getBaseUrl () {
249
+ return this .BASE_URL ;
196
250
}
197
251
198
252
public Builder setBaseUrl (String url ) {
199
253
this .BASE_URL = url ;
200
254
return this ;
201
255
}
202
256
203
- public Builder setCurrency (String currency ) {
204
- this .CURRENCY = CURRENCY ;
205
- return this ;
257
+ public String getTargetEnvironment () {
258
+ return this .TARGET_ENVIRONMENT ;
206
259
}
207
260
208
261
public Builder setTargetEnvironment (String environment ) {
209
262
this .TARGET_ENVIRONMENT = environment ;
210
263
return this ;
211
264
}
212
265
266
+ public String getCurrency () {
267
+ return this .CURRENCY ;
268
+ }
269
+
270
+ public Builder setCurrency (String currency ) {
271
+ this .CURRENCY = currency ;
272
+ return this ;
273
+ }
213
274
214
275
public RequestOptions build () {
215
276
return new RequestOptions (
0 commit comments