class Omise::Link
Public Class Methods
create(attributes = {})
click to toggle source
# File lib/omise/link.rb, line 22 def self.create(attributes = {}) new resource(location, attributes).post(attributes) end
list(attributes = {})
click to toggle source
# File lib/omise/link.rb, line 18 def self.list(attributes = {}) List.new resource(location, attributes).get(attributes) end
retrieve(id, attributes = {})
click to toggle source
# File lib/omise/link.rb, line 14 def self.retrieve(id, attributes = {}) new resource(location(id), attributes).get(attributes) end
search()
click to toggle source
# File lib/omise/link.rb, line 10 def self.search SearchScope.new(:link) end
Public Instance Methods
charges(options = {})
click to toggle source
# File lib/omise/link.rb, line 34 def charges(options = {}) if options.empty? list_attribute ChargeList, "charges" else response = collection.resource(location("charges")).get(options) ChargeList.new(self, response) end end
destroy(attributes = {})
click to toggle source
# File lib/omise/link.rb, line 30 def destroy(attributes = {}) assign_attributes resource(attributes).delete end
reload(attributes = {})
click to toggle source
# File lib/omise/link.rb, line 26 def reload(attributes = {}) assign_attributes resource(attributes).get(attributes) end