This repository has been archived by the owner on Jul 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
ottick.rb
61 lines (51 loc) · 1.64 KB
/
ottick.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
require "ottick/version"
require 'active_support/core_ext/module'
module Ottick
autoload :Ticket, 'ottick/ticket'
def self.setup
yield self
end
# endpoint for soap
# Example:
# endpoint = https://localhost/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector"
# Default: nil
#
mattr_accessor :endpoint
@@endpoint = nil
# wsdl: local file or url
# you can download the wsdl file from https://raw.githubusercontent.com/OTRS/otrs/rel-3_3/development/webservices/GenericTicketConnector.wsdl
#
# Example:
# wsdl = "GenericTicketConnector.wsdl"
#
mattr_accessor :wsdl
@@wsdl = nil
# basic auth
# only neccessary if you use OTRS with http_authenication
# must be a valid OTRS user with http_authentication
#
mattr_accessor :http_auth_user, :http_auth_passwd
@@http_auth_user = nil
@@http_auth_passwd = nil
# UserLogin and Password for web service operations
# if you use http_authentication, use a dummy string here (can't be left blank)
# otherwise set credential for a valid OTRS user.
mattr_accessor :otrs_user, :otrs_passwd
@@otrs_user = nil
@@otrs_passwd = nil
# Ticket default settings
#
mattr_accessor :ticket_type, :ticket_priority, :ticket_state, :ticket_queue,
:customer_user
@@ticket_queue = "Raw"
@@ticket_priority = "3 normal"
@@ticket_state = "new"
@@ticket_type = "default"
@@customer_user = "test@localhost.local"
# Article default settings
#
mattr_accessor :article_sender_type, :article_charset, :article_mime_type
@@article_sender_type = "customer"
@@article_charset = "utf8"
@@article_mime_type = "text/plain"
end