Skip to content

Commit

Permalink
Merge pull request #2 from QuickPay/add_implementations
Browse files Browse the repository at this point in the history
Implement CurrentInvoice.find_by_other_reference,
  • Loading branch information
absrd authored Jul 21, 2022
2 parents 0383329 + 2832377 commit d370b76
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
6 changes: 4 additions & 2 deletions lib/ruconomic/api/current_invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -634,10 +634,12 @@ def self.find_by_our_reference(reference)
# @note TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
# @see https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=CurrentInvoice_FindByOtherReference
# @return [Hash] The body content of the SOAP response.
def self.find_by_other_reference
def self.find_by_other_reference(other_reference)
response = invoke('CurrentInvoice_FindByOtherReference') do |message|
raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
message.add 'otherReference', other_reference
end

response.fetch(:current_invoice_find_by_other_reference_response, :current_invoice_find_by_other_reference_result)
end

# Returns handles for current invoices in a given interval of days.
Expand Down
19 changes: 15 additions & 4 deletions lib/ruconomic/api/debtor_entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ def self.get_data
# @note TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
# @see https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=DebtorEntry_GetDataArray
# @return [Hash] The body content of the SOAP response.
def self.get_data_array
def self.get_data_array(entity_handles)
response = invoke('DebtorEntry_GetDataArray') do |message|
raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
message.add 'entityHandles' do |m_entity_handles|
entity_handles.each do |debtor_entry_handle|
m_entity_handles.add 'DebtorEntryHandle' do |m_debtor_entry_handle|
m_debtor_entry_handle.add 'SerialNumber', debtor_entry_handle[:serial_number]
end
end
end
end

response.fetch(:debtor_entry_get_data_array_response, :debtor_entry_get_data_array_result)
end

# Gets the number of the debtor entry.
Expand Down Expand Up @@ -200,10 +208,13 @@ def self.find_by_serial_number
# @note TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
# @see https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=DebtorEntry_FindByInvoiceNumber
# @return [Hash] The body content of the SOAP response.
def self.find_by_invoice_number
def self.find_by_invoice_number(from, to)
response = invoke('DebtorEntry_FindByInvoiceNumber') do |message|
raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
message.add 'from', from
message.add 'to', to
end

response.fetch(:debtor_entry_find_by_invoice_number_response, :debtor_entry_find_by_invoice_number_result)
end

# Matches the entries passed to the function. No return value.
Expand Down
6 changes: 4 additions & 2 deletions lib/ruconomic/api/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,12 @@ def self.find_by_our_reference
# @note TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
# @see https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=Invoice_FindByOtherReference
# @return [Hash] The body content of the SOAP response.
def self.find_by_other_reference
def self.find_by_other_reference(other_reference)
response = invoke('Invoice_FindByOtherReference') do |message|
raise "TODO: This method was autogenerated from the WSDL - see https://github.com/coherify/ruconomic#contributing"
message.add 'otherReference', other_reference
end

response.fetch(:invoice_find_by_other_reference_response, :invoice_find_by_other_reference_result)
end

# Returns handles for the invoices with a given order number.
Expand Down

0 comments on commit d370b76

Please sign in to comment.