xolphin-api 1.5.0 → 1.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +13 -12
- data/.rspec +2 -2
- data/.rubocop.yml +28 -28
- data/.travis.yml +5 -5
- data/CHANGELOG.md +19 -0
- data/Gemfile +6 -6
- data/LICENSE.txt +21 -21
- data/README.md +169 -169
- data/Rakefile +12 -12
- data/bin/console +14 -14
- data/bin/setup +8 -8
- data/examples/_credentials.rb +9 -8
- data/examples/certificate_cancel.rb +6 -6
- data/examples/certificate_reissue.rb +23 -25
- data/examples/certificate_renew.rb +22 -22
- data/examples/get_notes.rb +9 -9
- data/examples/invoices_get.rb +7 -0
- data/examples/request_create_ee.rb +29 -29
- data/examples/request_validation_call.rb +5 -5
- data/examples/requests_get.rb +7 -7
- data/examples/send_csa_email.rb +5 -5
- data/examples/send_note.rb +6 -6
- data/lib/xolphin/api/certificate_requests/certificate_reissue.rb +47 -47
- data/lib/xolphin/api/certificate_requests/certificate_renew.rb +51 -51
- data/lib/xolphin/api/certificate_requests/create_certificate_request.rb +53 -52
- data/lib/xolphin/api/certificate_requests/create_ee_request.rb +28 -33
- data/lib/xolphin/api/client.rb +25 -21
- data/lib/xolphin/api/dcv_type.rb +9 -9
- data/lib/xolphin/api/endpoint/certificate.rb +59 -59
- data/lib/xolphin/api/endpoint/invoice.rb +40 -0
- data/lib/xolphin/api/endpoint/request.rb +90 -86
- data/lib/xolphin/api/endpoint/support.rb +47 -47
- data/lib/xolphin/api/format_type.rb +12 -12
- data/lib/xolphin/api/http.rb +67 -67
- data/lib/xolphin/api/invoice_format_type.rb +8 -0
- data/lib/xolphin/api/product_type.rb +9 -9
- data/lib/xolphin/api/responses/base.rb +43 -43
- data/lib/xolphin/api/responses/certificate.rb +53 -53
- data/lib/xolphin/api/responses/certificates.rb +25 -25
- data/lib/xolphin/api/responses/csr_data.rb +43 -43
- data/lib/xolphin/api/responses/invoice.rb +57 -0
- data/lib/xolphin/api/responses/invoices.rb +25 -0
- data/lib/xolphin/api/responses/note.rb +45 -37
- data/lib/xolphin/api/responses/notes.rb +23 -24
- data/lib/xolphin/api/responses/product.rb +53 -53
- data/lib/xolphin/api/responses/product_price.rb +27 -27
- data/lib/xolphin/api/responses/products.rb +25 -25
- data/lib/xolphin/api/responses/request.rb +119 -119
- data/lib/xolphin/api/responses/request_ee.rb +29 -29
- data/lib/xolphin/api/responses/request_validation.rb +37 -37
- data/lib/xolphin/api/responses/request_validation_domain.rb +51 -35
- data/lib/xolphin/api/responses/requests.rb +25 -25
- data/lib/xolphin/api/responses/validation_call.rb +23 -0
- data/lib/xolphin/api/responses/validation_calls.rb +25 -0
- data/lib/xolphin/api/version.rb +5 -5
- data/lib/xolphin/api.rb +38 -32
- data/xolphin-api.gemspec +25 -26
- metadata +17 -9
- data/xolphin-api-0.1.0.gem +0 -0
@@ -1,27 +1,27 @@
|
|
1
|
-
module Xolphin
|
2
|
-
module Api
|
3
|
-
module Responses
|
4
|
-
class ProductPrice < Base
|
5
|
-
def initialize(data)
|
6
|
-
super(data)
|
7
|
-
end
|
8
|
-
|
9
|
-
def years
|
10
|
-
@data["years"]
|
11
|
-
end
|
12
|
-
|
13
|
-
def price
|
14
|
-
@data["price"]
|
15
|
-
end
|
16
|
-
|
17
|
-
def extra_price
|
18
|
-
@data["extraPrice"]
|
19
|
-
end
|
20
|
-
|
21
|
-
def extra_price_wildcard
|
22
|
-
@data["extraPriceWildcard"]
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
1
|
+
module Xolphin
|
2
|
+
module Api
|
3
|
+
module Responses
|
4
|
+
class ProductPrice < Base
|
5
|
+
def initialize(data)
|
6
|
+
super(data)
|
7
|
+
end
|
8
|
+
|
9
|
+
def years
|
10
|
+
@data["years"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def price
|
14
|
+
@data["price"]
|
15
|
+
end
|
16
|
+
|
17
|
+
def extra_price
|
18
|
+
@data["extraPrice"]
|
19
|
+
end
|
20
|
+
|
21
|
+
def extra_price_wildcard
|
22
|
+
@data["extraPriceWildcard"]
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -1,25 +1,25 @@
|
|
1
|
-
module Xolphin
|
2
|
-
module Api
|
3
|
-
module Responses
|
4
|
-
class Products < Base
|
5
|
-
def initialize(data)
|
6
|
-
super(data)
|
7
|
-
end
|
8
|
-
|
9
|
-
def products
|
10
|
-
@products ||= begin
|
11
|
-
products = []
|
12
|
-
|
13
|
-
if _embedded && _embedded["products"]
|
14
|
-
_embedded["products"].each do |product|
|
15
|
-
products << Product.new(product)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
products
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
1
|
+
module Xolphin
|
2
|
+
module Api
|
3
|
+
module Responses
|
4
|
+
class Products < Base
|
5
|
+
def initialize(data)
|
6
|
+
super(data)
|
7
|
+
end
|
8
|
+
|
9
|
+
def products
|
10
|
+
@products ||= begin
|
11
|
+
products = []
|
12
|
+
|
13
|
+
if _embedded && _embedded["products"]
|
14
|
+
_embedded["products"].each do |product|
|
15
|
+
products << Product.new(product)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
products
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,119 +1,119 @@
|
|
1
|
-
require 'time'
|
2
|
-
|
3
|
-
module Xolphin
|
4
|
-
module Api
|
5
|
-
module Responses
|
6
|
-
class Request < Base
|
7
|
-
def initialize(data)
|
8
|
-
super(data)
|
9
|
-
end
|
10
|
-
|
11
|
-
def id
|
12
|
-
@data["id"]
|
13
|
-
end
|
14
|
-
|
15
|
-
def domain_name
|
16
|
-
@data["domainName"]
|
17
|
-
end
|
18
|
-
|
19
|
-
def company
|
20
|
-
@data["company"]
|
21
|
-
end
|
22
|
-
|
23
|
-
def date_ordered
|
24
|
-
Time.parse(@data["dateOrdered"])
|
25
|
-
end
|
26
|
-
|
27
|
-
def subject_alternative_names
|
28
|
-
@data["subjectAlternativeNames"]
|
29
|
-
end
|
30
|
-
|
31
|
-
def years
|
32
|
-
@data["years"]
|
33
|
-
end
|
34
|
-
|
35
|
-
def department
|
36
|
-
@data["department"]
|
37
|
-
end
|
38
|
-
|
39
|
-
def address
|
40
|
-
@data["address"]
|
41
|
-
end
|
42
|
-
|
43
|
-
def zipcode
|
44
|
-
@data["zipcode"]
|
45
|
-
end
|
46
|
-
|
47
|
-
def city
|
48
|
-
@data["city"]
|
49
|
-
end
|
50
|
-
|
51
|
-
def province
|
52
|
-
@data["province"]
|
53
|
-
end
|
54
|
-
|
55
|
-
def country
|
56
|
-
@data["country"]
|
57
|
-
end
|
58
|
-
|
59
|
-
def reference
|
60
|
-
@data["reference"]
|
61
|
-
end
|
62
|
-
|
63
|
-
def approver_first_name
|
64
|
-
@data["approverFirstName"]
|
65
|
-
end
|
66
|
-
|
67
|
-
def approver_last_name
|
68
|
-
@data["approverLastName"]
|
69
|
-
end
|
70
|
-
|
71
|
-
def approver_email
|
72
|
-
@data["approverEmail"]
|
73
|
-
end
|
74
|
-
|
75
|
-
def approver_phone
|
76
|
-
@data["approverPhone"]
|
77
|
-
end
|
78
|
-
|
79
|
-
def postbox
|
80
|
-
@data["postbox"]
|
81
|
-
end
|
82
|
-
|
83
|
-
def kvk
|
84
|
-
@data["kvk"]
|
85
|
-
end
|
86
|
-
|
87
|
-
def reqiures_action
|
88
|
-
@data["requiresAction"]
|
89
|
-
end
|
90
|
-
|
91
|
-
def brand_validation
|
92
|
-
@data["brandValidation"]
|
93
|
-
end
|
94
|
-
|
95
|
-
def validations
|
96
|
-
@validations ||= begin
|
97
|
-
validations = []
|
98
|
-
|
99
|
-
if @data["validations"]
|
100
|
-
@data["validations"].each do |validation|
|
101
|
-
validations << RequestValidation.new(validation)
|
102
|
-
end
|
103
|
-
end
|
104
|
-
|
105
|
-
validations
|
106
|
-
end
|
107
|
-
end
|
108
|
-
|
109
|
-
def product
|
110
|
-
@product ||= begin
|
111
|
-
if _embedded && _embedded["product"]
|
112
|
-
Product.new(_embedded["product"])
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
end
|
119
|
-
end
|
1
|
+
require 'time'
|
2
|
+
|
3
|
+
module Xolphin
|
4
|
+
module Api
|
5
|
+
module Responses
|
6
|
+
class Request < Base
|
7
|
+
def initialize(data)
|
8
|
+
super(data)
|
9
|
+
end
|
10
|
+
|
11
|
+
def id
|
12
|
+
@data["id"]
|
13
|
+
end
|
14
|
+
|
15
|
+
def domain_name
|
16
|
+
@data["domainName"]
|
17
|
+
end
|
18
|
+
|
19
|
+
def company
|
20
|
+
@data["company"]
|
21
|
+
end
|
22
|
+
|
23
|
+
def date_ordered
|
24
|
+
Time.parse(@data["dateOrdered"])
|
25
|
+
end
|
26
|
+
|
27
|
+
def subject_alternative_names
|
28
|
+
@data["subjectAlternativeNames"]
|
29
|
+
end
|
30
|
+
|
31
|
+
def years
|
32
|
+
@data["years"]
|
33
|
+
end
|
34
|
+
|
35
|
+
def department
|
36
|
+
@data["department"]
|
37
|
+
end
|
38
|
+
|
39
|
+
def address
|
40
|
+
@data["address"]
|
41
|
+
end
|
42
|
+
|
43
|
+
def zipcode
|
44
|
+
@data["zipcode"]
|
45
|
+
end
|
46
|
+
|
47
|
+
def city
|
48
|
+
@data["city"]
|
49
|
+
end
|
50
|
+
|
51
|
+
def province
|
52
|
+
@data["province"]
|
53
|
+
end
|
54
|
+
|
55
|
+
def country
|
56
|
+
@data["country"]
|
57
|
+
end
|
58
|
+
|
59
|
+
def reference
|
60
|
+
@data["reference"]
|
61
|
+
end
|
62
|
+
|
63
|
+
def approver_first_name
|
64
|
+
@data["approverFirstName"]
|
65
|
+
end
|
66
|
+
|
67
|
+
def approver_last_name
|
68
|
+
@data["approverLastName"]
|
69
|
+
end
|
70
|
+
|
71
|
+
def approver_email
|
72
|
+
@data["approverEmail"]
|
73
|
+
end
|
74
|
+
|
75
|
+
def approver_phone
|
76
|
+
@data["approverPhone"]
|
77
|
+
end
|
78
|
+
|
79
|
+
def postbox
|
80
|
+
@data["postbox"]
|
81
|
+
end
|
82
|
+
|
83
|
+
def kvk
|
84
|
+
@data["kvk"]
|
85
|
+
end
|
86
|
+
|
87
|
+
def reqiures_action
|
88
|
+
@data["requiresAction"]
|
89
|
+
end
|
90
|
+
|
91
|
+
def brand_validation
|
92
|
+
@data["brandValidation"]
|
93
|
+
end
|
94
|
+
|
95
|
+
def validations
|
96
|
+
@validations ||= begin
|
97
|
+
validations = []
|
98
|
+
|
99
|
+
if @data["validations"]
|
100
|
+
@data["validations"].each do |validation|
|
101
|
+
validations << RequestValidation.new(validation)
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
105
|
+
validations
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def product
|
110
|
+
@product ||= begin
|
111
|
+
if _embedded && _embedded["product"]
|
112
|
+
Product.new(_embedded["product"])
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -1,29 +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
|
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
|
@@ -1,37 +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
|
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
|
@@ -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
|
-
|
33
|
-
|
34
|
-
|
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
|
data/lib/xolphin/api/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
module Xolphin
|
2
|
-
module Api
|
3
|
-
VERSION = "1.
|
4
|
-
end
|
5
|
-
end
|
1
|
+
module Xolphin
|
2
|
+
module Api
|
3
|
+
VERSION = "1.8.0".freeze
|
4
|
+
end
|
5
|
+
end
|