Sha256: 276d017a6fbdada7c7a039620d6f51da787be1dc5653638e5c6a6353573bdd50

Contents?: true

Size: 660 Bytes

Versions: 1

Compression:

Stored size: 660 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_header:, file_path: nil)
        @client.download_file(url: url, content_header: content_header, file_path: file_path)
      end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
whatsapp_sdk-0.9.0 lib/whatsapp_sdk/api/request.rb