Class: Bunq::CertificatePinned

Inherits:
Object
  • Object
show all
Defined in:
lib/bunq/certificate_pinned.rb

Overview

Instance Method Summary collapse

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