Skip to content

Commit

Permalink
Merge branch 'feat/remove-default-environment-configuration' of githu…
Browse files Browse the repository at this point in the history
…b.com:TransbankDevelopers/transbank-sdk-java into feat/remove-default-environment-configuration
  • Loading branch information
mvarlic committed Aug 21, 2024
2 parents f5a843c + 7f90601 commit 820c405
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions src/main/java/cl/transbank/model/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
/**
* This abstract class represents the options that can be set for a transaction.
*/
@NoArgsConstructor
@AllArgsConstructor
public abstract class Options implements Cloneable {

@Getter
Expand All @@ -18,46 +20,6 @@ public abstract class Options implements Cloneable {
@Getter
private IntegrationType integrationType;

@Setter
@Getter
private int timeout;

/**
* Constructs a new Options with the specified commerce code, API key, and integration type.
* @param commerceCode The commerce code.
* @param apiKey The API key.
* @param integrationType The integration type.
*/
protected Options(
String commerceCode,
String apiKey,
IntegrationType integrationType
) {
this.commerceCode = commerceCode;
this.apiKey = apiKey;
this.integrationType = integrationType;
this.timeout = ApiConstants.REQUEST_TIMEOUT;
}

/**
* Constructs a new Options with the specified commerce code, API key, integration type, and timeout.
* @param commerceCode The commerce code.
* @param apiKey The API key.
* @param integrationType The integration type.
* @param timeout The time in ms to wait for a response.
*/
protected Options(
String commerceCode,
String apiKey,
IntegrationType integrationType,
int timeout
) {
this.commerceCode = commerceCode;
this.apiKey = apiKey;
this.integrationType = integrationType;
this.timeout = timeout;
}

/**
* Builds the options for a transaction.
* @param options The options to set.
Expand All @@ -80,8 +42,6 @@ public Options buildOptions(Options options) {
if (null != options.getIntegrationType()) alt.setIntegrationType(
options.getIntegrationType()
);

alt.setTimeout(options.getTimeout());
}

return alt;
Expand Down

0 comments on commit 820c405

Please sign in to comment.