Sha256: 079cc7c38804a82fdf6c15f4bd4ca73984ec19c1e00cde25bbdd1985a951b0f4
Contents?: true
Size: 990 Bytes
Versions: 8
Compression:
Stored size: 990 Bytes
Contents
require "omise/object" require "omise/list" require "omise/document_list" require "omise/search_scope" module Omise class Dispute < OmiseObject self.endpoint = "/disputes" def self.search SearchScope.new(:dispute) end def self.list(attributes = {}) status = attributes.delete(:status) List.new resource(location(status), attributes).get(attributes) end def self.retrieve(id = nil, attributes = {}) new resource(location(id), attributes).get(attributes) end def reload(attributes = {}) assign_attributes resource(attributes).get(attributes) end def update(attributes = {}) assign_attributes resource(attributes).patch(attributes) end def charge(options = {}) if !defined?(Charge) require "omise/charge" end expand_attribute Charge, "charge", options end def documents(options = {}) list_nested_resource DocumentList, "documents", options end end end
Version data entries
8 entries across 8 versions & 1 rubygems