Class: Rubyplat::Gateways::Gateway
- Inherits:
-
Object
- Object
- Rubyplat::Gateways::Gateway
- Defined in:
- lib/rubyplat/gateways/gateway.rb
Overview
Represents payment gateway for performing operations
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#pay_check_uri ⇒ Object
readonly
Returns the value of attribute pay_check_uri.
-
#pay_status_uri ⇒ Object
readonly
Returns the value of attribute pay_status_uri.
-
#pay_uri ⇒ Object
readonly
Returns the value of attribute pay_uri.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, number, pay_check_uri, pay_uri, pay_status_uri) ⇒ Gateway
constructor
A new instance of Gateway.
Constructor Details
#initialize(name, number, pay_check_uri, pay_uri, pay_status_uri) ⇒ Gateway
Returns a new instance of Gateway.
20 21 22 23 24 25 26 |
# File 'lib/rubyplat/gateways/gateway.rb', line 20 def initialize(name, number, pay_check_uri, pay_uri, pay_status_uri) @name = name @number = number @pay_check_uri = URI(pay_check_uri) @pay_uri = URI(pay_uri) @pay_status_uri = URI(pay_status_uri) end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
18 19 20 |
# File 'lib/rubyplat/gateways/gateway.rb', line 18 def name @name end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
18 19 20 |
# File 'lib/rubyplat/gateways/gateway.rb', line 18 def number @number end |
#pay_check_uri ⇒ Object (readonly)
Returns the value of attribute pay_check_uri.
18 19 20 |
# File 'lib/rubyplat/gateways/gateway.rb', line 18 def pay_check_uri @pay_check_uri end |
#pay_status_uri ⇒ Object (readonly)
Returns the value of attribute pay_status_uri.
18 19 20 |
# File 'lib/rubyplat/gateways/gateway.rb', line 18 def pay_status_uri @pay_status_uri end |
#pay_uri ⇒ Object (readonly)
Returns the value of attribute pay_uri.
18 19 20 |
# File 'lib/rubyplat/gateways/gateway.rb', line 18 def pay_uri @pay_uri end |
Class Method Details
.available ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rubyplat/gateways/gateway.rb', line 6 def self.available @available ||= [ ::Rubyplat::Gateways::Gateway.new( 'Тройка (Московский Метрополитен и Мосгортранс)', 3589, 'https://service.cyberplat.ru/cgi-bin/tc/tc_pay_check.cgi/3589', 'https://service.cyberplat.ru/cgi-bin/tc/tc_pay.cgi/3589', 'https://service.cyberplat.ru/cgi-bin/tc/tc_pay_status.cgi' ) ] end |