Class: Client
- Inherits:
-
Object
- Object
- Client
- Defined in:
- lib/compropago_sdk/client.rb
Constant Summary collapse
- API_LIVE_URI =
'https://api.compropago.com/v1/'- API_SANDBOX_URI =
'https://api.compropago.com/v1/'- VERSION =
'3.0.4'
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#deploy_uri ⇒ Object
Returns the value of attribute deploy_uri.
-
#live ⇒ Object
Returns the value of attribute live.
-
#privatekey ⇒ Object
Returns the value of attribute privatekey.
-
#publickey ⇒ Object
Returns the value of attribute publickey.
Instance Method Summary collapse
- #get_pass ⇒ Object
- #get_user ⇒ Object
-
#initialize(publickey, privatekey, live) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(publickey, privatekey, live) ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/compropago_sdk/client.rb', line 10 def initialize(publickey, privatekey, live) @publickey = publickey @privatekey = privatekey @live = live if live @deploy_uri = API_LIVE_URI else @deploy_uri = API_SANDBOX_URI end @api = Service.new self end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
8 9 10 |
# File 'lib/compropago_sdk/client.rb', line 8 def api @api end |
#deploy_uri ⇒ Object
Returns the value of attribute deploy_uri.
8 9 10 |
# File 'lib/compropago_sdk/client.rb', line 8 def deploy_uri @deploy_uri end |
#live ⇒ Object
Returns the value of attribute live.
8 9 10 |
# File 'lib/compropago_sdk/client.rb', line 8 def live @live end |
#privatekey ⇒ Object
Returns the value of attribute privatekey.
8 9 10 |
# File 'lib/compropago_sdk/client.rb', line 8 def privatekey @privatekey end |
#publickey ⇒ Object
Returns the value of attribute publickey.
8 9 10 |
# File 'lib/compropago_sdk/client.rb', line 8 def publickey @publickey end |
Instance Method Details
#get_pass ⇒ Object
28 29 30 |
# File 'lib/compropago_sdk/client.rb', line 28 def get_pass @publickey end |
#get_user ⇒ Object
24 25 26 |
# File 'lib/compropago_sdk/client.rb', line 24 def get_user @privatekey end |