Sha256: 91fa87dfc32e8f222f3f503069a1cd543815b6fe1916ffb6d7a3682ce38a5a55

Contents?: true

Size: 955 Bytes

Versions: 13

Compression:

Stored size: 955 Bytes

Contents

class Gillbus
  module ReturnPosition
    Gillbus.register self, :return_position

    class Request < BaseRequest
      def path; '/online2/returnPosition' end

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

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

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

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

    class Response < BaseResponse
      class ReturnPosition
        extend Fields

        field :system_number
        field :confirmation, :yesno_bool
        field :reason_id
        field :date
        field :failures
      end

      field :return_positions, [ReturnPosition], key: 'RETURN_POSITION'
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
gillbus-0.18.4 lib/gillbus/return_position.rb
gillbus-0.18.3 lib/gillbus/return_position.rb
gillbus-0.18.2 lib/gillbus/return_position.rb
gillbus-0.18.1 lib/gillbus/return_position.rb
gillbus-0.17.6 lib/gillbus/return_position.rb
gillbus-0.17.5 lib/gillbus/return_position.rb
gillbus-0.17.4 lib/gillbus/return_position.rb
gillbus-0.17.3 lib/gillbus/return_position.rb
gillbus-0.17.2 lib/gillbus/return_position.rb
gillbus-0.17.1 lib/gillbus/return_position.rb
gillbus-0.16.10 lib/gillbus/return_position.rb
gillbus-0.16.9 lib/gillbus/return_position.rb
gillbus-0.16.8 lib/gillbus/return_position.rb