Retrieving Subscriptions 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
subscription_id = "12345" # Replace with the actual invoice ID
# Search for the invoice
response = client.find(:package, subscription_id)
# Check if successful
if response['status'] == 'success'
puts "Subscription found: #{response['response']}"
else
puts "Error: #{response['error']}"
end