Class: WebpayBy::Client
- Inherits:
-
Object
- Object
- WebpayBy::Client
- Defined in:
- lib/webpay_by/client.rb
Instance Attribute Summary collapse
-
#billing_id ⇒ Object
readonly
Returns the value of attribute billing_id.
-
#debug_mode ⇒ Object
(also: #debug_mode?)
readonly
Returns the value of attribute debug_mode.
-
#login ⇒ Object
readonly
Returns the value of attribute login.
-
#password ⇒ Object
readonly
Returns the value of attribute password.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
Instance Method Summary collapse
- #confirmation(options) ⇒ Object
-
#initialize(billing_id:, secret_key:, debug_mode:, login:, password:) ⇒ Client
constructor
A new instance of Client.
- #request(options = {}) ⇒ Object
- #response(options = {}) ⇒ Object
Constructor Details
#initialize(billing_id:, secret_key:, debug_mode:, login:, password:) ⇒ Client
Returns a new instance of Client.
27 28 29 30 31 32 33 |
# File 'lib/webpay_by/client.rb', line 27 def initialize(billing_id:, secret_key:, debug_mode:, login:, password:) @billing_id = billing_id @secret_key = secret_key @debug_mode = debug_mode @login = login @password = Digest::MD5.hexdigest password end |
Instance Attribute Details
#billing_id ⇒ Object (readonly)
Returns the value of attribute billing_id.
23 24 25 |
# File 'lib/webpay_by/client.rb', line 23 def billing_id @billing_id end |
#debug_mode ⇒ Object (readonly) Also known as: debug_mode?
Returns the value of attribute debug_mode.
23 24 25 |
# File 'lib/webpay_by/client.rb', line 23 def debug_mode @debug_mode end |
#login ⇒ Object (readonly)
Returns the value of attribute login.
23 24 25 |
# File 'lib/webpay_by/client.rb', line 23 def login @login end |
#password ⇒ Object (readonly)
Returns the value of attribute password.
23 24 25 |
# File 'lib/webpay_by/client.rb', line 23 def password @password end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
23 24 25 |
# File 'lib/webpay_by/client.rb', line 23 def secret_key @secret_key end |
Instance Method Details
#confirmation(options) ⇒ Object
43 44 45 |
# File 'lib/webpay_by/client.rb', line 43 def confirmation() WebpayBy::Confirmation.new .merge client: self end |
#request(options = {}) ⇒ Object
35 36 37 |
# File 'lib/webpay_by/client.rb', line 35 def request( = {}) WebpayBy::Request.new .merge client: self end |
#response(options = {}) ⇒ Object
39 40 41 |
# File 'lib/webpay_by/client.rb', line 39 def response( = {}) WebpayBy::Response.new .merge client: self end |