Class: Moneta::Api::Types::BatchRequestType

Inherits:
Entity
  • Object
show all
Defined in:
lib/moneta/api/types/batch_request_type.rb

Overview

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

Instance Method Summary collapse

Methods inherited from Entity

#version

Methods included from DataMapper

#fill, #to_hash

Instance Method Details

#add_transaction(item) ⇒ Object

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



35
36
37
38
39
40
41
42
# 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

#exit_on_failureBoolean



22
# File 'lib/moneta/api/types/batch_request_type.rb', line 22

property :exit_on_failure

#transactionArray[Moneta::Api::Types::Entity*]



27
# File 'lib/moneta/api/types/batch_request_type.rb', line 27

property :transaction

#transactionalBoolean



17
# File 'lib/moneta/api/types/batch_request_type.rb', line 17

property :transactional