Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This document contains the Balance Collection (MongoDB) definition. We could see java objects and JSON schema for MongoDB.

Version Control

Version

Major Changes

Doc

1.0

  • Initial Data Structure

View file
nameMirrorBalance_DataStructure_v1.pdf

1.1

  • Se quitan los campos que se definieron como no usables para la colección de Balance

View file
nameMirrorBalance_DataStructure_v1.1.pdf

Sources

Fiserv- Endpoint List

  • /accounts/balance

  • /account/FL-balance

Account Balance Endpoint

  • Fiserv ednpointendpoint: /accounts/balance

  • Class: FiservRepository

  • Service: getAccountBalance

...

  • Collection Name: balances

  • Schema:

    Code Block
    languagejs
    db.createCollection("balances",{
      validator: {
        $jsonSchema: {
          bsonType: "object",
          description: "Balance bjectObject collectionCollection",
          required: [
            "accountOrCardNumberaccountNumber",
            "availableCreditLimit"],
          properties: {
    "organizationNumber",         "accountNumber"
          ],
          properties: {
            "organizationNumber": {
              bsonType: "string",
              description: "organizationaccount Number must be a string and is required"
            },
            "accountNumbercurrentBalance": {
              bsonType: "stringdouble",
              description: "accountcurrent Numberbalance must be a string and is requirednumber"
            },
            "accountOrCardNumberavailableCreditLimit": {
              bsonType: "stringdouble",
              description: "accountavailable orcredit card numberlimit must be a stringnumber and is required"
            },
            "availableCreditLimitopenToBuy": {
              bsonType: "doublelong",
              description: "availableopen creditto limitBuy must be a long number and is required"
            }
          }
     "currentBalance": {  }
      }
    });

Target (Java)

Code Block
languagejava
import lombok.Getter;

...

Target (Java)

Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Email;
import org.springframework.data.mongodb.core.mapping.Document;
// import org.springframework.data.mongodb.core.index.Indexed;

@Getter
@Setter
@Document(collection = "balances")
public class Balance {
  @Id
  private String id;

  @NotNull(message="account or card number is mandatory")
  private String accountOrCardNumber;

  private Double currentBalance;

  @NotNull(message="available credit limit is mandatory")
  private Double availableCreditLimit;

  private Double frozenBalance;

  private String historyDate;

  private String historyTime;

  private TransactionData transactionData;

  private Long transactionAmount;

  private String actionCode;

  private String authorizationCode;

  private String effectiveDate;

  private String description;

  private String paidConcept;

  private String memoPostedIndicator;

  private String suppressMonetaryTransaction;

  private String n1n2ByPass;

  private FalconIdentifier identifier;

  private String box;

  private String crPlaza;

  private String crStore;

  private String keyTracking;

  private String beneficiaryAccount;

  private String senderAccount;

  private String counterpartInstitution;

  private String operatingInstitution;

  private String frcUprkBeneficiary;

  private String orderingFrcUprk;

  private String device;

  private String ip;

  private Double latitude;

  private Double longitude;

  private String recipientName;

  private String orderingName;

  private String paymentSourceId;

}
Code Block
languagejava
import lombok.Getter;
import lombok.Setter;
import javax.validation.constraints.NotNullimport lombok.Setter;
import org.springframework.data.annotation.Id;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Email;
import org.springframework.data.mongodb.core.mapping.Document;
import org.bson.types.ObjectId;
import org.bson.codecs.pojo.annotations.BsonProperty;

@Getter
@Setter
@Document(collection = "balances")
public class TransactionDataBalance {
  @Id
  @NotNull@BsonProperty(message="transaction Code is mandatory"_id")
  private StringObjectId transactionCodeid;
   private StringDouble transactionDescriptionavailableCreditLimit;
   @NotNull(message="current Balance is mandatory")
  private LongDouble currentBalance;

  @NotNull(message="openaccount toor Buycard limitnumber is mandatory")
  private LongString openToBuyaccountOrCardNumber;

}

Data Structure for Account Mirror

...