Class: Tinker::Payments
- Inherits:
-
Object
- Object
- Tinker::Payments
- Defined in:
- lib/tinker/payments.rb
Instance Method Summary collapse
-
#initialize(api_public_key:, api_secret_key:, http_client: nil) ⇒ Payments
constructor
A new instance of Payments.
- #transactions ⇒ Object
- #webhooks ⇒ Object
Constructor Details
#initialize(api_public_key:, api_secret_key:, http_client: nil) ⇒ Payments
Returns a new instance of Payments.
14 15 16 17 18 19 20 |
# File 'lib/tinker/payments.rb', line 14 def initialize(api_public_key:, api_secret_key:, http_client: nil) @config = Config::Configuration.new(api_public_key: api_public_key, api_secret_key: api_secret_key) @http_client = http_client || Http::HttpClient.new @auth_manager = Auth::AuthenticationManager.new(config: @config, http_client: @http_client) @transactions_manager = nil @webhook_handler = nil end |
Instance Method Details
#transactions ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/tinker/payments.rb', line 22 def transactions @transactions ||= Api::TransactionManager.new( config: @config, http_client: @http_client, auth_manager: @auth_manager ) end |
#webhooks ⇒ Object
30 31 32 |
# File 'lib/tinker/payments.rb', line 30 def webhooks @webhooks ||= Webhook::WebhookHandler.new end |