Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactors lottery and lottery results #10

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
151 changes: 93 additions & 58 deletions swagger/swagger-listing+prefrefact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,11 @@ paths:
'/Listing/LotteryResult/{listingID}/{lotteryNumber}':
get:
description: >-
This returns the Listing result - with 1 applicationResult inside this
is the Application with the appropriate lottery number. If no
lotteryNumber fits, applicationsResult will be empty. If listing
isIncorrect it will error.
This returns lottery results for a lottery number. If no lottery number is found it will return a not found response.
parameters:
- name: listingID
in: path
description: listingID for lottery
description: ID of listing
required: true
type: string
- name: lotteryNumber
Expand All @@ -188,6 +185,8 @@ paths:
description: An array of listing
schema:
$ref: '#/definitions/LotteryResult'
'404':
description: Lottery number not found
'/Listing/LotteryResult/{listingID}':
get:
description: >-
Expand All @@ -203,9 +202,10 @@ paths:
type: string
tags:
- Listing
deprecated: true
responses:
'200':
description: An array of listing
description: Lottery results for an application
schema:
$ref: '#/definitions/LotteryResult'
'/ListingDetails/{sfdcid}':
Expand Down Expand Up @@ -948,39 +948,49 @@ definitions:
Application_Phone__c:
type: string
description: ''
Lottery_Summary__c:
type: string
description: Summary of the Lottery Results.
In_Lottery__c:
type: integer
description: Number of applications in the lottery
Listing_Other_Notes__c:
type: string
description: Listing Other Notes.
Lottery_Results_Date__c:
type: string
format: date
description: Date Lottery Results are posted
Lottery_End__c:
LotteryResultsURL__c:
type: string
format: date-time
description: End of the Lottery - DateTime
Lottery_Start_Time__c:
description: Url of lottery results PDF
Lottery_City__c:
type: string
description: ''
Lottery_End_Time__c:
Lottery_Date__c:
type: string
description: ''
Lottery_Venue__c:
format: date-time
description: Date and time of lottery
Lottery_Results__c:
type: boolean
description: Indicates there is at least one lottery winner
Lottery_Results_Date__c:
type: string
description: ''
Lottery_Street_Address__c:
format: date
description: Date Lottery Results are posted
Lottery_Status__c:
type: string
description: ''
Lottery_City__c:
enum: ['Not Yet Run', 'In Progress', 'Lottery Complete']
description: Status of lottery
Lottery_Street_Address__c:
type: string
description: ''
Lottery_Date__c:
description: Street address of lottery location
Lottery_Venue__c:
type: string
format: date-time
description: ''
description: Location of lottery
Lottery_General_Pool:
type: object
description: Information about general pool of lottery
properties:
totalSubmittedApps:
type: integer
description: Total number of applications in the general lottery bucket
unitsAvailable:
type: integer
description: Total number of units available for general lottery
AMI_Percentage__c:
type: 'null'
description: ''
Expand Down Expand Up @@ -1020,15 +1030,6 @@ definitions:
Leasing_Agent_Zip__c:
type: string
description: ''
Lottery_Results__c:
type: boolean
description: Indicates there is at least one lottery winner
Lottery_Winners__c:
type: number
format: double
description: >-
Rollup sumary with Count of people who have been selected as winning
lottery and therefore, the status of their lottery member = Winner.
NeighborHoodPreferenceUrl__c:
type: string
description: neightborhood Preference URL
Expand Down Expand Up @@ -1076,9 +1077,6 @@ definitions:
description: >-
Detailed Information about other costs not included with rent.
Converted to text field from currency.
Lottery_Preferences__c:
type: string
description: ''
Program_Type__c:
type: string
description: ''
Expand Down Expand Up @@ -1319,6 +1317,46 @@ definitions:
type: string
description: 'Answer to question about disability: "Yes" or "No", defaults to blank.'
LotteryResult:
type: object
description: Lottery result for a lottery number
properties:
applicationID:
type: string
description: Id of application
listingID:
type: string
description: Id of listing
lotteryNumber:
type: string
description: Lottery number
lotteryRank:
type: integer
format: int32
description: Unfiltered lottery rank returned from drawing
lotteryPreferences:
type: array
items:
type: object
description: Application preferences for the applicant
properties:
listingPreferenceId:
type: string
preferenceName:
type: string
claimedPreference:
type: boolean
description: Whether or not the applicant claimed the preference on their application
receivesPreference:
type: boolean
description: Whether or not the applicant receives the preference in the lottery
preferenceRank:
type: integer
description: Applicant's ranking for the preference in the lottery
generalPoolRank:
type: integer
description: >-
Rank in general lottery if applicant did not qualify or claim any preferences
LotteryResultOld:
type: object
description: lottery result
properties:
Expand Down Expand Up @@ -1364,38 +1402,35 @@ definitions:
properties:
listingPreferenceID:
type: string
description: salesforce ID
description: Salesforce ID of listing preference
listingID:
type: string
description: listing salesforce ID
name:
type: string
description: preference
description: Salesforce ID of listing
preferenceName:
type: string
description: preference name
description: Name of listing preference
order:
type: number
description: order to display in
type: integer
description: Priority of the preference in relation to other preferences for the listing
pdfUrl:
type: string
description: pdf url
description: URL of a lottery results PDF for the preference
description:
type: string
description: description
description: Description of the listing preference
readMoreUrl:
type: string
format: url
description: readMore Url
NRHP District:
description: URL with more information about the preference
NRHPDistrict:
type: string
description: 'neighborhood district '
appTotal:
type: number
description: 'total number of people who have applied '
description: District used to qualify applicants for Neighborhood Resident Housing Preference
totalSubmittedApps:
type: integer
description: Total number of applications claiming and qualifying for listing preference
unitsAvailable:
type: number
description: 'total units available '
type: integer
description: Total number of units available for listing preference
ShortFormPreference:
type: object
description: Application preference
Expand Down