class Velocity::Api::Invite
Public Instance Methods
attributes()
click to toggle source
# File lib/velocity/api/invite.rb, line 20 def attributes { name: args.fetch(:name), email: args.fetch(:email), jobFunction: args.fetch(:job_function) } end
body()
click to toggle source
# File lib/velocity/api/invite.rb, line 8 def body { body: { data: { type: "invitations", attributes: attributes, relationships: relationships } }.to_json } end
create()
click to toggle source
# File lib/velocity/api/invite.rb, line 4 def create parse_response(self.class.post("/invitations", options.merge(body))) end
relationships()
click to toggle source
# File lib/velocity/api/invite.rb, line 28 def relationships { roles: { data: args.fetch(:role_ids).map do |role_id| { type: "roles", id: role_id } end } } end