Module: PayuPl::Endpoints
- Defined in:
- lib/payu_pl/endpoints.rb
Constant Summary collapse
- OAUTH_TOKEN =
"/pl/standard/user/oauth/authorize"- ORDERS =
"/api/v2_1/orders"- SHOPS =
"/api/v2_1/shops"- PAYOUTS =
"/api/v2_1/payouts"- REPORTS =
"/api/v2_1/reports"
Class Method Summary collapse
- .order(order_id) ⇒ Object
- .order_captures(order_id) ⇒ Object
- .order_refund(order_id, refund_id) ⇒ Object
- .order_refunds(order_id) ⇒ Object
- .order_transactions(order_id) ⇒ Object
- .payout(payout_id) ⇒ Object
- .report(report_id) ⇒ Object
- .shop(shop_id) ⇒ Object
Class Method Details
.order(order_id) ⇒ Object
15 16 17 |
# File 'lib/payu_pl/endpoints.rb', line 15 def self.order(order_id) "#{ORDERS}/#{URI.encode_www_form_component(order_id.to_s)}" end |
.order_captures(order_id) ⇒ Object
19 20 21 |
# File 'lib/payu_pl/endpoints.rb', line 19 def self.order_captures(order_id) "#{order(order_id)}/captures" end |
.order_refund(order_id, refund_id) ⇒ Object
31 32 33 |
# File 'lib/payu_pl/endpoints.rb', line 31 def self.order_refund(order_id, refund_id) "#{order_refunds(order_id)}/#{URI.encode_www_form_component(refund_id.to_s)}" end |
.order_refunds(order_id) ⇒ Object
27 28 29 |
# File 'lib/payu_pl/endpoints.rb', line 27 def self.order_refunds(order_id) "#{order(order_id)}/refunds" end |
.order_transactions(order_id) ⇒ Object
23 24 25 |
# File 'lib/payu_pl/endpoints.rb', line 23 def self.order_transactions(order_id) "#{order(order_id)}/transactions" end |
.payout(payout_id) ⇒ Object
39 40 41 |
# File 'lib/payu_pl/endpoints.rb', line 39 def self.payout(payout_id) "#{PAYOUTS}/#{URI.encode_www_form_component(payout_id.to_s)}" end |
.report(report_id) ⇒ Object
43 44 45 |
# File 'lib/payu_pl/endpoints.rb', line 43 def self.report(report_id) "#{REPORTS}/#{URI.encode_www_form_component(report_id.to_s)}" end |
.shop(shop_id) ⇒ Object
35 36 37 |
# File 'lib/payu_pl/endpoints.rb', line 35 def self.shop(shop_id) "#{SHOPS}/#{URI.encode_www_form_component(shop_id.to_s)}" end |