Search for Customers
require 'chargeover_ruby'
# Initialize the client
client = ChargeOver::Client.new("https://your-chargeover-url.com", "your_api_key", "your_api_secret")
# Define search parameters, e.g., by email
search_params = {
'where' => {
'email:EQUALS' => "email@example.com"
}
}
# Perform the search
response = client.find(:customer, search_params)
# Check if successful
if response['status'] == 'success'
puts "Customer found: #{response['response']}"
else
puts "Error: #{response['error']}"
end