зеркало из
https://github.com/glebtv/yookassa.git
synced 2026-08-28 15:16:18 +03:00
43 строки
693 B
Ruby
43 строки
693 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "dry-struct"
|
|
require "forwardable"
|
|
require "yookassa/version"
|
|
require "yookassa/config"
|
|
require "yookassa/payments"
|
|
require "yookassa/refunds"
|
|
require "yookassa/receipts"
|
|
require "yookassa/webhooks"
|
|
|
|
module Yookassa
|
|
class << self
|
|
extend Forwardable
|
|
|
|
def configure
|
|
yield(config)
|
|
end
|
|
|
|
def config
|
|
@config ||= Config.new
|
|
end
|
|
|
|
def payments
|
|
@payments ||= Payments.new
|
|
end
|
|
|
|
def refunds
|
|
@refunds ||= Refunds.new
|
|
end
|
|
|
|
def receipts
|
|
@receipts ||= Receipts.new
|
|
end
|
|
|
|
def webhooks
|
|
@webhooks ||= Webhooks.new
|
|
end
|
|
end
|
|
end
|
|
|
|
require "yookassa/railtie" if defined?(Rails::Railtie)
|