#frozen_string_literal: true

module {{spec.title | caseUcfirst}}
    class {{ service.name | caseUcfirst }} < Service

        def initialize(client)
            @client = client
        end

{% for method in service.methods %}
{{ method.description | rubyComment }}
        #
{% for parameter in method.parameters.all %}
        # @param [{{ parameter | typeName }}] {{ parameter.name | caseSnake | escapeKeyword }} {{ parameter.description | raw }}
{% endfor %}
        #
        # @return [{{ method.responseModel | caseUcfirst }}]
        def {{ method.name | caseSnake }}({% for parameter in method.parameters.all %}{{ parameter.name | caseSnake | escapeKeyword }}:{% if not parameter.required %} nil{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}{% if 'multipart/form-data' in method.consumes %}, on_progress: nil{% endif %})
{{ include('ruby/base/params.twig')}}
{% if 'multipart/form-data' in method.consumes %}
{{ include('ruby/base/requests/file.twig')}}
{% else %}
{{ include('ruby/base/requests/api.twig')}}
{% endif %}
        end

        
{% endfor %}
    end 
end