Class: Gillbus::ReturnPosition::Request

Inherits:
BaseRequest show all
Defined in:
lib/gillbus/return_position.rb

Direct Known Subclasses

Gillbus::ReturnPositionForced::Request

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseRequest

#initialize, #method

Constructor Details

This class inherits a constructor from Gillbus::BaseRequest

Instance Attribute Details

#system_numbersObject

Номера билетов с порядковым номером



13
14
15
# File 'lib/gillbus/return_position.rb', line 13

def system_numbers
  @system_numbers
end

#ticket_countObject

ticketCount Кол-во возвращаемых билетов. 1..k



10
11
12
# File 'lib/gillbus/return_position.rb', line 10

def ticket_count
  @ticket_count
end

Instance Method Details

#paramsObject



15
16
17
18
19
20
21
22
23
24
# File 'lib/gillbus/return_position.rb', line 15

def params
  numbers = system_numbers.map.with_index do |num, i|
    [:"systemNumber#{i}", num]
  end.to_h

  compact(
    ticketCount: ticket_count,
    **numbers,
  )
end

#pathObject



6
# File 'lib/gillbus/return_position.rb', line 6

def path; '/online2/returnPosition' end