Class: Ibancom::API::ValidationService
- Inherits:
-
Service
- Object
- Service
- Ibancom::API::ValidationService
show all
- Defined in:
- lib/ibancom/api/validation_service.rb
Instance Attribute Summary
Attributes inherited from Service
#client
Instance Method Summary
collapse
Methods inherited from Service
#initialize
Instance Method Details
#validate(iban) ⇒ Object
6
7
8
9
|
# File 'lib/ibancom/api/validation_service.rb', line 6
def validate(iban)
response = client.post("/v4/iban/", { iban: iban, sci: 1 })
Resources::IBAN::Validation.new(response, response.body)
end
|
#validate_scan(sort_code, account_number) ⇒ Object
11
12
13
14
|
# File 'lib/ibancom/api/validation_service.rb', line 11
def validate_scan(sort_code, account_number)
response = client.post("/v4/sort/", { sortcode: sort_code, account: account_number })
Resources::SCAN::Validation.new(response, response.body)
end
|