Sha256: 41d80bdeac373c3ef3eab745a3a434abda74dedd26145c227d2a79eff9d5c65d

Contents?: true

Size: 639 Bytes

Versions: 1

Compression:

Stored size: 639 Bytes

Contents

require "ya/api/direct/constants"
require "ya/api/direct/direct_service_base"

module Ya::API::Direct
  class DirectServiceV5 < DirectServiceBase
    attr_reader :service, :service_url

    def initialize(client, service, methods)
      super(client, methods)
      @service = service
      @service_url = service.downcase
      @version = :v5
    end

    def exec_request(method, request_body={})
      @client.gateway.request method, request_body, @service_url, @version
    end

    def callback_by_result(result={})
      if result.has_key? :units_data
        @client.update_units_data result[:units_data]
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ya-api-direct-0.2.2 lib/ya/api/direct/direct_service_v5.rb