Sha256: edbcaf9bac9e2aa34c3a57aca8cad7157b50b09b6fd3d800a00cec98d8fd4caf

Contents?: true

Size: 513 Bytes

Versions: 1

Compression:

Stored size: 513 Bytes

Contents

# frozen_string_literal: true
module TopsConnect
  module Owners
    # Method: GET
    # Endpoint: Owner_Get
    def owner(owner_id)
      TopsConnect::Owner.new self, owner_id, get("/owner/#{owner_id}")
    end

    # Method: GET
    # Endpoint: Owner_GetList
    def owners(property_id = nil)
      query = {}
      query['PropertyKey'] = property_id.to_i if property_id

      get('/owner', query: query).map do |owner|
        TopsConnect::Owner.new self, owner['OwnerKey'], owner
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tops_connect-0.2.0 lib/tops_connect/owners.rb