From fa9879ee97ae287e7eff7e6b17c0eab8a40db00f Mon Sep 17 00:00:00 2001 From: Valov Date: Sat, 23 Nov 2024 00:14:54 -0300 Subject: [PATCH] Fix requests --- lib/yookassa/client.rb | 4 ++-- lib/yookassa/version.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/yookassa/client.rb b/lib/yookassa/client.rb index 1522405..01f0d66 100644 --- a/lib/yookassa/client.rb +++ b/lib/yookassa/client.rb @@ -13,9 +13,9 @@ def initialize(shop_id: Yookassa.config.shop_id, api_key: Yookassa.config.api_ke @http = HTTP.headers(accept: "application/json") if shop_id && api_key - @http.basic_auth(user: shop_id, pass: api_key) + @http = http.basic_auth(user: shop_id, pass: api_key) elsif oauth_token - @http.headers("Authorization" => "Bearer #{oauth_token}") + @http = http.headers("Authorization" => "Bearer #{oauth_token}") else message = "Specify `shop_id` and `api_key` settings in a `.configure` block " \ "or pass `oauth_token` to a client" diff --git a/lib/yookassa/version.rb b/lib/yookassa/version.rb index 08c1f0e..6c599b4 100644 --- a/lib/yookassa/version.rb +++ b/lib/yookassa/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Yookassa - VERSION = "0.2.0" + VERSION = "0.2.1" end