Sha256: 5f5b962a83282f377fd3f232ed2271c51276ca64a77744d3bfcefaa4a540944d
Contents?: true
Size: 1010 Bytes
Versions: 11
Compression:
Stored size: 1010 Bytes
Contents
require "omise/object" require "omise/list" require "omise/search_scope" module Omise class Recipient < OmiseObject self.endpoint = "/recipients" def self.search SearchScope.new(:recipient) end def self.retrieve(id, attributes = {}) new resource(location(id), attributes).get(attributes) end def self.list(attributes = {}) List.new resource(location, attributes).get(attributes) end def self.create(attributes = {}) new resource(location, attributes).post(attributes) end def reload(attributes = {}) assign_attributes resource(attributes).get(attributes) end def update(attributes = {}) assign_attributes resource(attributes).patch(attributes) end def destroy(attributes = {}) assign_attributes resource(attributes).delete end def bank_account if !defined?(BankAccount) require "omise/bank_account" end expand_attribute BankAccount, "bank_account" end end end
Version data entries
11 entries across 11 versions & 1 rubygems