quickbooks-ruby 0.1.8 → 0.1.9

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: 126cd8c2502ef5e347fc370519e4cac6a14f3d41
4
- data.tar.gz: 6db2de33787e10842076dd81e83eb5dee722bf37
3
+ metadata.gz: ce384cefff5b0aba72b01e162823f74c4ccaf99b
4
+ data.tar.gz: bd2a48112be5e3f3155589beacf62c385a81d8d0
5
5
  SHA512:
6
- metadata.gz: 7f29c1ec30a4d11e695d0679ba19d67d827a3d8c08a217b54887e268956f5a31438062a26de7186285310648443f68c8890ec195becbcf0f4e46d9b24eb8820a
7
- data.tar.gz: f7e8fbad8b49727faafc70465d25dac6ecb01d8c2861ae31f60338fef0b73b5247cee5d7f1ff2ddd5c3f1987910b9b553afd6424de21d09055c1b657780fb3f4
6
+ metadata.gz: 09ddf73d07a87ce71b12ffcdbfe8726bcc7b98ac0c7ab96aef75e6ed22cbf7e66ec8a3085ef3de674fe6a21e02ade29e7bdf112eb5b5541e92a2fcac2f6ad8f0
7
+ data.tar.gz: 05a8b2f6c4a78628ec5d874937a71db087c39b19096aaf21b754205f5336c9c5ab48c7472406133ce72195bd337b044fc550ce666367c4d71edb4cb7bee351f4
@@ -89,6 +89,7 @@ require 'quickbooks/model/refund_receipt'
89
89
  require 'quickbooks/model/invoice_change'
90
90
  require 'quickbooks/model/customer_change'
91
91
  require 'quickbooks/model/vendor_change'
92
+ require 'quickbooks/model/item_change'
92
93
 
93
94
 
94
95
  #== Services
@@ -125,6 +126,7 @@ require 'quickbooks/service/refund_receipt'
125
126
  require 'quickbooks/service/invoice_change'
126
127
  require 'quickbooks/service/customer_change'
127
128
  require 'quickbooks/service/vendor_change'
129
+ require 'quickbooks/service/item_change'
128
130
 
129
131
  module Quickbooks
130
132
  @@sandbox_mode = false
@@ -0,0 +1,12 @@
1
+ module Quickbooks
2
+ module Model
3
+ # Refer to: https://developer.intuit.com/docs/0100_accounting/0300_developer_guides/change_data_capture
4
+ class ItemChange < BaseModel
5
+ XML_NODE = "Item"
6
+
7
+ xml_accessor :id, :from => 'Id', :as => Integer
8
+ xml_accessor :status, :from => '@status'
9
+ xml_accessor :meta_data, :from => 'MetaData', :as => MetaData
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,23 @@
1
+ module Quickbooks
2
+ module Service
3
+ class ItemChange < BaseService
4
+
5
+ def url_for_query(query = nil, start_position = 1, max_results = 20)
6
+ q = "Item"
7
+ q = "#{q}&#{query}" if query.present?
8
+
9
+ "#{url_for_base}/cdc?entities=#{q}"
10
+ end
11
+
12
+ def since(timestamp)
13
+ query("changedSince=#{URI.encode_www_form_component(timestamp.iso8601)}")
14
+ end
15
+
16
+ private
17
+
18
+ def model
19
+ Quickbooks::Model::ItemChange
20
+ end
21
+ end
22
+ end
23
+ end
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quickbooks-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-13 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth
@@ -208,6 +208,7 @@ files:
208
208
  - lib/quickbooks/model/invoice_line_item.rb
209
209
  - lib/quickbooks/model/item.rb
210
210
  - lib/quickbooks/model/item_based_expense_line_detail.rb
211
+ - lib/quickbooks/model/item_change.rb
211
212
  - lib/quickbooks/model/journal_entry.rb
212
213
  - lib/quickbooks/model/journal_entry_line_detail.rb
213
214
  - lib/quickbooks/model/line.rb
@@ -261,6 +262,7 @@ files:
261
262
  - lib/quickbooks/service/invoice.rb
262
263
  - lib/quickbooks/service/invoice_change.rb
263
264
  - lib/quickbooks/service/item.rb
265
+ - lib/quickbooks/service/item_change.rb
264
266
  - lib/quickbooks/service/journal_entry.rb
265
267
  - lib/quickbooks/service/payment.rb
266
268
  - lib/quickbooks/service/payment_method.rb