module CoinsPaid::API
Constants
- ConnectionError
- Error
- InvalidSignatureError
- ProcessingError
- URL
Attributes
public_key[RW]
secret_key[RW]
Public Instance Methods
callback(request_body, headers)
click to toggle source
# File lib/coins_paid/api.rb, line 56 def callback(request_body, headers) Signature.check!( request_body: request_body, key: headers['X-Processing-Key'], signature: headers['X-Processing-Signature'] ) CallbackData.from_json(JSON.parse(request_body, symbolize_names: true)) end
configure() { |self| ... }
click to toggle source
# File lib/coins_paid/api.rb, line 34 def configure yield self end
currencies_list()
click to toggle source
# File lib/coins_paid/api.rb, line 52 def currencies_list CurrenciesList.call end
take_address(foreign_id:, currency:, convert_to:)
click to toggle source
# File lib/coins_paid/api.rb, line 38 def take_address(foreign_id:, currency:, convert_to:) Requester.call( TakeAddress, foreign_id: foreign_id, currency: currency, convert_to: convert_to ) end
withdraw(foreign_id:, amount:, currency:, convert_to:, address:)
click to toggle source
# File lib/coins_paid/api.rb, line 45 def withdraw(foreign_id:, amount:, currency:, convert_to:, address:) Requester.call( Withdrawal, foreign_id: foreign_id, amount: amount, currency: currency, convert_to: convert_to, address: address ) end