jemquarie 1.2.6 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13be21afff53535a1f7ccb5f794d9027b4b90a27
4
- data.tar.gz: 929562439ee2dab1871e05895d97cb01eca64c99
3
+ metadata.gz: a7b19596dfb67404c7c46c93735edc8ee60109c5
4
+ data.tar.gz: 80d91c07b02234810d80dcc3ddebff308a5c89be
5
5
  SHA512:
6
- metadata.gz: abc035481703d44d7f2646188c7566cf51a6b48a3846045ea848a417474b7f89481f30a38e3469fc7b1e19504b9fd5c92b38feabda409e654a13f0d50f53e7ba
7
- data.tar.gz: 9d9e38a5b93685a4cb8ae97c2de893602849ecd2c73b40a39f7b8056cf8a2daffdc7e4d6e308e7cdcaa3c65ce73da69ac17fcb808ebd0eb6ce443270d10f3057
6
+ metadata.gz: 95e6b88584821f22b2e069586f84618d696388e08b3cb1900e3d32b9f492da5e754afd76791b8bcb72737924534ffde45ce2a0fb920f69df34f52c66ee675b6c
7
+ data.tar.gz: 392714c0d2b0422b330e3e8361bf349565370e5f9fbb9066ccee80fd63c39762e576fef4067cfe4c01e7f990c95cd914b3aca2159b8f8690848cdc0975084f19
@@ -5,15 +5,6 @@ module Jemquarie
5
5
  include Parser::CashTransactions
6
6
 
7
7
  def cash_transactions(date_from = (Date.today - 1.day), date_to = Date.today, account_number = '', include_closed = 'Y')
8
- if account_number.blank?
9
- if (date_to && date_from)
10
- if (date_to - date_from).days > 2.days # With no account_number you can only get 2 days
11
- return {:error => "Cannot request more than 2 days of transactions if not account is specified"}
12
- end
13
- else # With no account_number you need dates
14
- return {:error => "Missing from and to dates"}
15
- end
16
- end
17
8
  response = @client.call(:generate_xml_extract, :message => create_message(date_from, date_to, account_number, include_closed))
18
9
  return parse_cash_transactions_response(response) if response.success?
19
10
  {:error => "An error has occured, please try again later"}
@@ -1,3 +1,3 @@
1
1
  module Jemquarie
2
- VERSION = "1.2.6"
2
+ VERSION = "1.2.7"
3
3
  end
@@ -89,18 +89,6 @@ describe Jemquarie::Importer do
89
89
  end
90
90
  end
91
91
 
92
- describe "do not allow more than 2 days without an account number" do
93
- let(:importer) do
94
- Jemquarie::Importer.new('valid_code', 'valid_password')
95
- end
96
- before(:each) do
97
- @result = importer.cash_transactions((Date.today - 3.days), Date.today)
98
- end
99
- it "should stop the request" do
100
- expect(@result).to be_kind_of Hash
101
- end
102
- end
103
-
104
92
  describe "non auth" do
105
93
  let(:importer) do
106
94
  Jemquarie::Importer.new('invalid_code', 'or_invalid_password')
@@ -162,12 +150,6 @@ describe Jemquarie::Importer do
162
150
  content_type: 'text/xml'
163
151
  )
164
152
  end
165
- it "should return error when trying to get transactions with no date and no account" do
166
- @result = importer.cash_transactions(nil, nil, nil)
167
- expect(@result).to be_kind_of Hash
168
- expect(@result[:error]).to eq("Missing from and to dates")
169
- end
170
-
171
153
  it "should accept parameters with account number but no date parameters without error" do
172
154
  @result = importer.cash_transactions(nil, nil, '12345')
173
155
  expect(@result).to be_kind_of Array
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jemquarie
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Contin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-19 00:00:00.000000000 Z
11
+ date: 2016-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: savon