rename policy_details to insured_object
All checks were successful
Build and Publish / build-release (push) Successful in 1m36s
All checks were successful
Build and Publish / build-release (push) Successful in 1m36s
This commit is contained in:
@@ -5,7 +5,7 @@ defmodule PolicyService.Aggregates.LifePolicyApplication do
|
||||
|
||||
@valid_coverage_types ~w(banking protection)
|
||||
|
||||
def validate_details(%{
|
||||
def validate_insured_object(%{
|
||||
"coverage_type" => coverage_type,
|
||||
"coverage_amount" => coverage_amount,
|
||||
"coverage_years" => coverage_years,
|
||||
@@ -30,7 +30,7 @@ defmodule PolicyService.Aggregates.LifePolicyApplication do
|
||||
end
|
||||
end
|
||||
|
||||
def validate_details(_), do: {:error, :invalid_life_details}
|
||||
def validate_insured_object(_), do: {:error, :invalid_life_details}
|
||||
|
||||
def validate_insured(%{"type" => "corporate"}), do: {:error, :life_insurance_requires_individual}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user