Skip to content

Commit

Permalink
feat: move build method to inscription class
Browse files Browse the repository at this point in the history
  • Loading branch information
mvarlic committed Aug 21, 2024
1 parent 4f88464 commit f5a843c
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/main/java/cl/transbank/patpass/PatpassComercio.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ public static class Inscription extends PatpassComercioInscription {
public Inscription(Options options) {
super(options);
}
}

/**
* Creates and returns an instance of `Inscription` configured for the integration environment.
*
* @param commerceCode The commerce code.
* @param apiKey The API key used for authentication.
* @return A new instance of `Inscription` configured for the test environment (IntegrationType.TEST).
*/
public static Inscription buildForIntegration(String commerceCode, String apiKey)
{
return new Inscription(new PatpassOptions(commerceCode, apiKey, IntegrationType.TEST));
}
/**
* Creates and returns an instance of `Inscription` configured for the integration environment.
*
* @param commerceCode The commerce code.
* @param apiKey The API key used for authentication.
* @return A new instance of `Inscription` configured for the test environment (IntegrationType.TEST).
*/
public static Inscription buildForIntegration(String commerceCode, String apiKey)
{
return new Inscription(new PatpassOptions(commerceCode, apiKey, IntegrationType.TEST));
}

/**
* Creates and returns an instance of `Inscription` configured for the production environment.
*
* @param commerceCode The commerce code.
* @param apiKey The API key used for authentication.
* @return A new instance of `Inscription` configured for the production environment (IntegrationType.LIVE).
*/
public static Inscription buildForProduction(String commerceCode, String apiKey)
{
return new Inscription(new PatpassOptions(commerceCode, apiKey, IntegrationType.LIVE));
/**
* Creates and returns an instance of `Inscription` configured for the production environment.
*
* @param commerceCode The commerce code.
* @param apiKey The API key used for authentication.
* @return A new instance of `Inscription` configured for the production environment (IntegrationType.LIVE).
*/
public static Inscription buildForProduction(String commerceCode, String apiKey)
{
return new Inscription(new PatpassOptions(commerceCode, apiKey, IntegrationType.LIVE));
}
}

}

0 comments on commit f5a843c

Please sign in to comment.