Skip to content

Commit

Permalink
Updating the request/response pojo with required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
rajagopal28 committed Jul 29, 2021
1 parent faa2af6 commit 11d6ce4
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions pricing_engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,25 @@ package pricingengine
// GeneratePricingRequest is used for generate pricing requests, it holds the
// inputs that are used to provide pricing for a given user.
type GeneratePricingRequest struct {
// TODO: populate me!
DateOfBirth string `json:"date_of_birth"`
InsuranceGroup string `json:"insurance_group"`
LicenseHeldSince string `json:"license_held_since"`
}

// GeneratePricingResponse - TODO: please document me :)
// GeneratePricingResponse - contains the list of all pricing generated for the request passed
// it typically has the input based on which the decision is taken
// IsEligible to indicate whether the user is eligible
// Message to state the reason for thich the Decline has happened
type GeneratePricingResponse struct {
// TODO: populate me!
input GeneratePricingRequest
IsEligible string `json:"is_eligible"`
Message string `json:"message"`
pricing_list []PricingItem `json:"pricing"`
}

// PricingItem - contains the pricing data generated for partucular group based on the request passed
type PricingItem struct {
Premium float64 `json:"premium"`
Currency string `json:"premium"`
FareGroup string `json:"fare_group"`
}

0 comments on commit 11d6ce4

Please sign in to comment.