class NuaPay::Scheme

Public Instance Methods

get_scheme_identifer() click to toggle source

Don't remove this method as it can be used in the future for fetching scheme identifier from the schemes api

# File lib/nua_pay/scheme.rb, line 9
def get_scheme_identifer
  data = get_schemes.select{|scheme| scheme["creditorSchemeId"] == ENV['NUA_PAY_CREDIT_SCHEME_ID'] }
  if data.blank?
    raise "Credit Scheme ID missing in the schemes"
  else
    data.first["id"]
  end
end
get_schemes() click to toggle source
# File lib/nua_pay/scheme.rb, line 3
def get_schemes
  get_response( build_url( NUAPAY_API['SCHEMES'] )  )
end