class Paid::Product
Attributes
description[RW]
external_id[RW]
external_metric_id[RW]
id[R]
name[RW]
object[R]
pricing_structure[RW]
transaction_description[RW]
Public Class Methods
all(params={}, headers={})
click to toggle source
# File lib/paid/product.rb, line 13 def self.all(params={}, headers={}) method = APIMethod.new(:get, "/products", params, headers, self) APIList.new(self, method.execute, method) end
create(params={}, headers={})
click to toggle source
# File lib/paid/product.rb, line 26 def self.create(params={}, headers={}) method = APIMethod.new(:post, "/products", params, headers, self) self.new(method.execute, method) end
retrieve(id, params={}, headers={})
click to toggle source
# File lib/paid/product.rb, line 18 def self.retrieve(id, params={}, headers={}) params = ParamsBuilder.merge(params, { :id => id }) method = APIMethod.new(:get, "/products/:id", params, headers, self) self.new(method.execute, method) end
Public Instance Methods
refresh(params={}, headers={})
click to toggle source
# File lib/paid/product.rb, line 31 def refresh(params={}, headers={}) method = APIMethod.new(:get, "/products/:id", params, headers, self) self.refresh_from(method.execute, method) end
save(params={}, headers={})
click to toggle source
# File lib/paid/product.rb, line 36 def save(params={}, headers={}) params = ParamsBuilder.merge(params, changed_api_attributes) method = APIMethod.new(:put, "/products/:id", params, headers, self) self.refresh_from(method.execute, method) end