Class: Gillbus::BuyBooking::Request
- Inherits:
-
Gillbus::BaseRequest
- Object
- Gillbus::BaseRequest
- Gillbus::BuyBooking::Request
- Defined in:
- lib/gillbus/buy_booking.rb
Constant Summary collapse
- METHOD_CASH =
1 – наличный;
1
- METHOD_CARD =
2 – кредитной карточкой;
2
- METHOD_NOCASH =
3 – безналичный;
3
- METHOD_SERVICE =
4 – сервисный;
4
- METHOD_ACQUIRING =
5 – эквайринг.
5
Instance Attribute Summary collapse
-
#order_ids ⇒ Object
Returns the value of attribute order_ids.
-
#payment_method ⇒ Object
paymentMethod (не обязательный) Способ оплаты заказа.
-
#ticket_count ⇒ Object
ticketCount Кол-во выкупаемых билетов.
-
#ticket_numbers ⇒ Object
Номера билетов с порядковым номером.
Instance Method Summary collapse
Methods inherited from Gillbus::BaseRequest
Constructor Details
This class inherits a constructor from Gillbus::BaseRequest
Instance Attribute Details
#order_ids ⇒ Object
Returns the value of attribute order_ids.
31 32 33 |
# File 'lib/gillbus/buy_booking.rb', line 31 def order_ids @order_ids end |
#payment_method ⇒ Object
paymentMethod (не обязательный) Способ оплаты заказа.
10 11 12 |
# File 'lib/gillbus/buy_booking.rb', line 10 def payment_method @payment_method end |
#ticket_count ⇒ Object
ticketCount Кол-во выкупаемых билетов. 1..k
26 27 28 |
# File 'lib/gillbus/buy_booking.rb', line 26 def ticket_count @ticket_count end |
#ticket_numbers ⇒ Object
Номера билетов с порядковым номером
29 30 31 |
# File 'lib/gillbus/buy_booking.rb', line 29 def ticket_numbers @ticket_numbers end |
Instance Method Details
#params ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/gillbus/buy_booking.rb', line 33 def params numbers = ticket_numbers.map.with_index do |num, i| [:"ticketNumber#{i}", num] end.to_h orders = order_ids.map.with_index do |val, i| [:"orderId#{i}", val] end.to_h compact( paymentMethod: payment_method, ticketCount: ticket_count, **numbers, **orders, ) end |
#path ⇒ Object
6 |
# File 'lib/gillbus/buy_booking.rb', line 6 def path; '/online2/buyBooking' end |