Skip to content

Commit

Permalink
chore(release): compile latest source & release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
lykmapipo committed Mar 25, 2021
1 parent 0ab04ec commit 3f8e339
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
#### 0.5.1 (2021-03-25)

##### Bug Fixes

* re-structure account response ([0ab04ec6](https://github.com/CodeTanzania/majifix-int-dawasco/commit/0ab04ec639e94055a7813c623f79db093bdef020))

#### 0.5.0 (2021-03-24)

##### Chores
Expand Down
16 changes: 14 additions & 2 deletions es/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,11 @@ const getAccount = (optns) => {
// spread api rsults
spread((account = {}, bills = []) => {
// prepare normalized account
const myAccount = {
let myAccount = {
account: {},
customer: {},
bills: [],
accessors: [],
fetchedAt: new Date(),
};

// merge account results
Expand All @@ -671,6 +670,19 @@ const getAccount = (optns) => {
myBills = orderBy([].concat(myBills), 'period.billedAt', 'desc');
myAccount.bills = myBills;

// re-shape results
myAccount = mergeObjects(
{},
myAccount.account,
{
accessors: myAccount.accessors,
bills: myAccount.bills,
},
{
fetchedAt: new Date(),
}
);

// return normalized account
return myAccount;
})
Expand Down
16 changes: 14 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -642,12 +642,11 @@ const getAccount = (optns) => {
// spread api rsults
httpClient.spread((account = {}, bills = []) => {
// prepare normalized account
const myAccount = {
let myAccount = {
account: {},
customer: {},
bills: [],
accessors: [],
fetchedAt: new Date(),
};

// merge account results
Expand All @@ -673,6 +672,19 @@ const getAccount = (optns) => {
myBills = lodash.orderBy([].concat(myBills), 'period.billedAt', 'desc');
myAccount.bills = myBills;

// re-shape results
myAccount = common.mergeObjects(
{},
myAccount.account,
{
accessors: myAccount.accessors,
bills: myAccount.bills,
},
{
fetchedAt: new Date(),
}
);

// return normalized account
return myAccount;
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codetanzania/majifix-int-dawasco",
"version": "0.5.0",
"version": "0.5.1",
"description": "DAWASCO - MajiFix Integration helpers",
"main": "lib/index.js",
"module": "es/index.js",
Expand Down

0 comments on commit 3f8e339

Please sign in to comment.