Module: Bindup::ServiceCreator

Extended by:
ServiceMethods
Defined in:
lib/bindup/service_creator.rb

Constant Summary

Constants included from ServiceMethods

Bindup::ServiceMethods::METHODS_WITH_BODY, Bindup::ServiceMethods::METHODS_WITH_QUERY

Class Method Summary collapse

Class Method Details

.executeObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/bindup/service_creator.rb', line 8

def execute
  services = component_setup_keys
  components = component_setup

  services.each do |service|
    versions = components[service]["version"]
    service_module = create_service_module(components, service)

    versions.each do |version|
      version_class = create_version_class(service_module, version)

      api_endpoint(version_class, service, version)
      faraday_client(version_class)
      request(version_class)
      log_response_params(version_class)
      request_method_build(version_class)

      version_class.send(:set_api_endpoint_by_service)
      version_class.send(:set_api_endpoint_by_version)

      build_options(version_class)
      build_client(version_class)
      build_params(version_class)
      build_headers(version_class)
      api_methods(version_class, version)
      methods_as_alias(version_class)
      methods_as_private(version_class)
    end
  end
end