Sha256: 32dfe2bd802c287fade473817b4c435f26c0a8cfed71b5b7134741a43602f564
Contents?: true
Size: 931 Bytes
Versions: 6
Compression:
Stored size: 931 Bytes
Contents
require 'open_pay_resource' class Subscriptions < OpenPayResource def create(subscription,plan_id) customers=@api_hook.create(:customers) customers.create_subscription(subscription,plan_id) end def delete(subscription_id,customer_id) customers=@api_hook.create(:customers) customers.delete_subscription(customer_id, subscription_id) end def get(subscription_id,customer_id) customers=@api_hook.create(:customers) customers.get_subscription(customer_id, subscription_id) end def all(customer_id) customers=@api_hook.create(:customers) customers.all_subscriptions(customer_id) end def each(customer_id) customers=@api_hook.create(:customers) customers.each_subscription(customer_id) do |c| yield c end end def delete_all(customer_id) customers=@api_hook.create(:customers) customers.delete_all_subscriptions(customer_id) end end
Version data entries
6 entries across 4 versions & 1 rubygems