Skip to content

Commit f377e34

Browse files
authored
Update README.md
1 parent e15a170 commit f377e34

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ collections.getAccountBalance().subscribe(
6767
You can also consume error events in case of the API request failed.
6868
```java
6969
collections.createApiUser().subscribe(
70-
new Consumer<AccountBalance>() {
71-
@Override
72-
public void accept(AccountBalance accountBalance) { // This function executes in case of success.
70+
new Consumer<AccountBalance>() {
71+
@Override
72+
public void accept(AccountBalance accountBalance) { // This function executes in case of success.
7373
System.out.println(accountBalance.getAvailableBalance()); // 900
74-
}
75-
},
74+
}
75+
},
7676
new Consumer<Throwable>() {
7777
@Override
7878
public void accept(Throwable throwable) throws Exception { // This function executes in case of errors.
@@ -93,13 +93,13 @@ collections.getAccountBalance().subscribe(accountBalance -> { // This functi
9393

9494
```java
9595
collections.getAccountBalance().subscribe(
96-
accountBalance -> { // This function executes in case of success.
97-
System.out.println(accountBalance.getAvailableBalance()); // 900
98-
},
96+
accountBalance -> { // This function executes in case of success.
97+
System.out.println(accountBalance.getAvailableBalance()); // 900
98+
},
9999
throwable -> { // This function executes in case of error.
100-
RequestException e = (RequestException) throwable; // Cast the throwable to RequestException to get the HTTP code and message returned by the MoMo API.
101-
System.out.println(e.getCode()); // 401
102-
System.out.println(e.getMessage()); // Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.
100+
RequestException e = (RequestException) throwable; // Cast the throwable to RequestException to get the HTTP code and message returned by the MoMo API.
101+
System.out.println(e.getCode()); // 401
102+
System.out.println(e.getMessage()); // Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription.
103103
}
104104
);
105105
```
@@ -233,10 +233,10 @@ Documentation: https://momodeveloper.mtn.com/docs/services/collection/operations
233233

234234
```java
235235
collections.getRequestToPay(referenceId).subscribe(
236-
requestToPay -> {
237-
System.out.println(requestToPay.getFinancialTransactionId()); // 521734614
238-
System.out.println(requestToPay.getStatus()); // SUCCESSFUL
239-
}
236+
requestToPay -> {
237+
System.out.println(requestToPay.getFinancialTransactionId()); // 521734614
238+
System.out.println(requestToPay.getStatus()); // SUCCESSFUL
239+
}
240240
);
241241
```
242242

@@ -247,8 +247,8 @@ Documentation: https://momodeveloper.mtn.com/docs/services/collection/operations
247247

248248
```java
249249
collections.getAccountBalance().subscribe(accountBalance -> {
250-
System.out.println(accountBalance.getAvailableBalance()); // 900
251-
System.out.println(accountBalance.getCurrency()); // EUR
250+
System.out.println(accountBalance.getAvailableBalance()); // 900
251+
System.out.println(accountBalance.getCurrency()); // EUR
252252
});
253253
```
254254

0 commit comments

Comments
 (0)