Sha256: e0a1e8e85c8f5d43a39221b6f67cbeb6a6d8f86ba571a293f9b9d46fdbf3a308

Contents?: true

Size: 765 Bytes

Versions: 2

Compression:

Stored size: 765 Bytes

Contents

# typed: true
# frozen_string_literal: true

module WhatsappSdk
  module Api
    class Request
      extend T::Sig

      def initialize(client = WhatsappSdk.configuration.client)
        @client = client
      end

      def download_file(url:, content_type_header:, file_path: nil)
        @client.download_file(url: url, content_type_header: content_type_header, file_path: file_path)
      end

      def send_request(endpoint: nil, full_url: nil, http_method: "post", params: {}, headers: {}, multipart: false)
        @client.send_request(
          http_method: http_method,
          full_url: full_url,
          endpoint: endpoint,
          params: params,
          headers: headers,
          multipart: multipart
        )
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whatsapp_sdk-0.12.1 lib/whatsapp_sdk/api/request.rb
whatsapp_sdk-0.12.0 lib/whatsapp_sdk/api/request.rb