Class: Paymaster::Client
- Inherits:
-
Object
- Object
- Paymaster::Client
- Defined in:
- lib/paymaster/client.rb
Instance Attribute Summary collapse
-
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
-
#secret_key ⇒ Object
Returns the value of attribute secret_key.
Instance Method Summary collapse
- #generate_url(args) ⇒ Object
- #get_transaction(args) ⇒ Object
-
#initialize(merchant_id:, secret_key: nil) ⇒ Client
constructor
A new instance of Client.
- #refund(args) ⇒ Object
Constructor Details
#initialize(merchant_id:, secret_key: nil) ⇒ Client
Returns a new instance of Client.
6 7 8 9 |
# File 'lib/paymaster/client.rb', line 6 def initialize(merchant_id:, secret_key: nil) self.merchant_id = merchant_id self.secret_key = secret_key end |
Instance Attribute Details
#merchant_id ⇒ Object
Returns the value of attribute merchant_id.
3 4 5 |
# File 'lib/paymaster/client.rb', line 3 def merchant_id @merchant_id end |
#secret_key ⇒ Object
Returns the value of attribute secret_key.
4 5 6 |
# File 'lib/paymaster/client.rb', line 4 def secret_key @secret_key end |
Instance Method Details
#generate_url(args) ⇒ Object
11 12 13 |
# File 'lib/paymaster/client.rb', line 11 def generate_url(args) UrlGenerator.new(args.merge(client: self)).generate end |
#get_transaction(args) ⇒ Object
15 16 17 |
# File 'lib/paymaster/client.rb', line 15 def get_transaction(args) GetTransaction.new(args.merge(client: self)).perform end |