Sha256: e6d860a38eb175c66247626784526fea4f756789107a3a36d19c08729bafa262

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

require 'pry-byebug'
require 'dotenv'
require_relative '../lib/rentvine'

Dotenv.load('../.env')

auth = {
  account_code: ENV['RENTVINE_ACCOUNT_CODE'],
  api_key: ENV['RENTVINE_API_KEY'],
  api_secret: ENV['RENTVINE_API_SECRET']
}
rv_client = Rentvine::Client.new(auth)

# =========================================
# Unit Examples
# =========================================

# ===========================

property_id = 13
rv_client.units(property_id).each do |unit|
  puts unit.address
end

# ===========================

property_id = 13
unit_id = 38
rvu = rv_client.unit(property_id, unit_id)
puts rvu.address

# ===========================

rv_client.export_units.each do |unit|
  puts unit.address
end

# ===========================

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rentvine-0.4.0 examples/units.rb
rentvine-0.3.3 examples/units.rb
rentvine-0.3.2 examples/units.rb