Error on compile cover time_based - has no member named 'set_close_duration'

Hi!
I want to set dynamically close duration using lambda call, but i get an error.
My relevant part is this:

cover:
  - platform: time_based
    device_class: gate
    name: "Gate"
    id: mygate

script:
  - id: close_script
    then:
      - lambda: |-
          auto call = id(mygate).make_call();
          # set attributes
          call.set_close_duration(65);
          call.perform();

When compile this i get error:

<unicode string>:158:9: error: invalid preprocessing directive #set
<unicode string>: In lambda function:
<unicode string>:159:12: error: 'class esphome::cover::CoverCall' has no member named 'set_close_duration'
*** [.pioenvs\poarta\src\main.cpp.o] Error 1

According with documentation, method ”set_close_duration” is public

How to solve this problem?
Thanks in advance!

The documentation you link is not for that class.

Ohhh, my mistake!!!
This is what happens when copy/paste code without thinking.
Thanks for help!