11package net .authorize .sample .RecurringBilling ;
22
3- import net .authorize .data .arb .*;
43import java .math .BigDecimal ;
54import net .authorize .Environment ;
6- import net .authorize .data .Customer ;
75import net .authorize .api .contract .v1 .*;
86import net .authorize .api .controller .base .ApiOperationBase ;
97import net .authorize .api .controller .ARBGetSubscriptionStatusController ;
1210public class GetSubscriptionStatus {
1311
1412 public static ANetApiResponse run (String apiLoginId , String transactionKey , String subscriptionId ) {
15- //Common code to set for all requests
13+ // Common code to set for all requests
1614 ApiOperationBase .setEnvironment (Environment .SANDBOX );
17- MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType () ;
15+ MerchantAuthenticationType merchantAuthenticationType = new MerchantAuthenticationType ();
1816 merchantAuthenticationType .setName (apiLoginId );
1917 merchantAuthenticationType .setTransactionKey (transactionKey );
2018 ApiOperationBase .setMerchantAuthentication (merchantAuthenticationType );
@@ -24,16 +22,14 @@ public static ANetApiResponse run(String apiLoginId, String transactionKey, Stri
2422 ARBGetSubscriptionStatusController controller = new ARBGetSubscriptionStatusController (apiRequest );
2523 controller .execute ();
2624 ARBGetSubscriptionStatusResponse response = controller .getApiResponse ();
27- if (response != null ) {
25+ if (response != null ) {
2826
2927 if (response .getMessages ().getResultCode () == MessageTypeEnum .OK ) {
3028
3129 System .out .println (response .getStatus ());
3230 System .out .println (response .getMessages ().getMessage ().get (0 ).getCode ());
3331 System .out .println (response .getMessages ().getMessage ().get (0 ).getText ());
34- }
35- else
36- {
32+ } else {
3733 System .out .println ("Failed to update Subscription: " + response .getMessages ().getResultCode ());
3834 }
3935 }
0 commit comments