Module: Yookassa
- Extended by:
- Forwardable
- Defined in:
- lib/yookassa.rb,
lib/yookassa/client.rb,
lib/yookassa/config.rb,
lib/yookassa/refunds.rb,
lib/yookassa/version.rb,
lib/yookassa/payments.rb,
lib/yookassa/entity/card.rb,
lib/yookassa/entity/error.rb,
lib/yookassa/entity/types.rb,
lib/yookassa/entity/amount.rb,
lib/yookassa/entity/refund.rb,
lib/yookassa/entity/payment.rb,
lib/yookassa/entity/transfer.rb,
lib/yookassa/entity/recipient.rb,
lib/yookassa/entity/confirmation.rb,
lib/yookassa/entity/payment_methods.rb,
lib/yookassa/entity/cancellation_details.rb,
lib/yookassa/entity/authorization_details.rb
Defined Under Namespace
Modules: Entity
Classes: Client, Config, Payments, Refunds
Constant Summary
collapse
- ConfigError =
Class.new(StandardError)
- VERSION =
"0.2.0"
Class Method Summary
collapse
Class Method Details
.client ⇒ Object
23
24
25
26
27
|
# File 'lib/yookassa.rb', line 23
def client
raise ConfigError, "Specify `shop_id` and `api_key` settins in a `.configure` block" if @config.nil?
@client ||= Client.new(shop_id: @config.shop_id, api_key: @config.api_key)
end
|
.config ⇒ Object
19
20
21
|
# File 'lib/yookassa.rb', line 19
def config
@config ||= Config.new
end
|
15
16
17
|
# File 'lib/yookassa.rb', line 15
def configure
yield(config)
end
|