Skip to content

Commit

Permalink
Adding defaults for shop_id and api_key in entities
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanShamatov committed Oct 28, 2021
1 parent cb7ec67 commit 629eeaf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/yookassa/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module Yookassa
class Payment < Evil::Client
option :shop_id, proc(&:to_s)
option :api_key, proc(&:to_s)
option :shop_id, proc(&:to_s), default: proc { Yookassa.config.shop_id }
option :api_key, proc(&:to_s), default: proc { Yookassa.config.api_key }

path { "https://api.yookassa.ru/v3/payments" }
security { basic_auth shop_id, api_key }
Expand Down
4 changes: 2 additions & 2 deletions lib/yookassa/refund.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

module Yookassa
class Refund < Evil::Client
option :shop_id, proc(&:to_s)
option :api_key, proc(&:to_s)
option :shop_id, proc(&:to_s), default: proc { Yookassa.config.shop_id }
option :api_key, proc(&:to_s), default: proc { Yookassa.config.api_key }

path { "https://api.yookassa.ru/v3/refunds" }
security { basic_auth shop_id, api_key }
Expand Down

0 comments on commit 629eeaf

Please sign in to comment.