Skip to content

Commit

Permalink
Merge branch 'master' into sathish/feature_exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Sathish1891 authored Nov 18, 2024
2 parents 17ab0ef + df283d7 commit f8a1d4d
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "15.1.2"
".": "16.0.0"
}
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@

* remove old term repository from base controller ([5402532](https://github.com/mxenabled/path-mdx-model/commit/5402532342b9c6b94f3c921ad025cc2b625a3b95))

## [16.0.0](https://github.com/mxenabled/path-mdx-model/compare/v15.2.0...v16.0.0) (2024-11-05)


### ⚠ BREAKING CHANGES

* restore interest_paid_previous_year and interest_paid_ytd

### Bug Fixes

* restore interest_paid_previous_year and interest_paid_ytd ([6b62abf](https://github.com/mxenabled/path-mdx-model/commit/6b62abf34d553208eab22e47001f9496d13cdecf))

## [15.2.0](https://github.com/mxenabled/path-mdx-model/compare/v15.1.2...v15.2.0) (2024-11-05)


### Features

* Business logic exception categorized as features ([017620c](https://github.com/mxenabled/path-mdx-model/commit/017620c6d61084aef87380913441db84a3fed698))
* rename insured_status to federal_insurance_status ([f6131e9](https://github.com/mxenabled/path-mdx-model/commit/f6131e95d3f9834f6ffc93cb7c195466546647f9))

## [15.1.2](https://github.com/mxenabled/path-mdx-model/compare/v15.1.1...v15.1.2) (2024-10-17)


Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ _Gradle_
<!-- x-release-please-start-version -->
```groovy
dependencies {
api platform("com.mx.path-mdx-model:platform:15.1.2")
api platform("com.mx.path-mdx-model:platform:16.0.0")
implementation "com.mx.path-mdx-model:mdx-models"
implementation "com.mx.path-mdx-model:mdx-gateways"
Expand All @@ -53,9 +53,9 @@ _Gradle_
<!-- x-release-please-start-version -->
```groovy
dependencies {
implementation "com.mx.path-mdx-model:mdx-models:15.1.2"
implementation "com.mx.path-mdx-model:mdx-gateways:15.1.2"
implementation "com.mx.path-mdx-model:realtime:15.1.2"
implementation "com.mx.path-mdx-model:mdx-models:16.0.0"
implementation "com.mx.path-mdx-model:mdx-gateways:16.0.0"
implementation "com.mx.path-mdx-model:realtime:16.0.0"
}
```
<!-- x-release-please-end -->
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id "io.github.gradle-nexus.publish-plugin" version "1.1.+"
}

version "15.1.2" // x-release-please-version
version "16.0.0" // x-release-please-version

def platformProject = "platform"
def publishedProjects = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.mx.path.model.mdx.accessor.feature;

/**
* ErrorDescriptor representing different error descriptors in the application.
* <p>
* This enum provides a centralized way to manage error descriptors used
* throughout the application. Each constant represents a specific error
* condition that may arise during application operations.
* </p>
* <p>
* Usage:
* <p>
* Use these constants to represent error conditions when throwing
* exceptions or logging errors, ensuring consistency across the application.
* </p>
*/
public enum ErrorDescriptor {
INSUFFICIENT_FUNDS,
ACCOUNT_NOT_FOUND,
UNKNOWN_ERROR;
// todo: All the expected ErrorDescriptors will be added here.

@Override
public String toString() {
return name();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,19 @@
* <p>
* To create a new feature-specific exception, extend this class and use the
* constructor to set the user message, feature, and error descriptor.
* To create a new feature-specific exception, extend this class and implement
* the {@code getFeatureName} method to return the corresponding feature name.
* Use the constructor to set the user message and error descriptor.
*/
public abstract class FeatureException extends PathRequestException {

private final Feature feature;
private final FeatureErrorDescriptor errorDescriptor;

protected FeatureException(String userMessage, Feature feature, FeatureErrorDescriptor errorDescriptor) {
private final ErrorDescriptor errorDescriptor;

protected FeatureException(String userMessage, Feature feature, ErrorDescriptor errorDescriptor) {
super(userMessage);
this.feature = feature;
this.errorDescriptor = errorDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.mx.path.core.common.request.Feature;
import com.mx.path.model.mdx.accessor.errorDescriptor.TransferErrorDescriptor;
import com.mx.path.model.mdx.accessor.feature.ErrorDescriptor;
import com.mx.path.model.mdx.accessor.feature.FeatureException;

/**
Expand All @@ -19,7 +20,9 @@ public class TransferException extends FeatureException {
* @param userMessage The message to be displayed to the user.
* @param errorDescriptor The error descriptor for this exception.
*/

public TransferException(String userMessage, TransferErrorDescriptor errorDescriptor) {
public TransferException(String userMessage, ErrorDescriptor errorDescriptor) {
super(userMessage, Feature.TRANSFERS, errorDescriptor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class Account extends MdxBase<Account> {
private String currencyCode;
@XmlElement(name = "day_payment_is_due")
private LocalDate dayPaymentIsDue;
@XmlElement(name = "federal_insurance_status")
private String federalInsuranceStatus;
@XmlElement(name = "guid")
private String guid;
@XmlElement(name = "has_monthly_transfer_limit")
Expand All @@ -41,6 +43,10 @@ public class Account extends MdxBase<Account> {
private BigDecimal holdTotal;
@XmlElement(name = "id")
private String id;
@XmlElement(name = "interest_paid_previous_year")
private Double interestPaidPreviousYear;
@XmlElement(name = "interest_paid_ytd")
private Double interestPaidYtd;
@XmlElement(name = "interest_rate")
private Double interestRate;
@XmlElement(name = "is_closed")
Expand Down Expand Up @@ -108,8 +114,6 @@ public class Account extends MdxBase<Account> {
private String subtype;
@XmlElement(name = "type")
private String type;
@XmlElement(name = "insured_status")
private String insuredStatus;

// --------------------------------------------------------
// Internal Fields
Expand Down Expand Up @@ -221,6 +225,14 @@ public final void setDayPaymentIsDue(LocalDate newDayPaymentIsDue) {
this.dayPaymentIsDue = newDayPaymentIsDue;
}

public final String getFederalInsuranceStatus() {
return federalInsuranceStatus;
}

public final void setFederalInsuranceStatus(String federalInsuranceStatus) {
this.federalInsuranceStatus = federalInsuranceStatus;
}

public final String getGuid() {
return guid;
}
Expand Down Expand Up @@ -253,6 +265,38 @@ public final void setId(String newId) {
this.id = newId;
}

/**
* @deprecated Use {@link #getFederalInsuranceStatus()} instead.
*/
@Deprecated
public final String getInsuredStatus() {
return federalInsuranceStatus;
}

/**
* @deprecated Use {@link #setFederalInsuranceStatus(String)} instead.
*/
@Deprecated
public final void setInsuredStatus(String insuredStatus) {
this.federalInsuranceStatus = insuredStatus;
}

public final Double getInterestPaidPreviousYear() {
return interestPaidPreviousYear;
}

public final void setInterestPaidPreviousYear(Double newInterestPaidPreviousYear) {
this.interestPaidPreviousYear = newInterestPaidPreviousYear;
}

public final Double getInterestPaidYtd() {
return interestPaidYtd;
}

public final void setInterestPaidYtd(Double newInterestPaidYtd) {
this.interestPaidYtd = newInterestPaidYtd;
}

public final Double getInterestRate() {
return interestRate;
}
Expand Down Expand Up @@ -517,14 +561,6 @@ public final void setType(String newType) {
this.type = newType;
}

public final String getInsuredStatus() {
return insuredStatus;
}

public final void setInsuredStatus(String insuredStatus) {
this.insuredStatus = insuredStatus;
}

// Internal Fields

public final String getAccountMICRNumber() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ public class CoreFields extends MdxBase<CoreFields> {
private Boolean hasCashSurrenderValue;
private Boolean hasCreditLimit;
private Boolean hasCurrencyCode;
private Boolean hasDailyDepositLimitCurrent;
private Boolean hasDailyDepositLimitTotal;
private Boolean hasDayPaymentIsDue;
private Boolean hasDeathBenefit;
private Boolean hasMonthlyTransferLimit;
Expand All @@ -38,10 +36,7 @@ public class CoreFields extends MdxBase<CoreFields> {
private Boolean hasMinimumBalance;
private Boolean hasMinimumPayment;
private Boolean hasMonthlyTransferCount;
private Boolean hasMonthlyDepositLimitCurrent;
private Boolean hasMonthlyDepositLimitTotal;
private Boolean hasName;
private Boolean hasNextPayment;
private Boolean hasNickname;
private Boolean hasOriginalBalance;
private Boolean hasPastDueAmount;
Expand All @@ -52,10 +47,8 @@ public class CoreFields extends MdxBase<CoreFields> {
private Boolean hasPendingBalance;
private Boolean hasPendingTransactionsTotal;
private Boolean hasPremiumAmount;
private Boolean hasPrincipalBalance;
private Boolean hasRoutingNumber;
private Boolean hasStartedDate;
private Boolean hasStatementBalance;
private Boolean hasStatementClosedOn;
private Boolean hasStatementLateCharges;
private Boolean hasSubtype;
Expand Down

0 comments on commit f8a1d4d

Please sign in to comment.