Sha256: b74641667f767eb08b847b507a67893e30ab348743d90ee4dff05838c771dc32
Contents?: true
Size: 1.21 KB
Versions: 3
Compression:
Stored size: 1.21 KB
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) # ========================================= # Work Order Examples # ========================================= rv_client.work_orders.each do |work_order| puts work_order.work_order_id end # =========================== work_order_id = 7 rv_obj = rv_client.work_order(work_order_id) puts rv_obj.work_order_id # =========================== new_work_order = Rentvine::WorkOrder.new new_work_order.property_id = 32 new_work_order.work_order_status_id = 1 new_work_order.priority_id = 1 new_work_order.is_owner_approved = 1 new_work_order.is_vacant = 0 new_work_order.description = 'This is something to fix' new_work_order.is_shared_with_tenant = 1 new_work_order.is_shared_with_owner = 1 new_work_order_saved_or_rentvine_error = rv_client.save_work_order(new_work_order) if new_work_order_saved_or_rentvine_error.is_a?(Rentvine::RentvineError) puts new_work_order_saved_or_rentvine_error.message else puts new_work_order_saved_or_rentvine_error.work_order_id end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rentvine-0.4.0 | examples/work_orders.rb |
rentvine-0.3.3 | examples/work_orders.rb |
rentvine-0.3.2 | examples/work_orders.rb |