def parse(response)
      if response.is_a? Hash
        response.each_with_object({}) do |(key, value), new_hash|
          new_hash[camel_case_to_snake_case(key).to_sym] = parse(value)
        end
      elsif response.is_a? Array
        response.map { |item| parse item }
      else
        response
      end
    end
def parse(response)
      if response.is_a? Hash
        response.each_with_object({}) do |(key, value), new_hash|
          new_hash[camel_case_to_snake_case(key).to_sym] = parse(value)
        end
      elsif response.is_a? Array
        response.map { |item| parse item }
      else
        response
      end
    end
Parses the specified value that was returned from a call to the IG Markets API.

 @param [Hash, Array, Object] response The response or part of a response that should be parsed. If this is of type
        `Hash` then all hash keys will converted from camel case into snake case and their values will each be
        parsed individually by a recursive call. If this is of type `Array` then each item will be parsed
        individually by a recursive call. All other types are passed through unchanged.

 @return [Hash, Array, Object] The parsed object, the type depends on the type of the `response` parameter.