class CreditDevice::Inquiry
Attributes
company_id[R]
language[R]
product_type[R]
Public Class Methods
new(product_type = CreditDevice::Type::ProductType::D44CI701, company_id = nil, language = "NL", **_parameter)
click to toggle source
# File lib/credit_device/inquery.rb, line 7 def initialize(product_type = CreditDevice::Type::ProductType::D44CI701, company_id = nil, language = "NL", **_parameter) @product_type = set_type(product_type) @company_id = company_id @language = language end
Public Instance Methods
path()
click to toggle source
# File lib/credit_device/inquery.rb, line 18 def path "inquiries" end
request_inquiry()
click to toggle source
# File lib/credit_device/inquery.rb, line 13 def request_inquiry params = { company_id: @company_id, product: @product_type, language: @language }.to_json CreditDevice::Client.new(:post, path, params).request end
set_type(type)
click to toggle source
# File lib/credit_device/inquery.rb, line 22 def set_type(type) raise "type invalid, parameters are: #{CreditDevice::Type::ProductType::TYPES.join(',')}" unless CreditDevice::Type::ProductType::TYPES.include? type type end