Skip to content

Commit

Permalink
added 1.17.2 changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jadavpadma committed May 22, 2024
1 parent 8d715bf commit e0acd0c
Show file tree
Hide file tree
Showing 27 changed files with 2,804 additions and 2,115 deletions.
633 changes: 626 additions & 7 deletions openbanking-us.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
/*
* Open Banking
* OpenAPI specification for Finicity APIs. Open Banking solutions in the US are provided by Finicity, a Mastercard company.
*
* The version of the OpenAPI document: 1.17.1
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


package com.mastercard.openbanking.client.api;

import com.mastercard.openbanking.client.ApiException;
import com.mastercard.openbanking.client.model.ErrorMessage;
import com.mastercard.openbanking.client.model.InitiatedMicroDeposit;
import com.mastercard.openbanking.client.model.MicroDepositDetails;
import com.mastercard.openbanking.client.model.MicroDepositInitiation;
import com.mastercard.openbanking.client.model.MicroDepositVerification;
import com.mastercard.openbanking.client.test.BaseTest;
import com.mastercard.openbanking.client.test.ModelFactory;
import com.mastercard.openbanking.client.model.MicroDepositVerificationError;
import com.mastercard.openbanking.client.model.VerifiedMicroDeposit;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.util.Arrays;

import static org.junit.jupiter.api.Assertions.assertNotNull;


public class AccountValidationAssistanceApiTest extends BaseTest {

private static final AccountValidationAssistanceApi api = new AccountValidationAssistanceApi(apiClient);

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* API tests for AccountValidationAssistanceApi
*/
@Disabled
public class AccountValidationAssistanceApiTest {

private final AccountValidationAssistanceApi api = new AccountValidationAssistanceApi();

/**
* Get Micro Entries Details
*
* Fetch the micro entries details. `customerId` and `accountId` are the identifiers of the customer and account receiving the micro entries. _Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)
*
* @throws ApiException if the Api call fails
*/
@Test
public void initiateMicroAmountDepositsTest() {
try {
// GIVEN
String customerId = createTestCustomer();

// WHEN
var response = api.initiateMicroAmountDeposits(customerId, ModelFactory.newMicroDepositInitiation());

// THEN
assertNotNull(response);
assertNotNull(response.getAccountId());
} catch (ApiException e) {
fail(e);
}
public void getMicroDepositsDetailsTest() throws ApiException {
String customerId = null;
String accountId = null;
MicroDepositDetails response = api.getMicroDepositsDetails(customerId, accountId);
// TODO: test validations
}

/**
* Initiate Micro Entries
*
* Initiate the micro entries to customer's account. Two random micro amounts less than a dollar each will be deposited to provided customer's account. _Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)
*
* @throws ApiException if the Api call fails
*/
@Test
public void getMicroDepositsDetailsTest() {
try {
// GIVEN
String customerId = createTestCustomer();
var response = api.initiateMicroAmountDeposits(customerId, ModelFactory.newMicroDepositInitiation());
var accountId = response.getAccountId();

// WHEN
var details = api.getMicroDepositsDetails(customerId, accountId);

// THEN
assertNotNull(details);
assertNotNull(details.getStatus());
} catch (ApiException e) {
fail(e);
}
public void initiateMicroAmountDepositsTest() throws ApiException {
String customerId = null;
MicroDepositInitiation microDepositInitiation = null;
InitiatedMicroDeposit response = api.initiateMicroAmountDeposits(customerId, microDepositInitiation);
// TODO: test validations
}

/**
* Verify Micro Entries
*
* Verify the micro entries as received by customer in customer's account. Customer needs to verify the micro amounts received in customer's account. `customerId` and `accountId` are the identifiers of the customer and account receiving the micro entries. _Supported regions_: ![🇺🇸](https://flagcdn.com/20x15/us.png)
*
* @throws ApiException if the Api call fails
*/
@Test
public void verifyMicroAmountDepositsTest() {
try {
// GIVEN
String customerId = createTestCustomer();
var response = api.initiateMicroAmountDeposits(customerId, ModelFactory.newMicroDepositInitiation());
var accountId = response.getAccountId();
String status;
do {
var details = api.getMicroDepositsDetails(customerId, accountId);
status = details.getStatus();
} while (!"Completed".equals(status));

// WHEN
var verification = new MicroDepositVerification().amounts(Arrays.asList(0.01F, 0.02F));
var verifyResponse = api.verifyMicroAmountDeposits(customerId, accountId, verification);

// THEN
assertNotNull(verifyResponse);
assertNotNull(verifyResponse.getStatus());
} catch (ApiException e) {
fail(e);
}
public void verifyMicroAmountDepositsTest() throws ApiException {
String customerId = null;
String accountId = null;
MicroDepositVerification microDepositVerification = null;
VerifiedMicroDeposit response = api.verifyMicroAmountDeposits(customerId, accountId, microDepositVerification);
// TODO: test validations
}

private static String createTestCustomer() throws ApiException {
var customer = customersApi.addTestingCustomer(ModelFactory.newCustomer());
var customerId = customer.getId();
createdCustomerIds.add(customerId);
return customerId;
}
}
}
Loading

0 comments on commit e0acd0c

Please sign in to comment.