Class: Broke
- Inherits:
-
Object
show all
- Defined in:
- lib/broke.rb
Defined Under Namespace
Classes: Charge, Pingback, Subscription, Token
Constant Summary
collapse
- @@conn =
Faraday.new(:url => 'https://api.paymentwall.com/api') do |conn|
conn.request :url_encoded
conn.response :json, :content_type => 'application/json'
conn.adapter Faraday.default_adapter
end
Instance Method Summary
collapse
Constructor Details
#initialize(keys = {}) ⇒ Broke
6
7
8
9
|
# File 'lib/broke.rb', line 6
def initialize keys = {}
@@public_key = keys[:public_key]
@@private_key = keys[:private_key]
end
|
Instance Method Details
#charge ⇒ Object
21
22
23
|
# File 'lib/broke.rb', line 21
def charge
Charge.new
end
|
#pingback ⇒ Object
29
30
31
|
# File 'lib/broke.rb', line 29
def pingback
Pingback
end
|
#subscription ⇒ Object
25
26
27
|
# File 'lib/broke.rb', line 25
def subscription
Subscription.new
end
|
#token ⇒ Object
17
18
19
|
# File 'lib/broke.rb', line 17
def token
Token.new
end
|