lib/root_insurance/api/policy.rb
# Update a policy.
# Currently, only updating the app_data object is supported
#
# @param [String] id The unique identifier of the policy
# @param [Hash] app_data An object containing additional custom data for the policy.
# @return [Hash]
#
# @example
#  app_data = {gadget_color: "Space Grey", has_screen_cover: true}
#  client.update_policy(id: "128ba0c0-3f6a-4f8b-9b40-e2066b02b59e", app_data: app_data)
#
Update a policy.
Currently, only updating the app_data object is supported
Update a policy . Currently only updating the app_data object is supported
def update_policy(id:, app_data:)
        data = {app_data: app_data}
        patch("policies/#{id}", data)
      end
def update_policy ( id : , app_data : ) data = { app_data : app_data } patch ( "policies/#{id}" , data ) end
Update a policy.
Update a policy .
None
Hash
id
<not_specific>
app_data
<not_specific>
<not_specific>
app_data An object containing additional custom data for the policy.
app_data An object containing additional custom data for the policy .
example
app_data = {gadget_color: "Space Grey", has_screen_cover: true} client.update_policy(id: "128ba0c0-3f6a-4f8b-9b40-e2066b02b59e", app_data: app_data)
app_data = { gadget_color : " Space Grey " has_screen_cover : true } client . update_policy ( id : " 128ba0c0 - 3f6a - 4f8b - 9b40 - e2066b02b59e " app_data : app_data )