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.



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