rus_bank 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a79896c9ff56fec5a5fa2afa206fe2d43f11c50
4
- data.tar.gz: f4d218426c51d95219fc3d147afb058763adefb1
3
+ metadata.gz: cb9c1d178b3d621322d3664ca437f9037290d968
4
+ data.tar.gz: 8c00bd86a33f1090072af92b8099f7adda2a6a24
5
5
  SHA512:
6
- metadata.gz: 506dab7f3e70803cfa907a6eab56e145afce6eee7bebd3aff0b441fc507fa70d24d091086ead7d66b4adeffe6a89e8cc76487d5441f4c162532bd6b68ec22aea
7
- data.tar.gz: cd555655d1883acd2529930cb44f86d21380a587cc945269c2fa76770827ee8924f2889cb69f715cff658e4775ff68b5199efd1a12fe044df6410e715a7db8d1
6
+ metadata.gz: 93377057b358b81e686c69af00413eec91d72688625c915a25cae5263005a4e2ef1c315be8941b0953a4873999b6614c4a35ea006571ebed18dedaff04886960
7
+ data.tar.gz: 92069ebcdf33fe216a80c0c1a764c31a27aa7099450fa67873ecb3872629ffda208867ff216a9d559dc004b4b6ad87f56adaf961b9c98b490ab4642aac9df7bb
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.9.0
data/lib/rus_bank.rb CHANGED
@@ -48,6 +48,12 @@ class RusBank
48
48
  get_array(response, :co_offices, :offices)
49
49
  end
50
50
 
51
+ def GetOfficesByRegionXML(region_code)
52
+ params = { "RegCode" => region_code }
53
+ response = call(:get_offices_by_region_xml, params)
54
+ get_array(response, :co_offices, :offices)
55
+ end
56
+
51
57
  def EnumBicXML
52
58
  response = call(:enum_bic_xml)
53
59
  get_array(response, :enum_bic, :bic)
data/rus_bank.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "rus_bank"
8
- s.version = "0.8.0"
8
+ s.version = "0.9.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["wilDAlex"]
@@ -73,6 +73,12 @@ class TestRusBank < Test::Unit::TestCase
73
73
  assert_equal(nil, @cbr.GetOfficesXML(INVALID_INT_CODE), "Should return nil if value not found")
74
74
  end
75
75
 
76
+ should ":get_offices_by_region_xml returns array of elements" do
77
+ assert(@cbr.GetOfficesByRegionXML(VALID_REGION).instance_of?(Array), "This should be array")
78
+ assert(@cbr.GetOfficesByRegionXML(VALID_REGION).length > 10, "This should return more than 10 offices")
79
+ assert_equal(nil, @cbr.GetOfficesByRegionXML(INVALID_REGION), "Should return nil if value not found")
80
+ end
81
+
76
82
  should ":credit_info_by_int_code_xml return correct bank" do
77
83
  assert_equal(VALID_REG_NUMBER, @cbr.CreditInfoByIntCodeXML(VALID_INT_CODE)[:co][:reg_number])
78
84
  assert_equal(VALID_ORG_NAME, @cbr.CreditInfoByIntCodeXML(VALID_INT_CODE)[:co][:org_name])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rus_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - wilDAlex