Class: Bunq::CertificatePinned
- Inherits:
-
Object
- Object
- Bunq::CertificatePinned
- Defined in:
- lib/bunq/certificate_pinned.rb
Overview
Instance Method Summary collapse
- #create(pem_certificate) ⇒ Object
-
#initialize(parent_resource) ⇒ CertificatePinned
constructor
A new instance of CertificatePinned.
Constructor Details
#initialize(parent_resource) ⇒ CertificatePinned
Returns a new instance of CertificatePinned.
5 6 7 |
# File 'lib/bunq/certificate_pinned.rb', line 5 def initialize(parent_resource) @resource = parent_resource.append("/certificate-pinned") end |
Instance Method Details
#create(pem_certificate) ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/bunq/certificate_pinned.rb', line 11 def create(pem_certificate) @resource.with_session do @resource.post({ certificate_chain: [ {certificate: pem_certificate} ] }) end end |