class Moneta::Api::Types::BatchRequestType

Тип, описывающий параметры операции в запросах в пакетном режиме. Transaction parameters type for requests in batch processing mode.

Public Instance Methods

add_transaction(item) click to toggle source

Набор операций, которые необходимо выполнить в одном пакете.

Операции выполняются в том порядке, в котором они переданы в запросе.
/ Set of transfers to be processed in one batch. Processed in order of appearance.

@param [Moneta::Api::Types::Entity*] @return void

# File lib/moneta/api/types/batch_request_type.rb, line 35
def add_transaction(item)
  parents = item.class.ancestors
  if parents.include?(basic_transaction_type)
    (@transaction ||=[]).push(item)
  else
    raise TypeError.new("TypeError: #{ item.class } have not parent #{ basic_transaction_type.name }")
  end
end

Private Instance Methods

basic_transaction_type() click to toggle source
# File lib/moneta/api/types/batch_request_type.rb, line 46
def basic_transaction_type
  Moneta::Api::Types::Entity
end