companies-house-gateway 0.3.3 → 0.3.4

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: 3a8d19739e0b13770a8238d162130526eeb8a399
4
- data.tar.gz: d20152355242794ee5286ab6910b9fb83f6fd5a8
3
+ metadata.gz: 9468ef053dc2a11fdc6aeedc3bd388860a601c04
4
+ data.tar.gz: 6c8a2bcc628048b75f7a77421c00bcdd683ed056
5
5
  SHA512:
6
- metadata.gz: 5d8df95b6d5fc31e4cbe356ef9135a8e75cb6ccc2f94bab3c2ef38d688ddb3ab6aa2025526a5422b9eb29e871e07629be6414ed2361fc7555cc9cf72c7e72c80
7
- data.tar.gz: 4922e54e1e34f4ce490b77b52ff11c9304f84c9a61c9794e4ff33eb25225671635420ffb0cd9cef8841d84d2b0f4b9a1318b7d22a64ae099d8c5084aa88d2491
6
+ metadata.gz: b5530cd08982bca3a4196d3f1021ca76404701e67a02a9e9a4db2c83fd2edfed3225e516b04b7a39810a47ac00489d3d62a139a0981b7b34636ecdea562cad4d
7
+ data.tar.gz: 769936150be0ed783ca238c210e163d3375ff73b4c789c206ab4681a7f2e7d034f8f80f258d7cb60777d3c1a4f500f065575f474a67b19a9b31508a1a6e2f022
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.3.4 - February 26, 2014
2
+
3
+ - Fix XML generation for CompanyAppointments requests
4
+
1
5
  ## 0.3.3 - February 25, 2014
2
6
 
3
7
  - Only return the body of the response if raw mode is false
@@ -6,8 +6,8 @@ Gem::Specification.new do |gem|
6
6
  gem.add_runtime_dependency 'multi_xml', '~> 0.5.1'
7
7
  gem.add_runtime_dependency 'nokogiri', '~> 1.4'
8
8
 
9
- gem.add_development_dependency 'rspec'
10
- gem.add_development_dependency 'webmock'
9
+ gem.add_development_dependency 'rspec', '~> 2.14.1'
10
+ gem.add_development_dependency 'webmock', '~> 1.17.2'
11
11
 
12
12
  gem.authors = ['Grey Baker']
13
13
  gem.description = %q{Ruby wrapper for the Companies House XML Gateway}
@@ -3,10 +3,10 @@ module CompaniesHouseGateway
3
3
  class CompanyAppointments
4
4
  include Check
5
5
 
6
- required_input :company_name,
7
- :company_number
6
+ required_input :company_number
8
7
 
9
- default_input continuation_key: nil,
8
+ default_input company_name: "-", # Required but not used...
9
+ continuation_key: nil,
10
10
  include_resigned_ind: false,
11
11
  user_reference: "REFERENCE"
12
12
  end
@@ -3,9 +3,10 @@ module CompaniesHouseGateway
3
3
  class DocumentInfo
4
4
  include Check
5
5
 
6
- required_input :company_name,
7
- :company_number,
6
+ required_input :company_number,
8
7
  :image_key
8
+
9
+ default_input company_name: "-" # Required but not used...
9
10
  end
10
11
  end
11
12
  end
@@ -3,14 +3,14 @@ module CompaniesHouseGateway
3
3
  class Mortgages
4
4
  include Check
5
5
 
6
- required_input :company_name,
7
- :company_number
6
+ required_input :company_number
8
7
 
9
- default_input satisfied_charges_ind: false,
8
+ default_input company_name: "-", # Required but not used...
9
+ user_reference: "REFERENCE",
10
+ satisfied_charges_ind: false,
10
11
  start_date: nil,
11
12
  end_date: nil,
12
- continuation_key: nil,
13
- user_reference: "REFERENCE"
13
+ continuation_key: nil
14
14
  end
15
15
  end
16
16
  end
@@ -79,6 +79,7 @@ module CompaniesHouseGateway
79
79
  end
80
80
 
81
81
  def request_body(xml, request_type, search_data)
82
+ request_type = "CompanyAppt" if request_type == "CompanyAppointments"
82
83
  xml.send("#{request_type}Request", request_namespace(request_type)) do
83
84
  search_data.each do |key, value|
84
85
  if value
@@ -1,3 +1,3 @@
1
1
  module CompaniesHouseGateway
2
- VERSION = '0.3.3'.freeze
2
+ VERSION = '0.3.4'.freeze
3
3
  end
@@ -11,6 +11,5 @@ describe CompaniesHouseGateway::Checks::CompanyAppointments do
11
11
  it_behaves_like "it generates valid xml"
12
12
  it_behaves_like "it returns only the body of the response"
13
13
  it_behaves_like "it validates presence", :company_number
14
- it_behaves_like "it validates presence", :company_name
15
14
  end
16
15
  end
@@ -10,7 +10,6 @@ describe CompaniesHouseGateway::Checks::DocumentInfo do
10
10
 
11
11
  it_behaves_like "it generates valid xml"
12
12
  it_behaves_like "it returns only the body of the response"
13
- it_behaves_like "it validates presence", :company_name
14
13
  it_behaves_like "it validates presence", :company_number
15
14
  it_behaves_like "it validates presence", :image_key
16
15
  end
@@ -10,7 +10,6 @@ describe CompaniesHouseGateway::Checks::Mortgages do
10
10
 
11
11
  it_behaves_like "it generates valid xml"
12
12
  it_behaves_like "it returns only the body of the response"
13
- it_behaves_like "it validates presence", :company_name
14
13
  it_behaves_like "it validates presence", :company_number
15
14
  end
16
15
  end
@@ -23,7 +23,7 @@
23
23
  </xs:sequence>
24
24
  </xs:complexType>
25
25
  </xs:element>
26
- <xs:element name="CompanyAppointmentsRequest">
26
+ <xs:element name="CompanyApptRequest">
27
27
  <xs:annotation>
28
28
  <xs:documentation>Company Appointments Request</xs:documentation>
29
29
  </xs:annotation>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: companies-house-gateway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grey Baker
@@ -70,30 +70,30 @@ dependencies:
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 2.14.1
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ~>
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 2.14.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 1.17.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ~>
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 1.17.2
97
97
  description: Ruby wrapper for the Companies House XML Gateway
98
98
  email:
99
99
  - grey@gocardless.com