Class: Moneta::Api::Types::BatchRequestType
- Defined in:
- lib/moneta/api/types/batch_request_type.rb
Overview
Тип, описывающий параметры операции в запросах в пакетном режиме. Transaction parameters type for requests in batch processing mode.
Direct Known Subclasses
AuthoriseTransactionBatchRequestType, ConfirmTransactionBatchRequestType, PaymentBatchRequestType, TransferBatchRequestType
Instance Method Summary collapse
-
#add_transaction(item) ⇒ Object
Набор операций, которые необходимо выполнить в одном пакете.
-
#exit_on_failure ⇒ Boolean
Флаг, указывающий прерывать ли выполнение пакета операций, если произошла ошибка.
-
#transaction ⇒ Array[Moneta::Api::Types::Entity*]
Набор операций, которые необходимо выполнить в одном пакете.
-
#transactional ⇒ Boolean
Флаг, указывающий выполнять ли все денежные переводы в одной транзакции.
Methods inherited from Entity
Methods included from DataMapper
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_failure ⇒ Boolean
22 |
# File 'lib/moneta/api/types/batch_request_type.rb', line 22 property :exit_on_failure |
#transaction ⇒ Array[Moneta::Api::Types::Entity*]
27 |
# File 'lib/moneta/api/types/batch_request_type.rb', line 27 property :transaction |
#transactional ⇒ Boolean
17 |
# File 'lib/moneta/api/types/batch_request_type.rb', line 17 property :transactional |