autotask_ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +54 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +7 -0
  5. data/.ruby-gemset +1 -0
  6. data/.ruby-version +1 -0
  7. data/.travis.yml +7 -0
  8. data/CODE_OF_CONDUCT.md +74 -0
  9. data/Gemfile +8 -0
  10. data/Gemfile.lock +152 -0
  11. data/Guardfile +72 -0
  12. data/LICENSE +21 -0
  13. data/README.md +73 -0
  14. data/Rakefile +8 -0
  15. data/atws-1_6.wsdl +3263 -0
  16. data/atws.wsdl +3191 -0
  17. data/autotask_ruby.gemspec +51 -0
  18. data/bin/console +15 -0
  19. data/bin/setup +8 -0
  20. data/lib/autotask_ruby.rb +30 -0
  21. data/lib/autotask_ruby/account.rb +14 -0
  22. data/lib/autotask_ruby/account_to_do.rb +20 -0
  23. data/lib/autotask_ruby/action_type.rb +13 -0
  24. data/lib/autotask_ruby/appointment.rb +20 -0
  25. data/lib/autotask_ruby/association.rb +38 -0
  26. data/lib/autotask_ruby/client.rb +91 -0
  27. data/lib/autotask_ruby/configuration.rb +25 -0
  28. data/lib/autotask_ruby/constants.rb +7 -0
  29. data/lib/autotask_ruby/contact.rb +26 -0
  30. data/lib/autotask_ruby/create_response.rb +5 -0
  31. data/lib/autotask_ruby/delete_response.rb +5 -0
  32. data/lib/autotask_ruby/entity.rb +113 -0
  33. data/lib/autotask_ruby/fields.rb +16 -0
  34. data/lib/autotask_ruby/project.rb +20 -0
  35. data/lib/autotask_ruby/query.rb +22 -0
  36. data/lib/autotask_ruby/query_response.rb +8 -0
  37. data/lib/autotask_ruby/resource.rb +22 -0
  38. data/lib/autotask_ruby/response.rb +28 -0
  39. data/lib/autotask_ruby/service_call.rb +24 -0
  40. data/lib/autotask_ruby/service_call_ticket.rb +11 -0
  41. data/lib/autotask_ruby/service_call_ticket_resource.rb +11 -0
  42. data/lib/autotask_ruby/task.rb +19 -0
  43. data/lib/autotask_ruby/ticket.rb +18 -0
  44. data/lib/autotask_ruby/version.rb +5 -0
  45. data/lib/autotask_ruby/zone_info.rb +31 -0
  46. metadata +273 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 3a7ad34429eb41909dc0182250592d4912aa0537099a206b4d59f47d71786784
4
+ data.tar.gz: 8d3e4ca3b363e9bf3bb72fb79f51a1693a42f7b10f04a38ca220af62d2178c72
5
+ SHA512:
6
+ metadata.gz: a8f742c6bc21caf1e510f472fb7019297e0066cc5e61e914b0d4703e0e1040cff8bd476049c7afee1b533dd4d7744dfbadfa67c1cc49aa463f37f469e6ec9527
7
+ data.tar.gz: 34bd4b992cf23590ea7807aa7f667aa4b24267ab345ac55d6f1b5331721e299efe50583e6ca94a2c5a0c1bf76298d1ad501fde651dd01a09bbe774ed78e8e770
@@ -0,0 +1,54 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
51
+ .idea
52
+ .rspec_status
53
+ .byebug_history
54
+ .env
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,7 @@
1
+ require: rubocop-rspec
2
+
3
+ Metrics/LineLength:
4
+ Max: 160
5
+
6
+ Layout/IndentationWidth:
7
+ Width: 4
@@ -0,0 +1 @@
1
+ autotask_ruby
@@ -0,0 +1 @@
1
+ ruby-2.5.3
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.5.3
7
+ before_install: gem install bundler -v 1.17.1
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at jared@jaredjennings.org. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
+
7
+ # Specify your gem's dependencies in autotask_ruby.gemspec
8
+ gemspec
@@ -0,0 +1,152 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ autotask_ruby (0.1.0)
5
+ activesupport (~> 5.2)
6
+ savon (~> 2.12)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (5.2.2)
12
+ concurrent-ruby (~> 1.0, >= 1.0.2)
13
+ i18n (>= 0.7, < 2)
14
+ minitest (~> 5.1)
15
+ tzinfo (~> 1.1)
16
+ addressable (2.5.2)
17
+ public_suffix (>= 2.0.2, < 4.0)
18
+ akami (1.3.1)
19
+ gyoku (>= 0.4.0)
20
+ nokogiri
21
+ ast (2.4.0)
22
+ awesome_print (1.8.0)
23
+ builder (3.2.3)
24
+ byebug (10.0.2)
25
+ coderay (1.1.2)
26
+ concurrent-ruby (1.1.4)
27
+ crack (0.4.3)
28
+ safe_yaml (~> 1.0.0)
29
+ diff-lcs (1.3)
30
+ dotenv (2.5.0)
31
+ ffi (1.9.25)
32
+ formatador (0.2.5)
33
+ guard (2.15.0)
34
+ formatador (>= 0.2.4)
35
+ listen (>= 2.7, < 4.0)
36
+ lumberjack (>= 1.0.12, < 2.0)
37
+ nenv (~> 0.1)
38
+ notiffany (~> 0.0)
39
+ pry (>= 0.9.12)
40
+ shellany (~> 0.0)
41
+ thor (>= 0.18.1)
42
+ guard-compat (1.2.1)
43
+ guard-rspec (4.7.3)
44
+ guard (~> 2.1)
45
+ guard-compat (~> 1.1)
46
+ rspec (>= 2.99.0, < 4.0)
47
+ gyoku (1.3.1)
48
+ builder (>= 2.1.2)
49
+ hashdiff (0.3.8)
50
+ httpi (2.4.4)
51
+ rack
52
+ socksify
53
+ i18n (1.4.0)
54
+ concurrent-ruby (~> 1.0)
55
+ jaro_winkler (1.5.1)
56
+ listen (3.1.5)
57
+ rb-fsevent (~> 0.9, >= 0.9.4)
58
+ rb-inotify (~> 0.9, >= 0.9.7)
59
+ ruby_dep (~> 1.2)
60
+ lumberjack (1.0.13)
61
+ method_source (0.9.2)
62
+ mini_portile2 (2.4.0)
63
+ minitest (5.11.3)
64
+ nenv (0.3.0)
65
+ nokogiri (1.9.1)
66
+ mini_portile2 (~> 2.4.0)
67
+ nori (2.6.0)
68
+ notiffany (0.1.1)
69
+ nenv (~> 0.1)
70
+ shellany (~> 0.0)
71
+ parallel (1.12.1)
72
+ parser (2.5.3.0)
73
+ ast (~> 2.4.0)
74
+ powerpack (0.1.2)
75
+ pry (0.12.2)
76
+ coderay (~> 1.1.0)
77
+ method_source (~> 0.9.0)
78
+ public_suffix (3.0.3)
79
+ rack (2.0.6)
80
+ rainbow (3.0.0)
81
+ rake (12.3.2)
82
+ rb-fsevent (0.10.3)
83
+ rb-inotify (0.10.0)
84
+ ffi (~> 1.0)
85
+ rspec (3.8.0)
86
+ rspec-core (~> 3.8.0)
87
+ rspec-expectations (~> 3.8.0)
88
+ rspec-mocks (~> 3.8.0)
89
+ rspec-core (3.8.0)
90
+ rspec-support (~> 3.8.0)
91
+ rspec-expectations (3.8.2)
92
+ diff-lcs (>= 1.2.0, < 2.0)
93
+ rspec-support (~> 3.8.0)
94
+ rspec-mocks (3.8.0)
95
+ diff-lcs (>= 1.2.0, < 2.0)
96
+ rspec-support (~> 3.8.0)
97
+ rspec-support (3.8.0)
98
+ rubocop (0.62.0)
99
+ jaro_winkler (~> 1.5.1)
100
+ parallel (~> 1.10)
101
+ parser (>= 2.5, != 2.5.1.1)
102
+ powerpack (~> 0.1)
103
+ rainbow (>= 2.2.2, < 4.0)
104
+ ruby-progressbar (~> 1.7)
105
+ unicode-display_width (~> 1.4.0)
106
+ rubocop-rspec (1.31.0)
107
+ rubocop (>= 0.60.0)
108
+ ruby-progressbar (1.10.0)
109
+ ruby_dep (1.5.0)
110
+ safe_yaml (1.0.4)
111
+ savon (2.12.0)
112
+ akami (~> 1.2)
113
+ builder (>= 2.1.2)
114
+ gyoku (~> 1.2)
115
+ httpi (~> 2.3)
116
+ nokogiri (>= 1.8.1)
117
+ nori (~> 2.4)
118
+ wasabi (~> 3.4)
119
+ shellany (0.0.1)
120
+ socksify (1.7.1)
121
+ thor (0.20.3)
122
+ thread_safe (0.3.6)
123
+ tzinfo (1.2.5)
124
+ thread_safe (~> 0.1)
125
+ unicode-display_width (1.4.1)
126
+ wasabi (3.5.0)
127
+ httpi (~> 2.0)
128
+ nokogiri (>= 1.4.2)
129
+ webmock (3.5.1)
130
+ addressable (>= 2.3.6)
131
+ crack (>= 0.3.2)
132
+ hashdiff
133
+
134
+ PLATFORMS
135
+ ruby
136
+
137
+ DEPENDENCIES
138
+ autotask_ruby!
139
+ awesome_print (~> 1.8)
140
+ bundler (~> 1.17)
141
+ byebug (~> 10.0)
142
+ dotenv (~> 2.5)
143
+ guard (~> 2.15)
144
+ guard-rspec (~> 4.7)
145
+ rake (~> 12.3)
146
+ rspec (~> 3.8)
147
+ rubocop (~> 0.62)
148
+ rubocop-rspec (~> 1.31)
149
+ webmock (~> 3.5)
150
+
151
+ BUNDLED WITH
152
+ 1.17.1
@@ -0,0 +1,72 @@
1
+ # frozen_string_literal: true
2
+
3
+ # A sample Guardfile
4
+ # More info at https://github.com/guard/guard#readme
5
+
6
+ ## Uncomment and set this to only include directories you want to watch
7
+ # directories %w(app lib config test spec features) \
8
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
9
+
10
+ ## Note: if you are using the `directories` clause above and you are not
11
+ ## watching the project directory ('.'), then you will want to move
12
+ ## the Guardfile to a watched dir and symlink it back, e.g.
13
+ #
14
+ # $ mkdir config
15
+ # $ mv Guardfile config/
16
+ # $ ln -s config/Guardfile .
17
+ #
18
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
19
+
20
+ # Note: The cmd option is now required due to the increasing number of ways
21
+ # rspec may be run, below are examples of the most common uses.
22
+ # * bundler: 'bundle exec rspec'
23
+ # * bundler binstubs: 'bin/rspec'
24
+ # * spring: 'bin/rspec' (This will use spring if running and you have
25
+ # installed the spring binstubs per the docs)
26
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
27
+ # * 'just' rspec: 'rspec'
28
+
29
+ guard :rspec, cmd: 'bundle exec rspec' do
30
+ require 'guard/rspec/dsl'
31
+ dsl = Guard::RSpec::Dsl.new(self)
32
+
33
+ # Feel free to open issues for suggestions and improvements
34
+
35
+ # RSpec files
36
+ rspec = dsl.rspec
37
+ watch(rspec.spec_helper) { rspec.spec_dir }
38
+ watch(rspec.spec_support) { rspec.spec_dir }
39
+ watch(rspec.spec_files)
40
+
41
+ # Ruby files
42
+ ruby = dsl.ruby
43
+ dsl.watch_spec_files_for(ruby.lib_files)
44
+
45
+ # Rails files
46
+ rails = dsl.rails(view_extensions: %w[erb haml slim])
47
+ dsl.watch_spec_files_for(rails.app_files)
48
+ dsl.watch_spec_files_for(rails.views)
49
+
50
+ watch(rails.controllers) do |m|
51
+ [
52
+ rspec.spec.call("routing/#{m[1]}_routing"),
53
+ rspec.spec.call("controllers/#{m[1]}_controller"),
54
+ rspec.spec.call("acceptance/#{m[1]}")
55
+ ]
56
+ end
57
+
58
+ # Rails config changes
59
+ watch(rails.spec_helper) { rspec.spec_dir }
60
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
61
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
62
+
63
+ # Capybara features specs
64
+ watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
65
+ watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
66
+
67
+ # Turnip features and steps
68
+ watch(%r{^spec/acceptance/(.+)\.feature$})
69
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
70
+ Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance'
71
+ end
72
+ end
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Jared Jennings
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,73 @@
1
+ # AutotaskRuby
2
+
3
+ [ ![Codeship Status for trepidity/autotask_ruby](https://app.codeship.com/projects/31f37600-eacf-0136-594e-46a5d8fcc7b0/status?branch=master)](https://app.codeship.com/projects/319798)
4
+
5
+ Welcome to a ruby client that interacts with the Autotask API.
6
+
7
+ I intend for this to be a full-featured Ruby Client for the API.
8
+ It's still active development, but I expect that a 1.0 will be released around February 2019.
9
+
10
+ Comments, PR's are more than welcome. I would love to hear any ideas or suggestions.
11
+
12
+ ## Installation
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ ```ruby
17
+ gem 'autotask_ruby'
18
+ ```
19
+
20
+ And then execute:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install autotask_ruby
27
+
28
+ ## Usage
29
+
30
+ The `Client.rb` must be initialized to begin. The client class is responsible for
31
+ interacting with the API.
32
+
33
+ Every call to the Autotask API must include a 'IntegrationCode'. You can get this from Autotask.
34
+ Secondly, Autotask has multiple endpoints. Be sure to use the appropriate endpoint.
35
+
36
+ ### Initializing the Client.
37
+ ```ruby
38
+ AutotaskRuby::Client.new(basic_auth: [valid_api_user, valid_password],
39
+ integration_code: ENV['INTEGRATION_CODE'],
40
+ endpoint: endpoint)
41
+ ```
42
+
43
+ ### Using the find method
44
+
45
+ ```ruby
46
+ client.find('Account', 296162)
47
+ ```
48
+
49
+ ## Development
50
+
51
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
52
+
53
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
54
+
55
+ ## Contributing
56
+
57
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/autotask_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
58
+
59
+
60
+ ## License
61
+
62
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
63
+
64
+ ## Code of Conduct
65
+
66
+ Everyone interacting in the AutotaskRuby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/autotask_ruby/blob/master/CODE_OF_CONDUCT.md).
67
+
68
+ # Thank you.
69
+
70
+ Many thanks to the follow from whom I've shameless stolen code ideas.
71
+
72
+ * https://github.com/scoop/autotask_api
73
+ * https://github.com/TinderBox/soapforce