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:
@@ -6,7 +6,7 @@ defmodule PolicyService.Aggregates.CarPolicyApplication do
|
||||
@valid_use_types ~w(private commercial bus taxi school)
|
||||
@valid_car_types ~w(sedan suv hatchback coupe convertible pickup van minivan truck)
|
||||
|
||||
def validate_details(%{
|
||||
def validate_insured_object(%{
|
||||
"plate" => plate,
|
||||
"make" => make,
|
||||
"model" => model,
|
||||
@@ -32,7 +32,7 @@ defmodule PolicyService.Aggregates.CarPolicyApplication do
|
||||
end
|
||||
end
|
||||
|
||||
def validate_details(%{
|
||||
def validate_insured_object(%{
|
||||
"plate" => plate,
|
||||
"make" => make,
|
||||
"model" => model,
|
||||
@@ -61,5 +61,5 @@ defmodule PolicyService.Aggregates.CarPolicyApplication do
|
||||
end
|
||||
end
|
||||
|
||||
def validate_details(_), do: {:error, :invalid_car_details}
|
||||
def validate_insured_object(_), do: {:error, :invalid_car_details}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user