File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
force-app/main/default/classes Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,10 @@ public with sharing class AdyenClient {
3838 httpReq .setMethod (' POST' );
3939 httpReq .setHeader (' X-API-KEY' , config .getApiKey ());
4040 httpReq .setHeader (' Content-Type' , ' application/json' );
41+ Integer timeout = config .getTimeout ();
42+ if (timeout != null ) {
43+ httpReq .setTimeout (timeout );
44+ }
4145 httpReq .setBody (request );
4246 return httpReq ;
4347 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ public with sharing class AdyenConfig {
1313 private String environment ;
1414 private String endpoint ;
1515 private String apiKey ;
16+ private Integer timeout ;
1617
1718 @namespaceAccessible
1819 public void setEnvironment (String environment ){
@@ -38,4 +39,14 @@ public with sharing class AdyenConfig {
3839 public String getApiKey (){
3940 return this .apiKey ;
4041 }
42+
43+ @namespaceAccessible
44+ public void setTimeout (Integer timeout ){
45+ this .timeout = timeout ;
46+ }
47+
48+ @namespaceAccessible
49+ public Integer getTimeout (){
50+ return this .timeout ;
51+ }
4152}
You can’t perform that action at this time.
0 commit comments