Class: Libis::Services::Rosetta::DepositHandler
- Defined in:
- lib/libis/services/rosetta/deposit_handler.rb
Instance Attribute Summary
Attributes included from SoapClient
Instance Method Summary collapse
- #deposits(opts = {}) ⇒ Object
-
#get_by_submit_date(date_from, date_to, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined] - producer_id: optional, limits by producer_id - agent_id: optional, limits by agent_id - start_record: optional, pagination start - end_record: optional, pagination end.
-
-
#get_by_submit_flow(date_from, date_to, flow_id, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined] - producer_id: optional, limits by producer_id - agent_id: optional, limits by agent_id - start_record: optional, pagination start - end_record: optional, pagination end.
-
-
#get_by_update_date(date_from, date_to, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined] - producer_id: optional, limits by producer_id - agent_id: optional, limits by agent_id - start_record: optional, pagination start - end_record: optional, pagination end.
-
-
#get_by_update_flow(date_from, date_to, flow_id, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined] - producer_id: optional, limits by producer_id - agent_id: optional, limits by agent_id - start_record: optional, pagination start - end_record: optional, pagination end.
-
-
#initialize(base_url = 'https://repository.teneo.libis.be', options = {}) ⇒ DepositHandler
constructor
A new instance of DepositHandler.
- #submit(flow_id, subdir, producer_id, deposit_set_id = '1') ⇒ Object
Methods inherited from Client
#authenticate, #get_heart_bit, #pds_handle=
Methods included from SoapClient
#configure, #operations, #request
Constructor Details
#initialize(base_url = 'https://repository.teneo.libis.be', options = {}) ⇒ DepositHandler
Returns a new instance of DepositHandler.
12 13 14 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 12 def initialize(base_url = 'https://repository.teneo.libis.be', = {}) super 'deposit', 'DepositWebServices', {url: base_url}.merge() end |
Instance Method Details
#deposits(opts = {}) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 29 def deposits(opts = {}) = opts.dup flow_id = .delete :flow_id submit_date_from, submit_date_to = .delete :submit_date submit_date_to ||= submit_date_from if submit_date_from update_date_from, update_date_to = .delete :update_date update_date_to ||= update_date_from if update_date_from if submit_date_from if flow_id get_by_submit_flow submit_date_from, submit_date_to, flow_id, else get_by_submit_date submit_date_from, submit_date_to, end elsif update_date_from if flow_id get_by_update_flow update_date_from, update_date_to, flow_id, else get_by_update_date update_date_from, update_date_to, end else error "unsupported deposit query: #{opts}." [] end end |
#get_by_submit_date(date_from, date_to, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined]
-
producer_id: optional, limits by producer_id
-
agent_id: optional, limits by agent_id
-
start_record: optional, pagination start
-
end_record: optional, pagination end
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 62 def get_by_submit_date(date_from, date_to, = {}) = { status: 'All', producer_id: nil, agent_id: nil, start_record: nil, end_record: nil }.merge params = { arg0: @pds_handle, arg1: [:status], arg2: [:producer_id], arg3: [:agent_id], arg4: date_from, arg5: date_to, arg6: [:start_record], arg7: [:end_record] }.cleanup request_activities :get_deposit_activity_by_submit_date, params end |
#get_by_submit_flow(date_from, date_to, flow_id, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined]
-
producer_id: optional, limits by producer_id
-
agent_id: optional, limits by agent_id
-
start_record: optional, pagination start
-
end_record: optional, pagination end
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 92 def get_by_submit_flow(date_from, date_to, flow_id, = {}) = { status: 'All', producer_id: nil, agent_id: nil, start_record: nil, end_record: nil }.merge params = { arg0: @pds_handle, arg1: [:status], arg2: flow_id, arg3: [:producer_id], arg4: [:agent_id], arg5: date_from, arg6: date_to, arg7: [:start_record], arg8: [:end_record] }.cleanup request_activities :get_deposit_activity_by_submit_date_by_material_flow, params end |
#get_by_update_date(date_from, date_to, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined]
-
producer_id: optional, limits by producer_id
-
agent_id: optional, limits by agent_id
-
start_record: optional, pagination start
-
end_record: optional, pagination end
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 122 def get_by_update_date(date_from, date_to, = {}) = { status: 'All', producer_id: nil, agent_id: nil, start_record: nil, end_record: nil }.merge params = { arg0: @pds_handle, arg1: [:status], arg2: [:producer_id], arg3: [:agent_id], arg4: date_from, arg5: date_to, arg6: [:start_record], arg7: [:end_record] }.cleanup request_activities :get_deposit_activity_by_update_date, params end |
#get_by_update_flow(date_from, date_to, flow_id, options = {}) ⇒ Object
-
status: Status of the deposit [All (default), In process, Rejected, Draft, Approved, Declined]
-
producer_id: optional, limits by producer_id
-
agent_id: optional, limits by agent_id
-
start_record: optional, pagination start
-
end_record: optional, pagination end
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 152 def get_by_update_flow(date_from, date_to, flow_id, = {}) = { status: 'All', producer_id: nil, agent_id: nil, start_record: nil, end_record: nil }.merge params = { arg0: @pds_handle, arg1: [:status], arg2: flow_id, arg3: [:producer_id], arg4: [:agent_id], arg5: date_from, arg6: date_to, arg7: [:start_record], arg8: [:end_record] }.cleanup request_activities :get_deposit_activity_by_update_date_by_material_flow, params end |
#submit(flow_id, subdir, producer_id, deposit_set_id = '1') ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/libis/services/rosetta/deposit_handler.rb', line 20 def submit(flow_id, subdir, producer_id, deposit_set_id = '1') call :submit_deposit_activity, arg0: @pds_handle, arg1: flow_id, arg2: subdir, arg3: producer_id, arg4: deposit_set_id end |