This repository has been archived by the owner on Oct 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Zenedith
committed
Nov 12, 2015
1 parent
aff090f
commit 45d08b7
Showing
11 changed files
with
447 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
var LotteryResultsCollectionResponse = function LotteryResultsCollectionResponse(total, results) { | ||
this.total = total; | ||
this.results = results; | ||
}; | ||
|
||
var LotteryResultsCollectionResponseBuilder = function LotteryResultsCollectionResponseBuilder() { | ||
this.total = null; | ||
this.results = null; | ||
|
||
var self = this; | ||
|
||
this.withTotal = function withTotal(total) { | ||
self.total = total; | ||
return self; | ||
}; | ||
|
||
this.withResults = function withResults(results) { | ||
self.results = results; | ||
return self; | ||
}; | ||
|
||
|
||
this.build = function build() { | ||
return new LotteryResultsCollectionResponse( | ||
self.total, | ||
self.results | ||
); | ||
}; | ||
|
||
}; | ||
|
||
module.exports = exports = { | ||
LotteryResultsCollectionResponse: LotteryResultsCollectionResponse, | ||
LotteryResultsCollectionResponseBuilder: LotteryResultsCollectionResponseBuilder | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
var ResultPrizeResponse = function ResultPrizeResponse(name, winners) { | ||
this.name = name; | ||
this.winners = winners; | ||
}; | ||
|
||
var ResultPrizeResponseBuilder = function ResultPrizeResponseBuilder() { | ||
this.name = null; | ||
this.winners = null; | ||
|
||
var self = this; | ||
|
||
this.withName = function withName(name) { | ||
self.name = name; | ||
return self; | ||
}; | ||
|
||
this.withWinners = function withWinners(winners) { | ||
self.winners = winners; | ||
return self; | ||
}; | ||
|
||
|
||
this.build = function build() { | ||
return new ResultPrizeResponse( | ||
self.name, | ||
self.winners | ||
); | ||
}; | ||
|
||
}; | ||
|
||
module.exports = exports = { | ||
ResultPrizeResponse: ResultPrizeResponse, | ||
ResultPrizeResponseBuilder: ResultPrizeResponseBuilder | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
var ResultPrizeWinnerResponse = function ResultPrizeWinnerResponse(code) { | ||
this.code = code; | ||
}; | ||
|
||
var ResultPrizeWinnerResponseBuilder = function ResultPrizeWinnerResponseBuilder() { | ||
this.code = null; | ||
|
||
var self = this; | ||
|
||
this.withCode = function withCode(code) { | ||
self.code = code; | ||
return self; | ||
}; | ||
|
||
|
||
this.build = function build() { | ||
return new ResultPrizeWinnerResponse( | ||
self.code | ||
); | ||
}; | ||
|
||
}; | ||
|
||
module.exports = exports = { | ||
ResultPrizeWinnerResponse: ResultPrizeWinnerResponse, | ||
ResultPrizeWinnerResponseBuilder: ResultPrizeWinnerResponseBuilder | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
var ResultResponse = function ResultResponse(name, date, status, prizes) { | ||
this.name = name; | ||
this.date = date; | ||
this.status = status; | ||
this.prizes = prizes; | ||
}; | ||
|
||
var ResultResponseBuilder = function ResultResponseBuilder() { | ||
this.name = null; | ||
this.date = null; | ||
this.status = null; | ||
this.prizes = null; | ||
|
||
var self = this; | ||
|
||
this.withName = function withName(name) { | ||
self.name = name; | ||
return self; | ||
}; | ||
|
||
this.withDate = function withDate(date) { | ||
self.date = date; | ||
return self; | ||
}; | ||
|
||
this.withStatus = function withStatus(status) { | ||
self.status = status; | ||
return self; | ||
}; | ||
|
||
this.withPrizes = function withPrizes(prizes) { | ||
self.prizes = prizes; | ||
return self; | ||
}; | ||
|
||
|
||
this.build = function build() { | ||
return new ResultResponse( | ||
self.name, | ||
self.date, | ||
self.status, | ||
self.prizes | ||
); | ||
}; | ||
|
||
}; | ||
|
||
module.exports = exports = { | ||
ResultResponse: ResultResponse, | ||
ResultResponseBuilder: ResultResponseBuilder | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.