Class: Unit::Payment::BatchReleaseRequestBuilder
- Inherits:
-
Object
- Object
- Unit::Payment::BatchReleaseRequestBuilder
- Defined in:
- lib/unit/models/payment/batch_release_request_builder.rb
Instance Method Summary collapse
- #add_request(account_id, batch_account_id, amount, description, sender_name, sender_address, sender_account_number, tags = nil, idempotency_key = nil) ⇒ Object
-
#initialize ⇒ BatchReleaseRequestBuilder
constructor
A new instance of BatchReleaseRequestBuilder.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ BatchReleaseRequestBuilder
Returns a new instance of BatchReleaseRequestBuilder.
7 8 9 |
# File 'lib/unit/models/payment/batch_release_request_builder.rb', line 7 def initialize @requests = [] end |
Instance Method Details
#add_request(account_id, batch_account_id, amount, description, sender_name, sender_address, sender_account_number, tags = nil, idempotency_key = nil) ⇒ Object
11 12 13 14 |
# File 'lib/unit/models/payment/batch_release_request_builder.rb', line 11 def add_request(account_id, batch_account_id, amount, description, sender_name, sender_address, sender_account_number, = nil, idempotency_key = nil) request = Unit::Payment::CreateBatchReleaseRequest.new(account_id, batch_account_id, amount, description, sender_name, sender_address, sender_account_number, , idempotency_key) @requests << request.to_hash end |
#to_hash ⇒ Object
16 17 18 |
# File 'lib/unit/models/payment/batch_release_request_builder.rb', line 16 def to_hash { "data": @requests } end |