quickbooks-ruby 0.6.6 → 0.6.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 +4 -4
- data/lib/quickbooks/model/change_data_capture.rb +8 -0
- data/lib/quickbooks/model/custom_field.rb +18 -0
- data/lib/quickbooks/model/item.rb +2 -1
- data/lib/quickbooks/model/physical_address.rb +2 -2
- data/lib/quickbooks/model/preferences.rb +8 -3
- data/lib/quickbooks/service/base_service.rb +4 -0
- data/lib/quickbooks/util/logging.rb +4 -0
- data/lib/quickbooks/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f0f3695093279eed43fc6d76197a6b5cf69142ef0edc91f680981c1c9b30300
|
4
|
+
data.tar.gz: 04321daa044502c5bea12a6530323e50fc61e6838b6290598ad535ab11cfa885
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a0c35ff4ccbaf55a1846b00118c6e20de33f0780f477e459c68d6b6a12804c6e97de05c6e00a2a0a8da9c7faaa9ea0d330cf623a8d1036d985b7c2c18a542da
|
7
|
+
data.tar.gz: 283064cdffe11bbddb36b52d237a25635da700b6cb850391570c803a63d053adc473b458df57c66cdc0e7058ed2b997ad5e2a033d7aa64b609cb2ee4fb25306b
|
@@ -19,6 +19,14 @@ module Quickbooks
|
|
19
19
|
data
|
20
20
|
end
|
21
21
|
|
22
|
+
# time when refresh was requests from cdc/ endpoiint
|
23
|
+
# more information @here - https://developer.intuit.com/app/developer/qbo/docs/develop/explore-the-quickbooks-online-api/change-data-capture#using-change-data-capture
|
24
|
+
#
|
25
|
+
def time
|
26
|
+
attribute = xml.root.attribute('time')
|
27
|
+
attribute.value if attribute
|
28
|
+
end
|
29
|
+
|
22
30
|
private
|
23
31
|
|
24
32
|
def all_of_type(entity)
|
@@ -8,6 +8,24 @@ module Quickbooks
|
|
8
8
|
xml_accessor :boolean_value, :from => 'BooleanValue'
|
9
9
|
xml_accessor :date_value, :from => 'DateValue', :as => Date
|
10
10
|
xml_accessor :number_value, :from => 'NumberValue', :as => Integer
|
11
|
+
|
12
|
+
def value
|
13
|
+
case type
|
14
|
+
when 'BooleanType' then boolean_value == 'true'
|
15
|
+
when 'StringType' then string_value
|
16
|
+
when 'DateType' then date_value
|
17
|
+
when 'NumberType' then number_value
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def value=(value)
|
22
|
+
case type
|
23
|
+
when 'BooleanType' then self.boolean_value = value ? 'true' : 'false'
|
24
|
+
when 'StringType' then self.string_value = value
|
25
|
+
when 'DateType' then self.date_value = value
|
26
|
+
when 'NumberType' then self.number_value = value
|
27
|
+
end
|
28
|
+
end
|
11
29
|
end
|
12
30
|
end
|
13
31
|
end
|
@@ -50,9 +50,10 @@ module Quickbooks
|
|
50
50
|
xml_accessor :sales_tax_code_ref, :from => 'SalesTaxCodeRef', :as => BaseReference
|
51
51
|
xml_accessor :purchase_tax_code_ref, :from => 'PurchaseTaxCodeRef', :as => BaseReference
|
52
52
|
xml_accessor :inv_start_date, :from => 'InvStartDate', :as => Date
|
53
|
-
|
53
|
+
xml_accessor :custom_fields, :from => "CustomField", as: [CustomField]
|
54
54
|
xml_accessor :print_grouped_items?, :from => 'PrintGroupedItems'
|
55
55
|
|
56
|
+
|
56
57
|
xml_accessor :item_group_details, :from => 'ItemGroupDetail', :as => ItemGroupDetail
|
57
58
|
|
58
59
|
reference_setters :parent_ref, :income_account_ref, :expense_account_ref
|
@@ -20,9 +20,6 @@ module Quickbooks
|
|
20
20
|
PREFERENCE_SECTIONS = {
|
21
21
|
:accounting_info => %w(TrackDepartments DepartmentTerminology ClassTrackingPerTxnLine? ClassTrackingPerTxn? CustomerTerminology),
|
22
22
|
:product_and_services => %w(ForSales? ForPurchase? QuantityWithPriceAndRate? QuantityOnHand?),
|
23
|
-
:sales_forms => %w(CustomTxnNumbers? AllowDeposit? AllowDiscount? DefaultDiscountAccount? AllowEstimates? EstimateMessage?
|
24
|
-
ETransactionEnabledStatus? ETransactionAttachPDF? ETransactionPaymentEnabled? IPNSupportEnabled?
|
25
|
-
AllowServiceDate? AllowShipping? DefaultShippingAccount? DefaultTerms DefaultCustomerMessage),
|
26
23
|
:vendor_and_purchase => %w(TrackingByCustomer? BillableExpenseTracking? DefaultTerms? DefaultMarkup? POCustomField),
|
27
24
|
:time_tracking => %w(UseServices? BillCustomers? ShowBillRateToAll WorkWeekStartDate MarkTimeEntiresBillable?),
|
28
25
|
:tax => %w(UsingSalesTax? PartnerTaxEnabled?),
|
@@ -30,6 +27,14 @@ module Quickbooks
|
|
30
27
|
:report => %w(ReportBasis)
|
31
28
|
}
|
32
29
|
|
30
|
+
xml_reader :sales_forms, :from => "SalesFormsPrefs", :as => create_preference_class(*%w(
|
31
|
+
CustomTxnNumbers? AllowDeposit? AllowDiscount? DefaultDiscountAccount? AllowEstimates? EstimateMessage?
|
32
|
+
ETransactionEnabledStatus? ETransactionAttachPDF? ETransactionPaymentEnabled? IPNSupportEnabled?
|
33
|
+
AllowServiceDate? AllowShipping? DefaultShippingAccount? DefaultTerms DefaultCustomerMessage
|
34
|
+
)) {
|
35
|
+
xml_reader :custom_fields, :as => [CustomField], :from => 'CustomField', in: 'CustomField'
|
36
|
+
}
|
37
|
+
|
33
38
|
PREFERENCE_SECTIONS.each do |section_name, fields|
|
34
39
|
xml_reader section_name, :from => "#{section_name}_prefs".camelize, :as => create_preference_class(*fields)
|
35
40
|
end
|
@@ -258,6 +258,10 @@ module Quickbooks
|
|
258
258
|
end
|
259
259
|
|
260
260
|
def check_response(response, options = {})
|
261
|
+
log "------ RESPONSE_HEADERS -----"
|
262
|
+
if log?
|
263
|
+
response.each_header {|h| log "#{h}: #{response[h]}"}
|
264
|
+
end
|
261
265
|
log "------ QUICKBOOKS-RUBY RESPONSE ------"
|
262
266
|
log "RESPONSE CODE = #{response.code}"
|
263
267
|
log_response_body(response)
|
data/lib/quickbooks/version.rb
CHANGED
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.6.
|
4
|
+
version: 0.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Caughlan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth
|