Class: CorePro::Customer

Inherits:
Resource
  • Object
show all
Defined in:
lib/core_pro.rb

Overview

Customer endpoint resource

Instance Method Summary collapse

Methods inherited from Resource

all, create, error_response?, extract_error, find, objectify, #reload, #resource_id, update

Instance Method Details

#onboard(kyc_vendor) ⇒ Customer

Performs a customer KYC/onboarding

See: docs.corepro.io/reference#4-run-kyc-on-the-customer

Returns:



125
126
127
128
129
130
131
132
133
134
135
# File 'lib/core_pro.rb', line 125

def onboard(kyc_vendor)
  onboard_uri = self.class.uri(:onboard, kyc_vendor, :all)

  self.class.objectify(
    self.class.request(
      :post,
      onboard_uri,
      json: { customerId: customerId }
    )
  )
end