Module: RockRMS::Client::TransactionDetail
- Included in:
- RockRMS::Client
- Defined in:
- lib/rock_rms/resources/transaction_detail.rb
Instance Method Summary collapse
- #create_transaction_detail(transaction_id:, fund_id:, amount:, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil) ⇒ Object
- #delete_transaction_detail(id) ⇒ Object
- #find_transaction_detail(id) ⇒ Object
- #list_transaction_details(options = {}) ⇒ Object
- #update_transaction_detail(id, fund_id: nil, amount: nil, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil) ⇒ Object
Instance Method Details
#create_transaction_detail(transaction_id:, fund_id:, amount:, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/rock_rms/resources/transaction_detail.rb', line 34 def create_transaction_detail( transaction_id:, fund_id:, amount:, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil ) = {} ['TransactionId'] = transaction_id ['AccountId'] = fund_id ['Amount'] = amount ['FeeAmount'] = fee_amount if fee_amount ['EntityTypeId'] = entity_type_id if entity_type_id ['EntityId'] = entity_id if entity_id ['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount post(transaction_detail_path, ) end |
#delete_transaction_detail(id) ⇒ Object
55 56 57 |
# File 'lib/rock_rms/resources/transaction_detail.rb', line 55 def delete_transaction_detail(id) delete(transaction_detail_path(id)) end |
#find_transaction_detail(id) ⇒ Object
9 10 11 12 |
# File 'lib/rock_rms/resources/transaction_detail.rb', line 9 def find_transaction_detail(id) res = get(transaction_detail_path(id)) Response::TransactionDetail.format(res) end |
#list_transaction_details(options = {}) ⇒ Object
4 5 6 7 |
# File 'lib/rock_rms/resources/transaction_detail.rb', line 4 def list_transaction_details( = {}) res = get(transaction_detail_path, ) Response::TransactionDetail.format(res) end |
#update_transaction_detail(id, fund_id: nil, amount: nil, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/rock_rms/resources/transaction_detail.rb', line 14 def update_transaction_detail( id, fund_id: nil, amount: nil, fee_amount: nil, fee_coverage_amount: nil, entity_type_id: nil, entity_id: nil ) = {} ['AccountId'] = fund_id if fund_id ['Amount'] = amount if amount ['FeeAmount'] = fee_amount if fee_amount ['EntityTypeId'] = entity_type_id if entity_type_id ['EntityId'] = entity_id if entity_id ['FeeCoverageAmount'] = fee_coverage_amount if fee_coverage_amount patch(transaction_detail_path(id), ) end |