-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from lunasoft/release/sw-sdk-java_0.0.3.3
Release/sw sdk java 0.0.3.3
- Loading branch information
Showing
38 changed files
with
1,131 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
src/main/java/Services/BalanceAccount/SWBalanceAccountService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package Services.BalanceAccount; | ||
|
||
//@author: Lupita Alvarado | ||
|
||
import Exceptions.AuthException; | ||
import Exceptions.GeneralException; | ||
import Services.SWService; | ||
import Utils.Constants; | ||
import Utils.Requests.Authentication.AuthOptionsRequest; | ||
import Utils.Requests.Authentication.AuthRequest; | ||
import Utils.Requests.BalanceAccount.BalanceAcctOptionsRequest; | ||
import Utils.Requests.BalanceAccount.BalanceAcctRequest; | ||
import Utils.Responses.IResponse; | ||
|
||
|
||
public class SWBalanceAccountService extends SWService { | ||
|
||
public SWBalanceAccountService(String user, String password, String URI) { | ||
super(user, password, URI); | ||
} | ||
|
||
public SWBalanceAccountService(String token, String URI) { | ||
super(token, URI); | ||
} | ||
|
||
public IResponse GetBalanceAccount() throws AuthException, GeneralException { | ||
|
||
if (getToken()==null){ | ||
|
||
generateToken(); | ||
} | ||
|
||
//MAKE GET BALANCE ACCOUNT PROCESS, CUSTOMER ALREADY HAS TOKEN | ||
|
||
BalanceAcctOptionsRequest settings = new BalanceAcctOptionsRequest(getToken(),getURI()); | ||
|
||
BalanceAcctRequest req = new BalanceAcctRequest(); | ||
return req.sendRequest(settings); | ||
|
||
} | ||
} |
47 changes: 45 additions & 2 deletions
47
src/main/java/Services/Cancelation/SWCancelationService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,56 @@ | ||
package Services.Cancelation; | ||
|
||
import Exceptions.AuthException; | ||
import Exceptions.GeneralException; | ||
import Services.SWService; | ||
import Utils.Constants; | ||
import Utils.Requests.Authentication.AuthOptionsRequest; | ||
import Utils.Requests.Authentication.AuthRequest; | ||
import Utils.Requests.Cancelation.CancelationOptionsRequest; | ||
import Utils.Requests.Cancelation.CancelationRequest; | ||
import Utils.Responses.IResponse; | ||
|
||
|
||
|
||
public class SWCancelationService extends SWService { | ||
protected SWCancelationService(String user, String password, String URI) { | ||
|
||
public SWCancelationService(String user, String password, String URI) { | ||
super(user, password, URI); | ||
} | ||
|
||
protected SWCancelationService(String token, String URI) { | ||
public SWCancelationService(String token, String URI) { | ||
super(token, URI); | ||
} | ||
|
||
|
||
public IResponse Cancelation(String uuid, String password_csd, String rfc, String b64Cer, String b64Key) throws AuthException, GeneralException { | ||
|
||
if (getToken()==null){ | ||
generateToken(); | ||
} | ||
|
||
//MAKE CANCELATION PROCESS, CUSTOMER ALREADY HAS TOKEN | ||
|
||
CancelationOptionsRequest settings = new CancelationOptionsRequest(getToken(),getURI(),uuid, password_csd, rfc, b64Cer, b64Key); | ||
|
||
CancelationRequest req = new CancelationRequest(); | ||
return req.sendRequest(settings); | ||
|
||
} | ||
|
||
public IResponse Cancelation(String xml) throws AuthException, GeneralException { | ||
|
||
if (getToken()==null){ | ||
generateToken(); | ||
} | ||
|
||
//MAKE CANCELATION PROCESS, CUSTOMER ALREADY HAS TOKEN | ||
|
||
CancelationOptionsRequest settings = new CancelationOptionsRequest(getToken(),getURI(),xml); | ||
|
||
CancelationRequest req = new CancelationRequest(); | ||
return req.sendRequest(settings, true); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.