clearbooks 0.18.2 → 0.19.0

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: b132005788aba1a6bb12d7dfebe9cc7d4b343101
4
- data.tar.gz: d9bf7b3eb74626da8b872f1d9053ae1c4421b7c2
3
+ metadata.gz: 80efc02878de7a20b15226b3407eb01ef041ac5c
4
+ data.tar.gz: 1c4952178173a3888a06830059ad60fb260d850a
5
5
  SHA512:
6
- metadata.gz: 71986345ecca85e5939ab47587e864bf170dcdd7394b90150f024aa18c58676768c0a408af51fb31e813568aace69ba504cb5e155d9cb0f2b98fbba9771fe5eb
7
- data.tar.gz: 8df901754b591361e8bf1f68b0c7e6628ec699da203b6438f2e707ebbbbc42a5f91e1a7902b125cef788e03b95fb1c92070456b5b4af09cc38af7d30657db75b
6
+ metadata.gz: 8dab19863667f800b261a530f0cbd0d32fa5753c1160e1ca9a3275b8c032c071d77502be32cdd2e203b941b75f1a47f245f48d58be11b61c9fb82a8999a00f13
7
+ data.tar.gz: df67b26898fa58e92790fd5cc7100009be13314e6701cee0d429c347572ed6ea0843578fda7a8ce8677d6129c399829bb8ba1b506958a9f3183e4a1fb2babc47
data/AUTHORS.md CHANGED
@@ -22,6 +22,13 @@ AUTHORS
22
22
  W: https://github.com/kukareka
23
23
  S: Creator
24
24
 
25
+ CLEARBOOKS
26
+ P: Ziyan Junaideen
27
+ M: jdeen-solutions AT outlook DOT com
28
+ L: -
29
+ W: http://github.com/ziyan-junaideen
30
+ S: Associated
31
+
25
32
  CLEARBOOKS
26
33
  P: Bjoern Rennhak
27
34
  M: bjoern AT greylon DOT com
@@ -29,3 +36,4 @@ AUTHORS
29
36
  W: http://github.com/rennhak
30
37
  S: BDFL, Creator
31
38
 
39
+
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Clearbooks
2
- Version 0.18.2
2
+ Version 0.19.0-1-gbc48881
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/clearbooks.svg)](http://badge.fury.io/rb/clearbooks)
5
5
  [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://img.shields.io/badge/license-MIT-brightgreen.svg)
@@ -486,7 +486,7 @@ Here is a current listing of all tasks:
486
486
 
487
487
 
488
488
  ```
489
- rake build # Build clearbooks-0.18.2.gem into the pkg directory
489
+ rake build # Build clearbooks-0.19.0.gem into the pkg directory
490
490
  rake cucumber:pretty # Run Cucumber features
491
491
  rake cucumber:progress # Run Cucumber features
492
492
  rake default # Show the default task when executing rake without arguments
@@ -494,8 +494,8 @@ rake docs:generate # Generate Yardoc documentation for this project
494
494
  rake docs:graph # Generate Yard Graphs for this project
495
495
  rake guard:default # Execute Ruby Guard
496
496
  rake help # Shows the usage help screen
497
- rake install # Build and install clearbooks-0.18.2.gem into system gems
498
- rake install:local # Build and install clearbooks-0.18.2.gem into system gems without network access
497
+ rake install # Build and install clearbooks-0.19.0.gem into system gems
498
+ rake install:local # Build and install clearbooks-0.19.0.gem into system gems without network access
499
499
  rake man:build # Build the manual pages
500
500
  rake man:clean # Clean up from the built man pages
501
501
  rake measurement:benchmark # When executing rake tasks measure elapsed time, used with other tasks
@@ -506,7 +506,7 @@ rake readme # Generate proper README file from templates
506
506
  rake readme:all # Generate proper README file from templates
507
507
  rake readme:subdirs # Builds generates readme files in all sub-directories
508
508
  rake readme:topdir # Generate top level README file from template
509
- rake release # Create tag v0.18.2 and build and push clearbooks-0.18.2.gem to Rubygems
509
+ rake release # Create tag v0.19.0 and build and push clearbooks-0.19.0.gem to Rubygems
510
510
  rake spec # RSpec Core Tasks
511
511
  rake todo # Look for TODO and FIXME tags in the code
512
512
  rake version # Git Tag number of this repo
@@ -532,7 +532,7 @@ thor :docs:generate # Generate Yardoc documentation for this project
532
532
  thor :docs:graph # Generate Yard Graphs for this project
533
533
  thor :guard:default # Execute Ruby Guard
534
534
  thor :help # Shows the usage help screen
535
- thor :install # Build and install clearbooks-0.18.2 .gem into system gems
535
+ thor :install # Build and install clearbooks-0.19.0.gem into system gems
536
536
  thor :man:build # Build the manual pages
537
537
  thor :man:clean # Clean up from the built man pages
538
538
  thor :measurement:benchmark # When executing rake tasks measure elapsed time, used with other tasks
@@ -27,6 +27,8 @@ module Clearbooks
27
27
  :fax, # string optional
28
28
  :website, # string optional
29
29
  :external_id, # integer optional
30
+ :vat_number, # integer optional
31
+ :company_number,# integer optional
30
32
  :statement_url,
31
33
  :supplier,
32
34
  # default_account_code string optional
@@ -119,6 +121,16 @@ module Clearbooks
119
121
  # Optional.
120
122
  # @return [Fixnum]
121
123
  # @see https://www.clearbooks.co.uk/support/api/docs/soap/createentity/
124
+
125
+ # @!attribute [r] vat_number
126
+ # Optional.
127
+ # @return [Fixnum]
128
+ # @see https://www.clearbooks.co.uk/support/api/docs/soap/createentity/
129
+
130
+ # @!attribute [r] company_number
131
+ # Optional.
132
+ # @return [Fixnum]
133
+ # @see https://www.clearbooks.co.uk/support/api/docs/soap/createentity/
122
134
 
123
135
  # @!attribute [r] supplier
124
136
  # Optional. [:default_account_code, :default_vat_rate, :default_credit_terms]
@@ -155,6 +167,8 @@ module Clearbooks
155
167
  @fax = data.savon :fax
156
168
  @website = data.savon :website
157
169
 
170
+ @company_number = data.savon :company_number
171
+ @vat_number = data.savon :vat_number
158
172
  @statement_url = data.savon :statement_url
159
173
  @external_id = data.savon :external_id
160
174
 
@@ -173,26 +187,28 @@ module Clearbooks
173
187
  def to_savon
174
188
  {
175
189
  entity: {
176
- :@company_name => @company_name,
177
- :@contact_name => @contact_name,
178
-
179
- :@building => @building,
180
- :@address1 => @address1,
181
- :@address2 => @address2,
182
- :@town => @town,
183
- :@county => @county,
184
- :@country => @country,
185
- :@postcode => @postcode,
186
-
187
- :@email => @email,
188
- :@phone1 => @phone1,
189
- :@phone2 => @phone2,
190
- :@fax => @fax,
191
- :@website => @website,
192
-
193
- :@external_id => @external_id,
194
- :supplier => entity_extra(@supplier),
195
- :customer => entity_extra(@customer)
190
+ :@company_name => @company_name,
191
+ :@contact_name => @contact_name,
192
+
193
+ :@building => @building,
194
+ :@address1 => @address1,
195
+ :@address2 => @address2,
196
+ :@town => @town,
197
+ :@county => @county,
198
+ :@country => @country,
199
+ :@postcode => @postcode,
200
+
201
+ :@email => @email,
202
+ :@phone1 => @phone1,
203
+ :@phone2 => @phone2,
204
+ :@fax => @fax,
205
+ :@website => @website,
206
+
207
+ :@company_number => @company_number,
208
+ :@vat_number => @vat_number,
209
+ :@external_id => @external_id,
210
+ :supplier => entity_extra(@supplier),
211
+ :customer => entity_extra(@customer)
196
212
  }.compact
197
213
  }
198
214
  end # }}}
@@ -90,7 +90,7 @@ module Clearbooks
90
90
 
91
91
  it 'returns list of entnties' do
92
92
  expect(entities).to be_an Array
93
- expect(entities.length).to eq 2
93
+ expect(entities.length).to eq 6
94
94
  end
95
95
 
96
96
  describe Entity do
@@ -102,23 +102,26 @@ module Clearbooks
102
102
 
103
103
  it 'has proper attribute values' do
104
104
  expect(entity.id).to eq 6
105
- expect(entity.company_name).to eq 'Example Inc.'
106
- expect(entity.contact_name).to eq 'John Foo'
107
- expect(entity.address1).to eq 'Street 1'
105
+ expect(entity.company_name).to eq 'Jane Industries'
106
+ expect(entity.contact_name).to eq 'Mrs Jane Doe'
107
+ expect(entity.address1).to eq 'Example Lane'
108
108
  expect(entity.town).to eq 'London'
109
- expect(entity.county).to eq 'United Kingdom'
109
+ expect(entity.county).to eq 'Greater London'
110
+ expect(entity.country).to eq 'GB'
110
111
  expect(entity.postcode).to eq '01100'
111
- expect(entity.email).to eq 'info@example.com'
112
- expect(entity.phone1).to eq '01234 567890'
113
- expect(entity.building).to eq 'Building2'
114
- expect(entity.address2).to eq 'Street2'
115
- expect(entity.phone2).to eq '1234 567890'
116
- expect(entity.fax).to eq '2345 67890'
117
- expect(entity.website).to eq 'http://example.com'
118
- expect(entity.external_id).to eq '3'
119
- expect(entity.statement_url).to eq 'https://secure.clearbooks.co.uk/'
112
+ expect(entity.email).to eq 'janedoe@test.com'
113
+ expect(entity.phone1).to eq '+1 234 567 8911'
114
+ expect(entity.building).to eq 'Building 2'
115
+ expect(entity.address2).to eq 'Example Place'
116
+ expect(entity.phone2).to eq '+1 234 567 8913'
117
+ expect(entity.fax).to eq '+1 234 567 8917'
118
+ expect(entity.website).to eq 'http://www.janedoe.com'
119
+ expect(entity.external_id).to eq '106'
120
+ expect(entity.vat_number).to eq '105'
121
+ expect(entity.company_number).to eq '106'
122
+ expect(entity.statement_url).to eq 'https://secure.clearbooks.co.uk/s/64372:97lRduxMpTcowPCTWOxvLg'
120
123
  expect(entity.supplier[:default_account_code]).to eq '30'
121
- expect(entity.supplier[:default_vat_rate]).to eq '10'
124
+ expect(entity.supplier[:default_vat_rate]).to eq '0.2'
122
125
  expect(entity.supplier[:default_credit_terms]).to eq 30
123
126
  expect(entity.customer).to be_nil
124
127
  end
@@ -1,29 +1,40 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
3
- xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
4
- <SOAP-ENV:Header>
5
- <ns1:authenticate>true</ns1:authenticate>
6
- </SOAP-ENV:Header>
7
- <SOAP-ENV:Body>
8
- <SOAP-ENV:listEntitiesResponse>
9
- <entities>
10
- <ns1:Entity id="1" company_name="Bank Account 1" contact_name="" address1="" town="" county="" postcode=""
11
- email="" phone1="" building="" address2="" phone2="" fax="" website=""
12
- date_modified="2010-03-04 11:32:14" external_id="0" company_number=""
13
- statement_url="https://secure.clearbooks.co.uk/s/58055:5y6ve9PH-tZyCSVTi22g8Q">
14
- <supplier/>
15
- <customer/>
16
- <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
17
- </ns1:Entity>
18
- <ns1:Entity id="6" company_name="Example Inc." contact_name="John Foo" address1="Street 1" town="London" county="United Kingdom"
19
- postcode="01100" email="info@example.com" phone1="01234 567890" building="Building2" address2="Street2"
20
- phone2="1234 567890" fax="2345 67890" website="http://example.com" date_modified="2015-04-28 15:59:17"
21
- external_id="3" company_number=""
22
- statement_url="https://secure.clearbooks.co.uk/">
23
- <supplier default_account_code="30" default_vat_rate="10" default_credit_terms="30"/>
24
- <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
25
- </ns1:Entity>
26
- </entities>
27
- </SOAP-ENV:listEntitiesResponse>
28
- </SOAP-ENV:Body>
29
- </SOAP-ENV:Envelope>
2
+ <SOAP-ENV:Envelope
3
+ xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
4
+ xmlns:ns1="https://secure.clearbooks.co.uk/api/soap/">
5
+ <SOAP-ENV:Header>
6
+ <ns1:authenticate>true</ns1:authenticate>
7
+ </SOAP-ENV:Header>
8
+ <SOAP-ENV:Body>
9
+ <SOAP-ENV:listEntitiesResponse>
10
+ <entities>
11
+ <ns1:Entity id="1" company_name="Bank Account 1" contact_name="" address1="" town="" county="" country="" postcode="" email="" phone1="" building="" address2="" phone2="" fax="" website="" date_modified="2010-03-04 11:32:14" external_id="0" vat_number="" company_number="" statement_url="https://secure.clearbooks.co.uk/s/64372:jPr2XuqMLUE8cu3nncYs-w">
12
+ <supplier/>
13
+ <customer/>
14
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
15
+ </ns1:Entity>
16
+ <ns1:Entity id="2" company_name="Supplier 1" contact_name="" address1="" town="" county="" country="" postcode="" email="supplier1@ex.com" phone1="+94727790315" building="" address2="" phone2="" fax="+94727790315" website="" date_modified="2015-10-26 14:55:00" external_id="aeolus_1" vat_number="" company_number="" statement_url="https://secure.clearbooks.co.uk/s/64372:uuU7uPz-VOcmDAcfGMWbWw">
17
+ <supplier default_account_code="30" default_vat_rate="0.2" default_credit_terms="30"/>
18
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
19
+ </ns1:Entity>
20
+ <ns1:Entity id="3" company_name="Test User" contact_name="" address1="" town="" county="" country="" postcode="" email="ziyan@jdeen.com" phone1="ziyan@jdeen.com" building="" address2="" phone2="" fax="" website="" date_modified="2015-10-30 08:00:58" external_id="aeolus_3" vat_number="" company_number="" statement_url="https://secure.clearbooks.co.uk/s/64372:ut2JNQrd4jRklcyIPC_8jQ">
21
+ <customer default_account_code="1001001" default_vat_rate="0.2" default_credit_terms="30"/>
22
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
23
+ </ns1:Entity>
24
+ <ns1:Entity id="4" company_name="Supplier 2" contact_name="" address1="" town="" county="" country="" postcode="" email="supplier2@ex.com" phone1="" building="" address2="" phone2="" fax="" website="" date_modified="2015-10-26 14:54:58" external_id="aeolus_2" vat_number="" company_number="" statement_url="https://secure.clearbooks.co.uk/s/64372:Ma2LVzrkvgMcuUriKA80Rg">
25
+ <supplier default_account_code="30" default_vat_rate="0.2" default_credit_terms="30"/>
26
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
27
+ </ns1:Entity>
28
+ <ns1:Entity id="5" company_name="John Doe" contact_name="Mr John Doe" address1="Example Lane" town="London" county="Greater London" country="GB" postcode="01100" email="johndoe@test.com" phone1="+1 234 567 8910" building="Building 1" address2="Example Place" phone2="+1 234 567 8912" fax="+1 234 567 8914" website="http://www.johndoe.com" date_modified="2015-10-30 12:55:07" external_id="106" vat_number="106" company_number="106" statement_url="https://secure.clearbooks.co.uk/s/64372:t8MdYoBZxFiSuyAyKVNBFw">
29
+ <customer default_account_code="0" default_vat_rate="0" default_credit_terms="30"/>
30
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
31
+ </ns1:Entity>
32
+ <ns1:Entity id="6" company_name="Jane Industries" contact_name="Mrs Jane Doe" address1="Example Lane" town="London" county="Greater London" country="GB" postcode="01100" email="janedoe@test.com" phone1="+1 234 567 8911" building="Building 2" address2="Example Place" phone2="+1 234 567 8913" fax="+1 234 567 8917" website="http://www.janedoe.com" date_modified="2015-10-30 13:00:28" external_id="106" vat_number="105" company_number="106" statement_url="https://secure.clearbooks.co.uk/s/64372:97lRduxMpTcowPCTWOxvLg">
33
+ <supplier default_account_code="30" default_vat_rate="0.2" default_credit_terms="30"/>
34
+ <bankAccount bankName="" name="" sortcode="" accountNumber=""/>
35
+ </ns1:Entity>
36
+ </entities>
37
+ </SOAP-ENV:listEntitiesResponse>
38
+ </SOAP-ENV:Body>
39
+ </SOAP-ENV:Envelope>
40
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clearbooks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.2
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bjoern Rennhak
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-18 00:00:00.000000000 Z
12
+ date: 2015-11-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -161,7 +161,7 @@ post_install_message: "
161
161
  | | ____| / | _ | __ ) / _ / _ | |/ / ___| \n | | | | | _| / _
162
162
  \ | |_) | _ | | | | | | | ' /___ \n | |___| |___| |___ / ___ | _ <| |_) |
163
163
  |_| | |_| | . ___) |\n ____|_____|_____/_/ __| _____/ ___/ ___/|_|_____/
164
- \n \n\n (c) 2015-05-18
164
+ \n \n\n (c) 2015-11-03
165
165
  00:00:00 UTC, All rights reserved\n Bjoern Rennhak, Greylon Ltd.\n\n Don't
166
166
  forget to get Clearbooks API key from http://clearbooks.co.uk\n and save it in
167
167
  ~/.clearbooks/config.yml:\n\n $ echo \"api_key: {your_api_key}\" >> ~/.clearbooks/config.yml\n\n