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,25 +1,23 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- email = '<email>';
4
-
5
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password)
6
- certificate = client.certificate.get(950000487);
7
- request = Xolphin::Api::CertificateRequests::ReissueCertificateRequest.new("-----BEGIN CERTIFICATE REQUEST-----
8
- MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkJSMQ0wCwYDVQQIDAR0ZXN0MQ0wCwYD
9
- VQQHDAR0ZXN0MQ0wCwYDVQQKDAR0ZXN0MQ0wCwYDVQQLDAR0ZXN0MRswGQYDVQQD
10
- DBJleGNoYW5nZS5taGltZWUubmwxHjAcBgkqhkiG9w0BCQEWD3BpemRhQGdtYWls
11
- LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfH+piYuiOBlGSS
12
- wN0R9MuMqWa6XbUE4dwjzbCcocoqW4cLC9SWpHoYjwlSpsuyJNrzxe5rwiiyNGUi
13
- Unm+HrY1+ADa+sCQhL2+siPd6nIZeNWrC6Zw1KDaAVWmm8x2gZb7+aDyA7l35BHB
14
- 2LJ2tbgvcpLr8dOcN4f0DI719eEM5QtpYvf5YVEKCrAizirwFhx4xjPVW4jHsM1G
15
- wb0f115+HJgB69cign5XCKykqZ2lmJpzfZ1DQ7vU2MyRzxukD1QQy8aDf5w3lmlY
16
- baB1ofchJ5YiLO7Y0fxW18J6zEbfrsHgECQ29COpojNsdDy30Vt9g5br89EzdZlb
17
- End4NRsCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBuOIZ4R6kfC5b7p8SOwXkS
18
- Q/g93311lGT7ArKn/XyFFrTEtYa3SN9QotaIgNxG6gXxgh/LD8g8w9q3wYswayzY
19
- cz6+5YjfblHcrWJ5zwVrKyD+8QLuC5xhrEFBBmYjzxihjAWkYtvaC4YKuo1PxESs
20
- RFlZosJFLIZpToXnGUfc5HgaI1/270plv57+1nOP4r+129d9r94z8sNDZACyi7Mp
21
- mHc7dQXFcmnyCk3PW9uwqU13pT08yrRHRTOTB25DkGqNG8IHtv9XJqfL1u7/FJil
22
- 7W7eDOdoDXRHBZX9RlEZlekHE7kpziH7E7517BOX/RTmGLLQRmqPiZWkU8eWzHCl
23
- -----END CERTIFICATE REQUEST-----", 'EMAIL')
24
- request.approver_email = "test@gmail.com"
25
- puts client.certificate.reissue(certificate.id, request).inspect
1
+ require_relative "../lib/xolphin/api"
2
+
3
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password)
4
+ certificate = client.certificate.get(950_000_487)
5
+ request = Xolphin::Api::CertificateRequests::ReissueCertificateRequest.new("-----BEGIN CERTIFICATE REQUEST-----
6
+ MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkJSMQ0wCwYDVQQIDAR0ZXN0MQ0wCwYD
7
+ VQQHDAR0ZXN0MQ0wCwYDVQQKDAR0ZXN0MQ0wCwYDVQQLDAR0ZXN0MRswGQYDVQQD
8
+ DBJleGNoYW5nZS5taGltZWUubmwxHjAcBgkqhkiG9w0BCQEWD3BpemRhQGdtYWls
9
+ LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfH+piYuiOBlGSS
10
+ wN0R9MuMqWa6XbUE4dwjzbCcocoqW4cLC9SWpHoYjwlSpsuyJNrzxe5rwiiyNGUi
11
+ Unm+HrY1+ADa+sCQhL2+siPd6nIZeNWrC6Zw1KDaAVWmm8x2gZb7+aDyA7l35BHB
12
+ 2LJ2tbgvcpLr8dOcN4f0DI719eEM5QtpYvf5YVEKCrAizirwFhx4xjPVW4jHsM1G
13
+ wb0f115+HJgB69cign5XCKykqZ2lmJpzfZ1DQ7vU2MyRzxukD1QQy8aDf5w3lmlY
14
+ baB1ofchJ5YiLO7Y0fxW18J6zEbfrsHgECQ29COpojNsdDy30Vt9g5br89EzdZlb
15
+ End4NRsCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBuOIZ4R6kfC5b7p8SOwXkS
16
+ Q/g93311lGT7ArKn/XyFFrTEtYa3SN9QotaIgNxG6gXxgh/LD8g8w9q3wYswayzY
17
+ cz6+5YjfblHcrWJ5zwVrKyD+8QLuC5xhrEFBBmYjzxihjAWkYtvaC4YKuo1PxESs
18
+ RFlZosJFLIZpToXnGUfc5HgaI1/270plv57+1nOP4r+129d9r94z8sNDZACyi7Mp
19
+ mHc7dQXFcmnyCk3PW9uwqU13pT08yrRHRTOTB25DkGqNG8IHtv9XJqfL1u7/FJil
20
+ 7W7eDOdoDXRHBZX9RlEZlekHE7kpziH7E7517BOX/RTmGLLQRmqPiZWkU8eWzHCl
21
+ -----END CERTIFICATE REQUEST-----", 'EMAIL')
22
+ request.approver_email = "test@gmail.com"
23
+ puts client.certificate.reissue(certificate.id, request).inspect
@@ -1,22 +1,22 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
- certificate = client.certificate.get(950000487);
5
- request = Xolphin::Api::CertificateRequests::RenewCertificateRequest.new(certificate.product.id, 1, "-----BEGIN CERTIFICATE REQUEST-----
6
- MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkJSMQ0wCwYDVQQIDAR0ZXN0MQ0wCwYD
7
- VQQHDAR0ZXN0MQ0wCwYDVQQKDAR0ZXN0MQ0wCwYDVQQLDAR0ZXN0MRswGQYDVQQD
8
- DBJleGNoYW5nZS5taGltZWUubmwxHjAcBgkqhkiG9w0BCQEWD3BpemRhQGdtYWls
9
- LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfH+piYuiOBlGSS
10
- wN0R9MuMqWa6XbUE4dwjzbCcocoqW4cLC9SWpHoYjwlSpsuyJNrzxe5rwiiyNGUi
11
- Unm+HrY1+ADa+sCQhL2+siPd6nIZeNWrC6Zw1KDaAVWmm8x2gZb7+aDyA7l35BHB
12
- 2LJ2tbgvcpLr8dOcN4f0DI719eEM5QtpYvf5YVEKCrAizirwFhx4xjPVW4jHsM1G
13
- wb0f115+HJgB69cign5XCKykqZ2lmJpzfZ1DQ7vU2MyRzxukD1QQy8aDf5w3lmlY
14
- baB1ofchJ5YiLO7Y0fxW18J6zEbfrsHgECQ29COpojNsdDy30Vt9g5br89EzdZlb
15
- End4NRsCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBuOIZ4R6kfC5b7p8SOwXkS
16
- Q/g93311lGT7ArKn/XyFFrTEtYa3SN9QotaIgNxG6gXxgh/LD8g8w9q3wYswayzY
17
- cz6+5YjfblHcrWJ5zwVrKyD+8QLuC5xhrEFBBmYjzxihjAWkYtvaC4YKuo1PxESs
18
- RFlZosJFLIZpToXnGUfc5HgaI1/270plv57+1nOP4r+129d9r94z8sNDZACyi7Mp
19
- mHc7dQXFcmnyCk3PW9uwqU13pT08yrRHRTOTB25DkGqNG8IHtv9XJqfL1u7/FJil
20
- 7W7eDOdoDXRHBZX9RlEZlekHE7kpziH7E7517BOX/RTmGLLQRmqPiZWkU8eWzHCl
21
- -----END CERTIFICATE REQUEST-----", 'FILE')
22
- puts client.certificate.renew(certificate.id, request).inspect
1
+ require_relative "../lib/xolphin/api"
2
+
3
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
+ certificate = client.certificate.get(950_000_487)
5
+ request = Xolphin::Api::CertificateRequests::RenewCertificateRequest.new(certificate.product.id, 1, "-----BEGIN CERTIFICATE REQUEST-----
6
+ MIICzDCCAbQCAQAwgYYxCzAJBgNVBAYTAkJSMQ0wCwYDVQQIDAR0ZXN0MQ0wCwYD
7
+ VQQHDAR0ZXN0MQ0wCwYDVQQKDAR0ZXN0MQ0wCwYDVQQLDAR0ZXN0MRswGQYDVQQD
8
+ DBJleGNoYW5nZS5taGltZWUubmwxHjAcBgkqhkiG9w0BCQEWD3BpemRhQGdtYWls
9
+ LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMfH+piYuiOBlGSS
10
+ wN0R9MuMqWa6XbUE4dwjzbCcocoqW4cLC9SWpHoYjwlSpsuyJNrzxe5rwiiyNGUi
11
+ Unm+HrY1+ADa+sCQhL2+siPd6nIZeNWrC6Zw1KDaAVWmm8x2gZb7+aDyA7l35BHB
12
+ 2LJ2tbgvcpLr8dOcN4f0DI719eEM5QtpYvf5YVEKCrAizirwFhx4xjPVW4jHsM1G
13
+ wb0f115+HJgB69cign5XCKykqZ2lmJpzfZ1DQ7vU2MyRzxukD1QQy8aDf5w3lmlY
14
+ baB1ofchJ5YiLO7Y0fxW18J6zEbfrsHgECQ29COpojNsdDy30Vt9g5br89EzdZlb
15
+ End4NRsCAwEAAaAAMA0GCSqGSIb3DQEBBQUAA4IBAQBuOIZ4R6kfC5b7p8SOwXkS
16
+ Q/g93311lGT7ArKn/XyFFrTEtYa3SN9QotaIgNxG6gXxgh/LD8g8w9q3wYswayzY
17
+ cz6+5YjfblHcrWJ5zwVrKyD+8QLuC5xhrEFBBmYjzxihjAWkYtvaC4YKuo1PxESs
18
+ RFlZosJFLIZpToXnGUfc5HgaI1/270plv57+1nOP4r+129d9r94z8sNDZACyi7Mp
19
+ mHc7dQXFcmnyCk3PW9uwqU13pT08yrRHRTOTB25DkGqNG8IHtv9XJqfL1u7/FJil
20
+ 7W7eDOdoDXRHBZX9RlEZlekHE7kpziH7E7517BOX/RTmGLLQRmqPiZWkU8eWzHCl
21
+ -----END CERTIFICATE REQUEST-----", 'FILE')
22
+ puts client.certificate.renew(certificate.id, request).inspect
@@ -1,9 +1,9 @@
1
- require_relative "../lib/xolphin/api"
2
- require_relative "_credentials"
3
-
4
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
- result = client.request.getNotes(960003015)
6
- puts result.inspect
7
- result.notes.each do |note|
8
- puts note.message_body, note.created_at
9
- end
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
+ result = client.request.getNotes(960_003_015)
6
+ puts result.inspect
7
+ result.notes.each do |note|
8
+ puts note.message_body, note.created_at
9
+ end
@@ -0,0 +1,7 @@
1
+ require_relative "../lib/xolphin/api"
2
+
3
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
+ invoices = client.invoice.all
5
+ invoices.each do |invoice|
6
+ puts invoice.id, invoice.amount
7
+ end
@@ -0,0 +1,40 @@
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials.rb"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
+ csr = "-----BEGIN CERTIFICATE REQUEST-----
6
+ MIICuDCCAaACADB0MQswCQYDVQQGEwJOTDEWMBQGA1UEAxMNd3d3LnNzbGRldi5u
7
+ bDEWMBQGA1UEBxMNSGVlcmh1Z293YWFyZDEQMA4GA1UEChMHWG9scGhpbjEWMBQG
8
+ A1UECBMNTm9vcmQtSG9sbGFuZDELMAkGA1UECxMCSVQwggEiMA0GCSqGSIb3DQEB
9
+ AQUAA4IBDwAwggEKAoIBAQDkTFMNKhWObiUH1xDeRcqYiROKvJZEI7njDlQbXeVC
10
+ qSaBSBClJD98OSgE0+arnVyJ5Fnjkovgb9aC8HbWYbiD1tbWD+hKC1wPODEvknl7
11
+ jfRpO36cIglIhftHn5p0k+f86uS2Nz1yr+5qwAEQ7C0UQZxMuBbzK6Uv8m0TbAVV
12
+ CQ+i+uJfuXSsAT8LZbyoJsu50ZySG3uEhCSISh1cS/t/M2INHbXfzGA3GWH2FXCZ
13
+ Qd9eLSBAVEanIr3TlRpNU3f0IDwJpm56BVTNtNL7GI2NilfUF9oSo9PSlPbAkPsN
14
+ BrVdOiZgiOEO74rXE8fjA5Zm8uic6MyFRo4FuTUBWubrAgMBAAGgADANBgkqhkiG
15
+ 9w0BAQsFAAOCAQEAHuB6643oI7oPw5SbFQAcfTfQbyRTXNqwYOO8YRcCkDIu7aX9
16
+ pupGvf+cSa5IDcZ6Dz22/Khp5rYlcutAtEN7d8MNBwBlcVzbWL+DuTU5ZWAxcRi4
17
+ nmiw/C+RxFF+WsUcjwb+dNrTYkz03t7voMg/0NS7RRU/oTu8heDDcH+Ffam1bZJQ
18
+ zi21dz/AsjG9Jc6GJqZs0ImEwCQlBhJYnXPj3FB8U/mzSWSfq502fdtmQrvIgHmI
19
+ RLuxVO9QX0YLQ0ew1x2z+eFfBsfSI1+DkF4+5TrfJP6jQyHBR+VDdGYBO2d8rBw7
20
+ ITIJC9tt2F4GjaPAI1xY9eoq/QfZxzNoNufMuw==
21
+ -----END CERTIFICATE REQUEST-----"
22
+ request = client.request.create(145, 1, csr, 'EMAIL')
23
+
24
+
25
+ request.approver_first_name = "OldFirstName"
26
+ request.approver_last_name = "OldLastName"
27
+ request.approver_phone = "Old+1234567890"
28
+ request.approver_representative_first_name = "FirstName"
29
+ request.approver_representative_last_name = "LastName"
30
+ request.approver_representative_phone = "+1234567890"
31
+ request.approver_representative_position = "CEO"
32
+ request.approver_representative_email = 'approver@emailaddress.com'
33
+ request.approver_email = "email@domain.com"
34
+ request.approver_representative_email = "email@domain.com"
35
+ request.address = "Exmouth House, 3 Pine St, London Ec1R 0Jh"
36
+ request.zipcode = "Ec1R 0Jh"
37
+ request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
38
+ request.dcv_type = "FILE"
39
+ response = client.request.send(request)
40
+ puts response.inspect
@@ -1,29 +1,29 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
- request = client.request.createEE
5
- request.csr = "-----BEGIN CERTIFICATE REQUEST-----
6
- MIICuDCCAaACADB0MQswCQYDVQQGEwJOTDEWMBQGA1UEAxMNd3d3LnNzbGRldi5u
7
- bDEWMBQGA1UEBxMNSGVlcmh1Z293YWFyZDEQMA4GA1UEChMHWG9scGhpbjEWMBQG
8
- A1UECBMNTm9vcmQtSG9sbGFuZDELMAkGA1UECxMCSVQwggEiMA0GCSqGSIb3DQEB
9
- AQUAA4IBDwAwggEKAoIBAQDkTFMNKhWObiUH1xDeRcqYiROKvJZEI7njDlQbXeVC
10
- qSaBSBClJD98OSgE0+arnVyJ5Fnjkovgb9aC8HbWYbiD1tbWD+hKC1wPODEvknl7
11
- jfRpO36cIglIhftHn5p0k+f86uS2Nz1yr+5qwAEQ7C0UQZxMuBbzK6Uv8m0TbAVV
12
- CQ+i+uJfuXSsAT8LZbyoJsu50ZySG3uEhCSISh1cS/t/M2INHbXfzGA3GWH2FXCZ
13
- Qd9eLSBAVEanIr3TlRpNU3f0IDwJpm56BVTNtNL7GI2NilfUF9oSo9PSlPbAkPsN
14
- BrVdOiZgiOEO74rXE8fjA5Zm8uic6MyFRo4FuTUBWubrAgMBAAGgADANBgkqhkiG
15
- 9w0BAQsFAAOCAQEAHuB6643oI7oPw5SbFQAcfTfQbyRTXNqwYOO8YRcCkDIu7aX9
16
- pupGvf+cSa5IDcZ6Dz22/Khp5rYlcutAtEN7d8MNBwBlcVzbWL+DuTU5ZWAxcRi4
17
- nmiw/C+RxFF+WsUcjwb+dNrTYkz03t7voMg/0NS7RRU/oTu8heDDcH+Ffam1bZJQ
18
- zi21dz/AsjG9Jc6GJqZs0ImEwCQlBhJYnXPj3FB8U/mzSWSfq502fdtmQrvIgHmI
19
- RLuxVO9QX0YLQ0ew1x2z+eFfBsfSI1+DkF4+5TrfJP6jQyHBR+VDdGYBO2d8rBw7
20
- ITIJC9tt2F4GjaPAI1xY9eoq/QfZxzNoNufMuw==
21
- -----END CERTIFICATE REQUEST-----"
22
- request.approver_first_name = "FirstName"
23
- request.approver_last_name = "LastName"
24
- request.approver_phone = "+1234567890"
25
- request.approver_email = "email@domain.com"
26
- request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
27
- request.dcv_type = "FILE"
28
- response = client.request.sendEE(request)
29
- puts response.inspect
1
+ require_relative "../lib/xolphin/api"
2
+
3
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
+ request = client.request.createEE
5
+ request.csr = "-----BEGIN CERTIFICATE REQUEST-----
6
+ MIICuDCCAaACADB0MQswCQYDVQQGEwJOTDEWMBQGA1UEAxMNd3d3LnNzbGRldi5u
7
+ bDEWMBQGA1UEBxMNSGVlcmh1Z293YWFyZDEQMA4GA1UEChMHWG9scGhpbjEWMBQG
8
+ A1UECBMNTm9vcmQtSG9sbGFuZDELMAkGA1UECxMCSVQwggEiMA0GCSqGSIb3DQEB
9
+ AQUAA4IBDwAwggEKAoIBAQDkTFMNKhWObiUH1xDeRcqYiROKvJZEI7njDlQbXeVC
10
+ qSaBSBClJD98OSgE0+arnVyJ5Fnjkovgb9aC8HbWYbiD1tbWD+hKC1wPODEvknl7
11
+ jfRpO36cIglIhftHn5p0k+f86uS2Nz1yr+5qwAEQ7C0UQZxMuBbzK6Uv8m0TbAVV
12
+ CQ+i+uJfuXSsAT8LZbyoJsu50ZySG3uEhCSISh1cS/t/M2INHbXfzGA3GWH2FXCZ
13
+ Qd9eLSBAVEanIr3TlRpNU3f0IDwJpm56BVTNtNL7GI2NilfUF9oSo9PSlPbAkPsN
14
+ BrVdOiZgiOEO74rXE8fjA5Zm8uic6MyFRo4FuTUBWubrAgMBAAGgADANBgkqhkiG
15
+ 9w0BAQsFAAOCAQEAHuB6643oI7oPw5SbFQAcfTfQbyRTXNqwYOO8YRcCkDIu7aX9
16
+ pupGvf+cSa5IDcZ6Dz22/Khp5rYlcutAtEN7d8MNBwBlcVzbWL+DuTU5ZWAxcRi4
17
+ nmiw/C+RxFF+WsUcjwb+dNrTYkz03t7voMg/0NS7RRU/oTu8heDDcH+Ffam1bZJQ
18
+ zi21dz/AsjG9Jc6GJqZs0ImEwCQlBhJYnXPj3FB8U/mzSWSfq502fdtmQrvIgHmI
19
+ RLuxVO9QX0YLQ0ew1x2z+eFfBsfSI1+DkF4+5TrfJP6jQyHBR+VDdGYBO2d8rBw7
20
+ ITIJC9tt2F4GjaPAI1xY9eoq/QfZxzNoNufMuw==
21
+ -----END CERTIFICATE REQUEST-----"
22
+ request.approver_first_name = "FirstName"
23
+ request.approver_last_name = "LastName"
24
+ request.approver_phone = "+1234567890"
25
+ request.approver_email = "email@domain.com"
26
+ request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
27
+ request.dcv_type = "FILE"
28
+ response = client.request.sendEE(request)
29
+ puts response.inspect
@@ -0,0 +1,6 @@
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials.rb"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, false)
5
+ result = client.request.get(963437363)
6
+ puts result.inspect
@@ -1,5 +1,6 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
- result = client.request.scheduleValidationCall(960002992, "2017-05-01 13:00")
5
- puts result.inspect
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials.rb"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
+ result = client.request.scheduleValidationCall(963437377, "2024-01-01 13:00", {action: "ScheduledCallback"})
6
+ puts result.inspect
@@ -1,7 +1,8 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
- requests = client.request.all
5
- requests.each do |request|
6
- puts request.id, request.product.id
7
- end
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, false)
5
+ requests = client.request.all
6
+ requests.each do |request|
7
+ puts request.id, request.product.id
8
+ end
@@ -1,5 +1,5 @@
1
- require_relative "../lib/xolphin/api"
2
-
3
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
- result = client.request.sendComodoSAEmail(960003013, 'nikita@xolphin.nl');
5
- puts result.inspect
1
+ require_relative "../lib/xolphin/api"
2
+
3
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
4
+ result = client.request.sendComodoSAEmail(960_003_013, 'nikita@xolphin.nl')
5
+ puts result.inspect
@@ -1,6 +1,6 @@
1
- require_relative "../lib/xolphin/api"
2
- require_relative "_credentials"
3
-
4
- client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
- result = client.request.sendNote(960003015, 'note')
6
- puts result.inspect
1
+ require_relative "../lib/xolphin/api"
2
+ require_relative "_credentials"
3
+
4
+ client = Xolphin::Api::Client.new(Credentials.username, Credentials.password, true)
5
+ result = client.request.sendNote(960_003_015, 'note')
6
+ puts result.inspect
@@ -1,47 +1,54 @@
1
- require 'json'
2
-
3
- module Xolphin
4
- module Api
5
- module CertificateRequests
6
- class ReissueCertificateRequest
7
- attr_accessor :csr, :dcv_type, :subject_alternative_names, :dcv
8
- attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference
9
- attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
-
11
- def initialize(csr, dcv_type)
12
- @csr = csr
13
- @dcv_type = dcv_type
14
- end
15
-
16
- def to_param
17
- result = {
18
- "csr" => @csr,
19
- "dcvType" => @dcv_type
20
- }
21
-
22
- result.merge!({
23
- "company" => @company,
24
- "department" => @department,
25
- "address" => @address,
26
- "zipcode" => @zipcode,
27
- "city" => @city,
28
- "kvk" => @kvk,
29
- "reference" => @reference,
30
- "approverFirstName" => @approver_first_name,
31
- "approverLastName" => @approver_last_name,
32
- "approverEmail" => @approver_email,
33
- "approverPhone" => @approver_phone
34
- }.reject { |_key, value| value.nil? })
35
-
36
- if @subject_alternative_names
37
- result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
38
- end
39
-
40
- result["dcv"] = JSON.dump(@dcv) if @dcv
41
-
42
- result
43
- end
44
- end
45
- end
46
- end
47
- end
1
+ require 'json'
2
+
3
+ module Xolphin
4
+ module Api
5
+ module CertificateRequests
6
+ class ReissueCertificateRequest
7
+ attr_accessor :csr, :dcv_type, :subject_alternative_names, :dcv
8
+ attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference
9
+ attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
+ attr_accessor :approver_representative_first_name, :approver_representative_last_name, :approver_representative_email, :approver_representative_phone, :approver_representative_position
11
+
12
+ def initialize(csr, dcv_type)
13
+ @csr = csr
14
+ @dcv_type = dcv_type
15
+ end
16
+
17
+ def to_param
18
+ result = {
19
+ "csr" => @csr,
20
+ "dcvType" => @dcv_type
21
+ }
22
+
23
+ result.merge!({
24
+ "company" => @company,
25
+ "department" => @department,
26
+ "address" => @address,
27
+ "zipcode" => @zipcode,
28
+ "city" => @city,
29
+ "kvk" => @kvk,
30
+ "reference" => @reference,
31
+ "approverFirstName" => @approver_first_name,
32
+ "approverLastName" => @approver_last_name,
33
+ "approverEmail" => @approver_email,
34
+ "approverPhone" => @approver_phone,
35
+ # new validation variables
36
+ "approverRepresentativeFirstName" => @approver_representative_first_name,
37
+ "approverRepresentativeLastName" => @approver_representative_last_name,
38
+ "approverRepresentativeEmail" => @approver_representative_email,
39
+ "approverRepresentativePhone" => @approver_representative_phone,
40
+ "approverRepresentativePosition" => @approver_representative_position,
41
+ }.reject { |_key, value| value.nil? })
42
+
43
+ if @subject_alternative_names
44
+ result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
45
+ end
46
+
47
+ result["dcv"] = JSON.dump(@dcv) if @dcv
48
+
49
+ result
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -1,51 +1,58 @@
1
- require 'json'
2
-
3
- module Xolphin
4
- module Api
5
- module CertificateRequests
6
- class RenewCertificateRequest
7
- attr_accessor :product, :years, :csr, :dcv_type, :subject_alternative_names, :dcv
8
- attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference
9
- attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
-
11
- def initialize(product, years, csr, dcv_type)
12
- @product = product
13
- @years = years
14
- @csr = csr
15
- @dcv_type = dcv_type
16
- end
17
-
18
- def to_param
19
- result = {
20
- "product" => @product,
21
- "years" => @years,
22
- "csr" => @csr,
23
- "dcvType" => @dcv_type
24
- }
25
-
26
- result.merge!({
27
- "company" => @company,
28
- "department" => @department,
29
- "address" => @address,
30
- "zipcode" => @zipcode,
31
- "city" => @city,
32
- "kvk" => @kvk,
33
- "reference" => @reference,
34
- "approverFirstName" => @approver_first_name,
35
- "approverLastName" => @approver_last_name,
36
- "approverEmail" => @approver_email,
37
- "approverPhone" => @approver_phone
38
- }.reject { |_key, value| value.nil? })
39
-
40
- if @subject_alternative_names
41
- result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
42
- end
43
-
44
- result["dcv"] = JSON.dump(@dcv) if @dcv
45
-
46
- result
47
- end
48
- end
49
- end
50
- end
51
- end
1
+ require 'json'
2
+
3
+ module Xolphin
4
+ module Api
5
+ module CertificateRequests
6
+ class RenewCertificateRequest
7
+ attr_accessor :product, :years, :csr, :dcv_type, :subject_alternative_names, :dcv
8
+ attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference
9
+ attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
+ attr_accessor :approver_representative_first_name, :approver_representative_last_name, :approver_representative_email, :approver_representative_phone, :approver_representative_position
11
+
12
+ def initialize(product, years, csr, dcv_type)
13
+ @product = product
14
+ @years = years
15
+ @csr = csr
16
+ @dcv_type = dcv_type
17
+ end
18
+
19
+ def to_param
20
+ result = {
21
+ "product" => @product,
22
+ "years" => @years,
23
+ "csr" => @csr,
24
+ "dcvType" => @dcv_type
25
+ }
26
+
27
+ result.merge!({
28
+ "company" => @company,
29
+ "department" => @department,
30
+ "address" => @address,
31
+ "zipcode" => @zipcode,
32
+ "city" => @city,
33
+ "kvk" => @kvk,
34
+ "reference" => @reference,
35
+ "approverFirstName" => @approver_first_name,
36
+ "approverLastName" => @approver_last_name,
37
+ "approverEmail" => @approver_email,
38
+ "approverPhone" => @approver_phone,
39
+ # new validation variables
40
+ "approverRepresentativeFirstName" => @approver_representative_first_name,
41
+ "approverRepresentativeLastName" => @approver_representative_last_name,
42
+ "approverRepresentativeEmail" => @approver_representative_email,
43
+ "approverRepresentativePhone" => @approver_representative_phone,
44
+ "approverRepresentativePosition" => @approver_representative_position,
45
+ }.reject { |_key, value| value.nil? })
46
+
47
+ if @subject_alternative_names
48
+ result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
49
+ end
50
+
51
+ result["dcv"] = JSON.dump(@dcv) if @dcv
52
+
53
+ result
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -1,52 +1,59 @@
1
- require 'json'
2
-
3
- module Xolphin
4
- module Api
5
- module CertificateRequests
6
- class CreateCertificateRequest
7
- attr_accessor :product, :years, :csr, :dcv_type, :subject_alternative_names, :dcv, :language
8
- attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference
9
- attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
-
11
- def initialize(product, years, csr, dcv_type)
12
- @product = product
13
- @years = years
14
- @csr = csr
15
- @dcv_type = dcv_type
16
- end
17
-
18
- def to_param
19
- result = {
20
- "product" => @product,
21
- "years" => @years,
22
- "csr" => @csr,
23
- "dcvType" => @dcv_type
24
- }
25
-
26
- result.merge!({
27
- "company" => @company,
28
- "department" => @department,
29
- "address" => @address,
30
- "zipcode" => @zipcode,
31
- "city" => @city,
32
- "kvk" => @kvk,
33
- "reference" => @reference,
34
- "approverFirstName" => @approver_first_name,
35
- "approverLastName" => @approver_last_name,
36
- "approverEmail" => @approver_email,
37
- "approverPhone" => @approver_phone,
38
- "language" => @language
39
- }.reject { |_key, value| value.nil? })
40
-
41
- if @subject_alternative_names
42
- result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
43
- end
44
-
45
- result["dcv"] = JSON.dump(@dcv) if @dcv
46
-
47
- result
48
- end
49
- end
50
- end
51
- end
52
- end
1
+ require 'json'
2
+
3
+ module Xolphin
4
+ module Api
5
+ module CertificateRequests
6
+ class CreateCertificateRequest
7
+ attr_accessor :product, :years, :csr, :dcv_type, :subject_alternative_names, :dcv, :language
8
+ attr_accessor :company, :department, :address, :zipcode, :city, :kvk, :reference, :referenceOrderNr
9
+ attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone
10
+ attr_accessor :approver_representative_first_name, :approver_representative_last_name, :approver_representative_email, :approver_representative_phone, :approver_representative_position
11
+
12
+ def initialize(product, years, csr, dcv_type)
13
+ @product = product
14
+ @years = years
15
+ @csr = csr
16
+ @dcv_type = dcv_type
17
+ end
18
+
19
+ def to_param
20
+ result = {
21
+ "product" => @product,
22
+ "years" => @years,
23
+ "csr" => @csr,
24
+ "dcvType" => @dcv_type
25
+ }
26
+
27
+ result.merge!({
28
+ "company" => @company,
29
+ "department" => @department,
30
+ "address" => @address,
31
+ "zipcode" => @zipcode,
32
+ "city" => @city,
33
+ "kvk" => @kvk,
34
+ "reference" => @reference,
35
+ "approverFirstName" => @approver_first_name,
36
+ "approverLastName" => @approver_last_name,
37
+ "approverEmail" => @approver_email,
38
+ "approverPhone" => @approver_phone,
39
+ "approverRepresentativeFirstName" => @approver_representative_first_name,
40
+ "approverRepresentativeLastName" => @approver_representative_last_name,
41
+ "approverRepresentativeEmail" => @approver_representative_email,
42
+ "approverRepresentativePhone" => @approver_representative_phone,
43
+ "approverRepresentativePosition" => @approver_representative_position,
44
+ "language" => @language,
45
+ "referenceOrderNr" => @referenceOrderNr
46
+ }.reject { |_key, value| value.nil? })
47
+
48
+ if @subject_alternative_names
49
+ result["subjectAlternativeNames"] = @subject_alternative_names.join(",")
50
+ end
51
+
52
+ result["dcv"] = JSON.dump(@dcv) if @dcv
53
+
54
+ result
55
+ end
56
+ end
57
+ end
58
+ end
59
+ end