Sha256: 39281ff3d3f5f573546cd5d339924e6c6e26957a89ff53770b972649b75d5fef

Contents?: true

Size: 561 Bytes

Versions: 2

Compression:

Stored size: 561 Bytes

Contents

require "bundler/setup"
require "velocity"

contributor = Velocity::Contributor.find_by(email: "vgsantoniazzi@gmail.com")

if contributor
  puts "Contributor #{contributor.id} found.\n#{contributor.inspect}"
else
  engineer_role = Velocity::Role.find_by(name: "Engineer")

  raise "Role not found" if engineer_role.nil?

  invite = Velocity::Invite.create(
    name: "Victor Antoniazzi",
    email: "vgsantoniazzi@gmail.com",
    job_function: "Software Engineer",
    role_ids: [engineer_role.id]
  )

  puts "Invite #{invite.id} sent.\n#{invite.inspect}"
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
velocity_client_ruby-0.3.0 examples/send_invite.rb
velocity_client_ruby-0.2.1 examples/send_invite.rb