Sha256: 490be63b604e4b9455422ceeae8a6628a95fc5c7d0f778585355730398e7cf5c
Contents?: true
Size: 1.49 KB
Versions: 22
Compression:
Stored size: 1.49 KB
Contents
require_relative './service' module Adyen {{#operations}} class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}} < Service attr_accessor :service, :version DEFAULT_VERSION = {{version}} def initialize(client, version = DEFAULT_VERSION) super(client, version, '{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}') end {{#operation}} def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}, {{/isQueryParam}}{{/requiredParams}}headers: {}{{#queryParams}}{{#-first}}, query_params: {}{{/-first}}{{/queryParams}}) endpoint = '{{path}}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint{{#pathParams}}{{#lambda.snakecase}}, {{paramName}}{{/lambda.snakecase}}{{/pathParams}}) {{#queryParams}}{{#-first}}endpoint += create_query_string(query_params){{/-first}}{{/queryParams}} action = { method: '{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}', url: endpoint } {{#bodyParams}} @client.call_adyen_api(@service, action, request, headers, @version) {{/bodyParams}} {{^bodyParams}} @client.call_adyen_api(@service, action, {}, headers, @version) {{/bodyParams}} end {{/operation}} {{/operations}} end end
Version data entries
22 entries across 22 versions & 1 rubygems