Sha256: 0622ed5a23c7c85b03a902cddc95649a1645337fc1d6bfe670ba50b6c1debb83

Contents?: true

Size: 628 Bytes

Versions: 3

Compression:

Stored size: 628 Bytes

Contents

require "economic/proxies/entity_proxy"

module Economic
  class DebtorContactProxy < EntityProxy
    # Returns DebtorContact that have the given name. The objects will only be
    # partially loaded
    def find_by_name(name)
      Proxies::Actions::FindByName.new(self, name).call
    end

    def all
      Proxies::Actions::DebtorContact::All.new(self).call
    end

    private

    # Initialize properties in contact with values from owner. Returns contact.
    def initialize_properties_with_values_from_owner(contact)
      if owner.is_a?(Debtor)
        contact.debtor = owner
      end
      contact
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rconomic-0.7.0 lib/economic/proxies/debtor_contact_proxy.rb
rconomic-0.6.1 lib/economic/proxies/debtor_contact_proxy.rb
rconomic-0.6.0 lib/economic/proxies/debtor_contact_proxy.rb