Skip to content

Commit

Permalink
Set private modofier for hid.hydra.Account#put* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
dolfinus committed Feb 17, 2020
1 parent 4b84ec4 commit ac0ce83
Showing 1 changed file with 26 additions and 12 deletions.
38 changes: 26 additions & 12 deletions src/org/camunda/latera/bss/connectors/hid/hydra/Account.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ trait Account {
return putCustomerAccount(input + [accountId: accountId])
}

Boolean putAdjustment(Map input) {
private Boolean putAdjustment(Map input) {
LinkedHashMap params = mergeParams([
accountId : null,
docId : null,
Expand Down Expand Up @@ -340,7 +340,7 @@ trait Account {
return putAdjustment(input + [accountId: accountId])
}

Boolean putPermanentOverdraft(Map input) {
private Boolean putPermanentOverdraft(Map input) {
LinkedHashMap params = mergeParams([
accountId : null,
reasonId : getDefaultOverdraftReasonId(),
Expand All @@ -367,20 +367,20 @@ trait Account {
return putPermanentOverdraft(params.accountId, params.sum, params.reasonId)
}

Boolean putPermanentOverdraft(
Boolean addPermanentOverdraft(Map input, def accountId) {
return putPermanentOverdraft(input + [accountId: accountId])
}

Boolean addPermanentOverdraft(
def accountId,
Double sum = 0,
Double sum = 0,
def reasonId = getDefaultOverdraftReasonId()
) {
return putPermanentOverdraft(
return putPermanentOverdraft([
accountId : accountId,
sum : sum,
reasonId : reasonId
)
}

Boolean addPermanentOverdraft(Map input = [:], def accountId) {
return putPermanentOverdraft(input + [accountId: accountId])
])
}

Boolean deletePermanentOverdraft(def accountId) {
Expand All @@ -398,7 +398,7 @@ trait Account {
}
}

Boolean putTemporalOverdraft(Map input) {
private Boolean putTemporalOverdraft(Map input) {
LinkedHashMap params = mergeParams([
accountId : null,
sum : 0,
Expand Down Expand Up @@ -426,10 +426,24 @@ trait Account {
}
}

Boolean addTemporalOverdraft(Map input = [:], def accountId) {
Boolean addTemporalOverdraft(Map input, def accountId) {
return putTemporalOverdraft(input + [accountId: accountId])
}

Boolean addTemporalOverdraft(
def accountId,
Double sum = 0,
Temporal endDate = dayEnd(),
def reasonId = getDefaultOverdraftReasonId()
) {
return putTemporalOverdraft([
accountId : accountId,
sum : sum,
endDate : endDate,
reasonId : reasonId
])
}

Boolean deleteTemporalOverdraft(def accountId) {
try {
logger.info("Deleting temporal overdraft with params ${params}")
Expand Down

0 comments on commit ac0ce83

Please sign in to comment.