xolphin-api 1.5.0 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +13 -12
  3. data/.rspec +2 -2
  4. data/.rubocop.yml +28 -28
  5. data/.travis.yml +5 -5
  6. data/CHANGELOG.md +19 -0
  7. data/Gemfile +6 -6
  8. data/LICENSE.txt +21 -21
  9. data/README.md +169 -169
  10. data/Rakefile +12 -12
  11. data/bin/console +14 -14
  12. data/bin/setup +8 -8
  13. data/examples/_credentials.rb +9 -8
  14. data/examples/certificate_cancel.rb +6 -6
  15. data/examples/certificate_reissue.rb +23 -25
  16. data/examples/certificate_renew.rb +22 -22
  17. data/examples/get_notes.rb +9 -9
  18. data/examples/invoices_get.rb +7 -0
  19. data/examples/request_create.rb +40 -0
  20. data/examples/request_create_ee.rb +29 -29
  21. data/examples/request_get_id.rb +6 -0
  22. data/examples/request_validation_call.rb +6 -5
  23. data/examples/requests_get.rb +8 -7
  24. data/examples/send_csa_email.rb +5 -5
  25. data/examples/send_note.rb +6 -6
  26. data/lib/xolphin/api/certificate_requests/certificate_reissue.rb +54 -47
  27. data/lib/xolphin/api/certificate_requests/certificate_renew.rb +58 -51
  28. data/lib/xolphin/api/certificate_requests/create_certificate_request.rb +59 -52
  29. data/lib/xolphin/api/certificate_requests/create_ee_request.rb +28 -33
  30. data/lib/xolphin/api/client.rb +25 -21
  31. data/lib/xolphin/api/dcv_type.rb +9 -9
  32. data/lib/xolphin/api/endpoint/certificate.rb +59 -59
  33. data/lib/xolphin/api/endpoint/invoice.rb +40 -0
  34. data/lib/xolphin/api/endpoint/request.rb +116 -86
  35. data/lib/xolphin/api/endpoint/support.rb +47 -47
  36. data/lib/xolphin/api/format_type.rb +12 -12
  37. data/lib/xolphin/api/http.rb +70 -67
  38. data/lib/xolphin/api/invoice_format_type.rb +8 -0
  39. data/lib/xolphin/api/product_type.rb +9 -9
  40. data/lib/xolphin/api/responses/base.rb +43 -43
  41. data/lib/xolphin/api/responses/certificate.rb +53 -53
  42. data/lib/xolphin/api/responses/certificates.rb +25 -25
  43. data/lib/xolphin/api/responses/csr_data.rb +43 -43
  44. data/lib/xolphin/api/responses/invoice.rb +57 -0
  45. data/lib/xolphin/api/responses/invoices.rb +25 -0
  46. data/lib/xolphin/api/responses/note.rb +45 -37
  47. data/lib/xolphin/api/responses/notes.rb +23 -24
  48. data/lib/xolphin/api/responses/product.rb +53 -53
  49. data/lib/xolphin/api/responses/product_price.rb +27 -27
  50. data/lib/xolphin/api/responses/products.rb +25 -25
  51. data/lib/xolphin/api/responses/request.rb +142 -119
  52. data/lib/xolphin/api/responses/request_ee.rb +29 -29
  53. data/lib/xolphin/api/responses/request_validation.rb +37 -37
  54. data/lib/xolphin/api/responses/request_validation_domain.rb +51 -35
  55. data/lib/xolphin/api/responses/requests.rb +25 -25
  56. data/lib/xolphin/api/responses/validation_call.rb +23 -0
  57. data/lib/xolphin/api/responses/validation_calls.rb +25 -0
  58. data/lib/xolphin/api/version.rb +5 -5
  59. data/lib/xolphin/api.rb +38 -32
  60. data/xolphin-api.gemspec +25 -26
  61. metadata +19 -9
  62. data/xolphin-api-0.1.0.gem +0 -0
@@ -1,35 +1,51 @@
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
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
+
33
+ def dns_record
34
+ @data["dnsRecord"]
35
+ end
36
+
37
+ def dns_cname_value
38
+ @data["dnsCnameValue"]
39
+ end
40
+
41
+ def file_location
42
+ @data["fileLocation"]
43
+ end
44
+
45
+ def file_contents
46
+ @data["fileContents"]
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -1,25 +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
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,23 @@
1
+ module Xolphin
2
+ module Api
3
+ module Responses
4
+ class ValidationCall < Base
5
+ def initialize(data)
6
+ super(data)
7
+ end
8
+
9
+ def request_id
10
+ @data['requestId']
11
+ end
12
+
13
+ def date
14
+ @data['date']
15
+ end
16
+
17
+ def time
18
+ @data['time']
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ module Xolphin
2
+ module Api
3
+ module Responses
4
+ class ValidationCalls < Base
5
+ def initialize(data)
6
+ super(data)
7
+ end
8
+
9
+ def calls
10
+ @calls ||= begin
11
+ calls = []
12
+
13
+ if @data["list"]
14
+ @data["list"].each do |call|
15
+ calls << ValidationCall.new(call)
16
+ end
17
+ end
18
+
19
+ calls
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -1,5 +1,5 @@
1
- module Xolphin
2
- module Api
3
- VERSION = "1.5.0".freeze
4
- end
5
- end
1
+ module Xolphin
2
+ module Api
3
+ VERSION = "1.9.0".freeze
4
+ end
5
+ end
data/lib/xolphin/api.rb CHANGED
@@ -1,32 +1,38 @@
1
- require_relative "api/certificate_requests/create_certificate_request"
2
- require_relative "api/certificate_requests/create_ee_request"
3
- require_relative "api/certificate_requests/certificate_reissue"
4
- require_relative "api/certificate_requests/certificate_renew"
5
-
6
- require_relative "api/endpoint/certificate"
7
- require_relative "api/endpoint/request"
8
- require_relative "api/endpoint/support"
9
-
10
- require_relative "api/responses/base"
11
- require_relative "api/responses/certificate"
12
- require_relative "api/responses/certificates"
13
- require_relative "api/responses/csr_data"
14
- require_relative "api/responses/product_price"
15
- require_relative "api/responses/product"
16
- require_relative "api/responses/products"
17
- require_relative "api/responses/request_validation_domain"
18
- require_relative "api/responses/request_validation"
19
- require_relative "api/responses/request"
20
- require_relative "api/responses/request_ee"
21
- require_relative "api/responses/requests"
22
- require_relative "api/responses/note"
23
- require_relative "api/responses/notes"
24
-
25
- require_relative "api/client"
26
- require_relative "api/http"
27
-
28
- require_relative "api/dcv_type"
29
- require_relative "api/format_type"
30
- require_relative "api/product_type"
31
-
32
- require_relative "api/version"
1
+ require_relative "api/certificate_requests/create_certificate_request"
2
+ require_relative "api/certificate_requests/create_ee_request"
3
+ require_relative "api/certificate_requests/certificate_reissue"
4
+ require_relative "api/certificate_requests/certificate_renew"
5
+
6
+ require_relative "api/endpoint/certificate"
7
+ require_relative "api/endpoint/request"
8
+ require_relative "api/endpoint/support"
9
+ require_relative "api/endpoint/invoice"
10
+
11
+ require_relative "api/responses/base"
12
+ require_relative "api/responses/certificate"
13
+ require_relative "api/responses/certificates"
14
+ require_relative "api/responses/csr_data"
15
+ require_relative "api/responses/product_price"
16
+ require_relative "api/responses/product"
17
+ require_relative "api/responses/products"
18
+ require_relative "api/responses/request_validation_domain"
19
+ require_relative "api/responses/request_validation"
20
+ require_relative "api/responses/request"
21
+ require_relative "api/responses/request_ee"
22
+ require_relative "api/responses/requests"
23
+ require_relative "api/responses/note"
24
+ require_relative "api/responses/notes"
25
+ require_relative "api/responses/validation_call"
26
+ require_relative "api/responses/validation_calls"
27
+ require_relative "api/responses/invoice"
28
+ require_relative "api/responses/invoices"
29
+
30
+ require_relative "api/client"
31
+ require_relative "api/http"
32
+
33
+ require_relative "api/dcv_type"
34
+ require_relative "api/format_type"
35
+ require_relative "api/product_type"
36
+ require_relative "api/invoice_format_type"
37
+
38
+ require_relative "api/version"
data/xolphin-api.gemspec CHANGED
@@ -1,26 +1,25 @@
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
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 = ["Xolphin", "Bart van Kalmthout - Faber"]
10
+ spec.email = ["api@xolphin.com", "bart@xolphin.nl"]
11
+ spec.summary = "Xolphin API module for Ruby"
12
+ spec.homepage = "https://xolphin.nl/"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
16
+ f.match(%r{^(test|spec|features)/})
17
+ end
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_development_dependency "bundler", "~> 1.13"
23
+ spec.add_development_dependency "rake", "~> 13.0"
24
+ spec.add_development_dependency "rspec", "~> 3.0"
25
+ end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xolphin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.9.0
5
5
  platform: ruby
6
6
  authors:
7
- - Kentaa
7
+ - Xolphin
8
+ - Bart van Kalmthout - Faber
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2017-06-07 00:00:00.000000000 Z
12
+ date: 2023-11-24 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: bundler
@@ -30,14 +31,14 @@ dependencies:
30
31
  requirements:
31
32
  - - "~>"
32
33
  - !ruby/object:Gem::Version
33
- version: '10.0'
34
+ version: '13.0'
34
35
  type: :development
35
36
  prerelease: false
36
37
  version_requirements: !ruby/object:Gem::Requirement
37
38
  requirements:
38
39
  - - "~>"
39
40
  - !ruby/object:Gem::Version
40
- version: '10.0'
41
+ version: '13.0'
41
42
  - !ruby/object:Gem::Dependency
42
43
  name: rspec
43
44
  requirement: !ruby/object:Gem::Requirement
@@ -54,7 +55,8 @@ dependencies:
54
55
  version: '3.0'
55
56
  description:
56
57
  email:
57
- - support@kentaa.nl
58
+ - api@xolphin.com
59
+ - bart@xolphin.nl
58
60
  executables: []
59
61
  extensions: []
60
62
  extra_rdoc_files: []
@@ -63,6 +65,7 @@ files:
63
65
  - ".rspec"
64
66
  - ".rubocop.yml"
65
67
  - ".travis.yml"
68
+ - CHANGELOG.md
66
69
  - Gemfile
67
70
  - LICENSE.txt
68
71
  - README.md
@@ -74,7 +77,10 @@ files:
74
77
  - examples/certificate_reissue.rb
75
78
  - examples/certificate_renew.rb
76
79
  - examples/get_notes.rb
80
+ - examples/invoices_get.rb
81
+ - examples/request_create.rb
77
82
  - examples/request_create_ee.rb
83
+ - examples/request_get_id.rb
78
84
  - examples/request_validation_call.rb
79
85
  - examples/requests_get.rb
80
86
  - examples/send_csa_email.rb
@@ -87,15 +93,19 @@ files:
87
93
  - lib/xolphin/api/client.rb
88
94
  - lib/xolphin/api/dcv_type.rb
89
95
  - lib/xolphin/api/endpoint/certificate.rb
96
+ - lib/xolphin/api/endpoint/invoice.rb
90
97
  - lib/xolphin/api/endpoint/request.rb
91
98
  - lib/xolphin/api/endpoint/support.rb
92
99
  - lib/xolphin/api/format_type.rb
93
100
  - lib/xolphin/api/http.rb
101
+ - lib/xolphin/api/invoice_format_type.rb
94
102
  - lib/xolphin/api/product_type.rb
95
103
  - lib/xolphin/api/responses/base.rb
96
104
  - lib/xolphin/api/responses/certificate.rb
97
105
  - lib/xolphin/api/responses/certificates.rb
98
106
  - lib/xolphin/api/responses/csr_data.rb
107
+ - lib/xolphin/api/responses/invoice.rb
108
+ - lib/xolphin/api/responses/invoices.rb
99
109
  - lib/xolphin/api/responses/note.rb
100
110
  - lib/xolphin/api/responses/notes.rb
101
111
  - lib/xolphin/api/responses/product.rb
@@ -106,8 +116,9 @@ files:
106
116
  - lib/xolphin/api/responses/request_validation.rb
107
117
  - lib/xolphin/api/responses/request_validation_domain.rb
108
118
  - lib/xolphin/api/responses/requests.rb
119
+ - lib/xolphin/api/responses/validation_call.rb
120
+ - lib/xolphin/api/responses/validation_calls.rb
109
121
  - lib/xolphin/api/version.rb
110
- - xolphin-api-0.1.0.gem
111
122
  - xolphin-api.gemspec
112
123
  homepage: https://xolphin.nl/
113
124
  licenses:
@@ -128,8 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
139
  - !ruby/object:Gem::Version
129
140
  version: '0'
130
141
  requirements: []
131
- rubyforge_project:
132
- rubygems_version: 2.5.1
142
+ rubygems_version: 3.1.2
133
143
  signing_key:
134
144
  specification_version: 4
135
145
  summary: Xolphin API module for Ruby
Binary file