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.
7 8 9 |
# File 'lib/bunq/certificate_pinned.rb', line 7 def initialize(parent_resource) @resource = parent_resource.append('/certificate-pinned') end |
Instance Method Details
#create(pem_certificate) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bunq/certificate_pinned.rb', line 13 def create(pem_certificate) @resource.with_session do @resource.post( { certificate_chain: [ {certificate: pem_certificate}, ], }, ) end end |