Retrieving Invoices By ID
require 'chargeover_ruby'
# Initialize the client
client = ChargeOver::Client.new("https://your-chargeover-url.com", "your_api_key", "your_api_secret")
# Define the invoice ID
invoice_id = "12345" # Replace with the actual invoice ID
# Search for the invoice
response = client.find(:invoice, invoice_id)
# Check if successful
if response['status'] == 'success'
puts "Invoice found: #{response['response']}"
else
puts "Error: #{response['error']}"
end