class Paid::Subscription
Attributes
cancelled_at[RW]
created_at[R]
customer[RW]
ended_at[RW]
ends_on[RW]
id[R]
next_transaction_on[RW]
object[R]
plan[RW]
started_at[RW]
starts_on[RW]
Public Class Methods
all(params={}, headers={})
click to toggle source
# File lib/paid/subscription.rb, line 15 def self.all(params={}, headers={}) method = APIMethod.new(:get, "/subscriptions", params, headers, self) APIList.new(self, method.execute, method) end
create(params={}, headers={})
click to toggle source
# File lib/paid/subscription.rb, line 28 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/subscriptions", params, headers, self) self.new(method.execute, method) end
retrieve(id, params={}, headers={})
click to toggle source
# File lib/paid/subscription.rb, line 20 def self.retrieve(id, params={}, headers={}) params = ParamsBuilder.merge(params, { :id => id }) method = APIMethod.new(:get, "/subscriptions/:id", params, headers, self) self.new(method.execute, method) end
Public Instance Methods
cancel(params={}, headers={})
click to toggle source
# File lib/paid/subscription.rb, line 38 def cancel(params={}, headers={}) method = APIMethod.new(:post, "/subscriptions/:id/cancel", params, headers, self) self.refresh_from(method.execute, method) end
refresh(params={}, headers={})
click to toggle source
# File lib/paid/subscription.rb, line 33 def refresh(params={}, headers={}) method = APIMethod.new(:get, "/subscriptions/:id", params, headers, self) self.refresh_from(method.execute, method) end