Class: YaKassa::V3::Router
- Inherits:
-
Object
- Object
- YaKassa::V3::Router
- Defined in:
- lib/ya_kassa/v3/router.rb
Constant Summary collapse
- ENDPOINT =
'https://payment.yandex.net/api/v3/'
- PATH =
{ payments: 'payments', refunds: 'refunds', receipts: 'receipts' }
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Router
constructor
A new instance of Router.
- #payment_cancel_url ⇒ Object
- #payment_confirmation_url ⇒ Object
- #payment_status_url ⇒ Object
- #payment_url ⇒ Object
- #receipt_url ⇒ Object
- #refund_url ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Router
Returns a new instance of Router.
11 12 13 |
# File 'lib/ya_kassa/v3/router.rb', line 11 def initialize(params = {}) @params = params end |
Instance Method Details
#payment_cancel_url ⇒ Object
27 28 29 |
# File 'lib/ya_kassa/v3/router.rb', line 27 def payment_cancel_url "#{ENDPOINT}#{PATH[:payments]}/#{@params[:payment_id]}/cancel" end |
#payment_confirmation_url ⇒ Object
23 24 25 |
# File 'lib/ya_kassa/v3/router.rb', line 23 def payment_confirmation_url "#{ENDPOINT}#{PATH[:payments]}/#{@params[:payment_id]}/capture" end |
#payment_status_url ⇒ Object
19 20 21 |
# File 'lib/ya_kassa/v3/router.rb', line 19 def payment_status_url "#{ENDPOINT}#{PATH[:payments]}/#{@params[:payment_id]}" end |
#payment_url ⇒ Object
15 16 17 |
# File 'lib/ya_kassa/v3/router.rb', line 15 def payment_url "#{ENDPOINT}#{PATH[:payments]}" end |