Sha256: 65c0068ce09425dcdc6c3b4c382035098315a164320278bf9f1fdefb2565a3c8

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

module RockRMS
  class Client
    module GroupMember
      def create_group_member(group_id:,
                              group_member_status:,
                              group_role_id:,
                              person_id:)
        post(
          group_member_path,
          {
            IsSystem: false,
            GroupId: group_id,
            GroupMemberStatus: group_member_status,
            GroupRoleId: group_role_id,
            PersonId: person_id
          }
        )
      end

      def delete_group_member(id)
        delete(group_member_path(id))
      end

      private

      def group_member_path(id = nil)
        id ? "GroupMembers/#{id}" : 'GroupMembers'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rock_rms-1.2.0 lib/rock_rms/resources/group_member.rb
rock_rms-1.1.0 lib/rock_rms/resources/group_member.rb