xolphin-api 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/.rspec +2 -0
  4. data/.rubocop.yml +28 -0
  5. data/.travis.yml +5 -0
  6. data/Gemfile +6 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +169 -0
  9. data/Rakefile +12 -0
  10. data/bin/console +14 -0
  11. data/bin/setup +8 -0
  12. data/examples/_credentials.rb +8 -0
  13. data/examples/certificate_cancel.rb +6 -0
  14. data/examples/certificate_reissue.rb +25 -0
  15. data/examples/certificate_renew.rb +22 -0
  16. data/examples/get_notes.rb +9 -0
  17. data/examples/request_create_ee.rb +29 -0
  18. data/examples/request_validation_call.rb +5 -0
  19. data/examples/requests_get.rb +7 -0
  20. data/examples/send_csa_email.rb +5 -0
  21. data/examples/send_note.rb +6 -0
  22. data/lib/xolphin/api.rb +32 -0
  23. data/lib/xolphin/api/certificate_requests/certificate_reissue.rb +47 -0
  24. data/lib/xolphin/api/certificate_requests/certificate_renew.rb +51 -0
  25. data/lib/xolphin/api/certificate_requests/create_certificate_request.rb +52 -0
  26. data/lib/xolphin/api/certificate_requests/create_ee_request.rb +33 -0
  27. data/lib/xolphin/api/client.rb +21 -0
  28. data/lib/xolphin/api/dcv_type.rb +9 -0
  29. data/lib/xolphin/api/endpoint/certificate.rb +59 -0
  30. data/lib/xolphin/api/endpoint/request.rb +86 -0
  31. data/lib/xolphin/api/endpoint/support.rb +47 -0
  32. data/lib/xolphin/api/format_type.rb +12 -0
  33. data/lib/xolphin/api/http.rb +67 -0
  34. data/lib/xolphin/api/product_type.rb +9 -0
  35. data/lib/xolphin/api/responses/base.rb +43 -0
  36. data/lib/xolphin/api/responses/certificate.rb +53 -0
  37. data/lib/xolphin/api/responses/certificates.rb +25 -0
  38. data/lib/xolphin/api/responses/csr_data.rb +43 -0
  39. data/lib/xolphin/api/responses/note.rb +37 -0
  40. data/lib/xolphin/api/responses/notes.rb +24 -0
  41. data/lib/xolphin/api/responses/product.rb +53 -0
  42. data/lib/xolphin/api/responses/product_price.rb +27 -0
  43. data/lib/xolphin/api/responses/products.rb +25 -0
  44. data/lib/xolphin/api/responses/request.rb +119 -0
  45. data/lib/xolphin/api/responses/request_ee.rb +29 -0
  46. data/lib/xolphin/api/responses/request_validation.rb +37 -0
  47. data/lib/xolphin/api/responses/request_validation_domain.rb +35 -0
  48. data/lib/xolphin/api/responses/requests.rb +25 -0
  49. data/lib/xolphin/api/version.rb +5 -0
  50. data/xolphin-api-0.1.0.gem +0 -0
  51. data/xolphin-api.gemspec +26 -0
  52. metadata +136 -0
@@ -0,0 +1,29 @@
1
+ require 'time'
2
+
3
+ module Xolphin
4
+ module Api
5
+ module Responses
6
+ class RequestEE < Base
7
+ def initialize(data)
8
+ super(data)
9
+ end
10
+
11
+ def id
12
+ @data["id"]
13
+ end
14
+
15
+ def date_ordered
16
+ Time.parse(@data["dateOrdered"])
17
+ end
18
+
19
+ def certificate
20
+ @data["certificate"]
21
+ end
22
+
23
+ def pkcs7
24
+ @data["pkcs7"]
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,37 @@
1
+ module Xolphin
2
+ module Api
3
+ module Responses
4
+ class RequestValidation < Base
5
+ def initialize(data)
6
+ super(data)
7
+ end
8
+
9
+ def status
10
+ @data["status"]
11
+ end
12
+
13
+ def status_detail
14
+ @data["statusDetail"]
15
+ end
16
+
17
+ def status_message
18
+ @data["statusMessage"]
19
+ end
20
+
21
+ def domains
22
+ @domains ||= begin
23
+ domains = []
24
+
25
+ if @data["domains"]
26
+ @data["domains"].each do |domain|
27
+ domains << RequestValidationDomain.new(domain)
28
+ end
29
+ end
30
+
31
+ domains
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,35 @@
1
+ module Xolphin
2
+ module Api
3
+ module Responses
4
+ class RequestValidationDomain < Base
5
+ def initialize(data)
6
+ super(data)
7
+ end
8
+
9
+ def domain
10
+ @data["domain"]
11
+ end
12
+
13
+ def status
14
+ @data["status"]
15
+ end
16
+
17
+ def status_detail
18
+ @data["statusDetail"]
19
+ end
20
+
21
+ def status_message
22
+ @data["statusMessage"]
23
+ end
24
+
25
+ def dcv_type
26
+ @data["dcvType"]
27
+ end
28
+
29
+ def dcv_email
30
+ @data["dcvEmail"]
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,25 @@
1
+ module Xolphin
2
+ module Api
3
+ module Responses
4
+ class Requests < Base
5
+ def initialize(data)
6
+ super(data)
7
+ end
8
+
9
+ def requests
10
+ @requests ||= begin
11
+ requests = []
12
+
13
+ if _embedded && _embedded["requests"]
14
+ _embedded["requests"].each do |request|
15
+ requests << Request.new(request)
16
+ end
17
+ end
18
+
19
+ requests
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,5 @@
1
+ module Xolphin
2
+ module Api
3
+ VERSION = "1.5.0".freeze
4
+ end
5
+ end
Binary file
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'xolphin/api/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "xolphin-api"
8
+ spec.version = Xolphin::Api::VERSION
9
+ spec.authors = ["Kentaa"]
10
+ spec.email = ["support@kentaa.nl"]
11
+
12
+ spec.summary = "Xolphin API module for Ruby"
13
+ spec.homepage = "https://xolphin.nl/"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
+ f.match(%r{^(test|spec|features)/})
18
+ end
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.13"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "rspec", "~> 3.0"
26
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: xolphin-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.5.0
5
+ platform: ruby
6
+ authors:
7
+ - Kentaa
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ description:
56
+ email:
57
+ - support@kentaa.nl
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".gitignore"
63
+ - ".rspec"
64
+ - ".rubocop.yml"
65
+ - ".travis.yml"
66
+ - Gemfile
67
+ - LICENSE.txt
68
+ - README.md
69
+ - Rakefile
70
+ - bin/console
71
+ - bin/setup
72
+ - examples/_credentials.rb
73
+ - examples/certificate_cancel.rb
74
+ - examples/certificate_reissue.rb
75
+ - examples/certificate_renew.rb
76
+ - examples/get_notes.rb
77
+ - examples/request_create_ee.rb
78
+ - examples/request_validation_call.rb
79
+ - examples/requests_get.rb
80
+ - examples/send_csa_email.rb
81
+ - examples/send_note.rb
82
+ - lib/xolphin/api.rb
83
+ - lib/xolphin/api/certificate_requests/certificate_reissue.rb
84
+ - lib/xolphin/api/certificate_requests/certificate_renew.rb
85
+ - lib/xolphin/api/certificate_requests/create_certificate_request.rb
86
+ - lib/xolphin/api/certificate_requests/create_ee_request.rb
87
+ - lib/xolphin/api/client.rb
88
+ - lib/xolphin/api/dcv_type.rb
89
+ - lib/xolphin/api/endpoint/certificate.rb
90
+ - lib/xolphin/api/endpoint/request.rb
91
+ - lib/xolphin/api/endpoint/support.rb
92
+ - lib/xolphin/api/format_type.rb
93
+ - lib/xolphin/api/http.rb
94
+ - lib/xolphin/api/product_type.rb
95
+ - lib/xolphin/api/responses/base.rb
96
+ - lib/xolphin/api/responses/certificate.rb
97
+ - lib/xolphin/api/responses/certificates.rb
98
+ - lib/xolphin/api/responses/csr_data.rb
99
+ - lib/xolphin/api/responses/note.rb
100
+ - lib/xolphin/api/responses/notes.rb
101
+ - lib/xolphin/api/responses/product.rb
102
+ - lib/xolphin/api/responses/product_price.rb
103
+ - lib/xolphin/api/responses/products.rb
104
+ - lib/xolphin/api/responses/request.rb
105
+ - lib/xolphin/api/responses/request_ee.rb
106
+ - lib/xolphin/api/responses/request_validation.rb
107
+ - lib/xolphin/api/responses/request_validation_domain.rb
108
+ - lib/xolphin/api/responses/requests.rb
109
+ - lib/xolphin/api/version.rb
110
+ - xolphin-api-0.1.0.gem
111
+ - xolphin-api.gemspec
112
+ homepage: https://xolphin.nl/
113
+ licenses:
114
+ - MIT
115
+ metadata: {}
116
+ post_install_message:
117
+ rdoc_options: []
118
+ require_paths:
119
+ - lib
120
+ required_ruby_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ requirements: []
131
+ rubyforge_project:
132
+ rubygems_version: 2.5.1
133
+ signing_key:
134
+ specification_version: 4
135
+ summary: Xolphin API module for Ruby
136
+ test_files: []