Class: Forgery::RussianTax
- Defined in:
- lib/forgery/forgery/russian_tax.rb
Overview
Generates various special numbers for Russian taxation system They have numbers for identification, for banks, for companies and entrepreneurs
Constant Summary collapse
- TYPES =
Forgery::Extend([:person, :legal])
Constants inherited from Forgery
Class Method Summary collapse
-
.account_number ⇒ Object
bank account format pretty simple.
-
.bik ⇒ Object
bank identification.
-
.inn(options = {}) ⇒ Object
taxation id.
-
.ogrn(options = {}) ⇒ Object
government registration id.
Methods inherited from Forgery
Extend, dictionaries, formats, load_from!, load_paths, rails?, rails_root
Class Method Details
.account_number ⇒ Object
bank account format pretty simple
13 14 15 |
# File 'lib/forgery/forgery/russian_tax.rb', line 13 def self.account_number 20.times.map { rand(9) + 1 }.join end |
.bik ⇒ Object
bank identification
8 9 10 |
# File 'lib/forgery/forgery/russian_tax.rb', line 8 def self.bik "04#{5.times.map { rand(9) + 1 }.join}#{rand(50) + 50}" end |
.inn(options = {}) ⇒ Object
taxation id
18 19 20 21 |
# File 'lib/forgery/forgery/russian_tax.rb', line 18 def self.inn( = {}) type = TYPES.include?([:type]) ? [:type] : TYPES.random send [type, :inn].join('_') end |
.ogrn(options = {}) ⇒ Object
government registration id
24 25 26 27 |
# File 'lib/forgery/forgery/russian_tax.rb', line 24 def self.ogrn( = {}) type = TYPES.include?([:type]) ? [:type] : TYPES.random send [type, :ogrn].join('_') end |