Module: LedgerSync::Test::QA::LedgerHelpers
- Defined in:
- lib/ledger_sync/test/support/qa/ledger_helpers.rb
Instance Method Summary collapse
- #create_resource_for(*args) ⇒ Object
- #create_result_for(client:, resource:) ⇒ Object
- #delete_resource_for(*args) ⇒ Object
- #delete_result_for(client:, resource:) ⇒ Object
- #find_resource_for(*args) ⇒ Object
- #find_result_for(client:, resource:) ⇒ Object
- #result_for(client:, method:, resource:) ⇒ Object
- #update_resource_for(*args) ⇒ Object
- #update_result_for(client:, resource:) ⇒ Object
Instance Method Details
#create_resource_for(*args) ⇒ Object
7 8 9 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 7 def create_resource_for(*args) create_result_for(*args).raise_if_error.resource end |
#create_result_for(client:, resource:) ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 11 def create_result_for(client:, resource:) result_for( client: client, method: :create, resource: resource ) end |
#delete_resource_for(*args) ⇒ Object
19 20 21 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 19 def delete_resource_for(*args) delete_result_for(*args).raise_if_error.resource end |
#delete_result_for(client:, resource:) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 23 def delete_result_for(client:, resource:) result_for( client: client, method: :delete, resource: resource ) end |
#find_resource_for(*args) ⇒ Object
31 32 33 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 31 def find_resource_for(*args) find_result_for(*args).raise_if_error.resource end |
#find_result_for(client:, resource:) ⇒ Object
35 36 37 38 39 40 41 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 35 def find_result_for(client:, resource:) result_for( client: client, method: :find, resource: resource ) end |
#result_for(client:, method:, resource:) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 43 def result_for(client:, method:, resource:) client.operation_for( method: method, resource: resource ).perform end |
#update_resource_for(*args) ⇒ Object
50 51 52 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 50 def update_resource_for(*args) update_result_for(*args).raise_if_error.resource end |
#update_result_for(client:, resource:) ⇒ Object
54 55 56 57 58 59 60 |
# File 'lib/ledger_sync/test/support/qa/ledger_helpers.rb', line 54 def update_result_for(client:, resource:) result_for( client: client, method: :update, resource: resource ) end |