quickeebooks 0.1.22 → 0.1.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/lib/quickeebooks/common/addressable.rb +4 -4
- data/lib/quickeebooks/common/date_time.rb +2 -2
- data/lib/quickeebooks/common/online_entity_model.rb +1 -1
- data/lib/quickeebooks/online/model/account.rb +1 -1
- data/lib/quickeebooks/online/model/account_reference.rb +1 -1
- data/lib/quickeebooks/online/model/address.rb +2 -2
- data/lib/quickeebooks/online/model/bill_line_item.rb +2 -2
- data/lib/quickeebooks/online/model/clazz.rb +6 -6
- data/lib/quickeebooks/online/model/company_meta_data.rb +1 -1
- data/lib/quickeebooks/online/model/credit_card.rb +1 -1
- data/lib/quickeebooks/online/model/credit_charge_info.rb +1 -1
- data/lib/quickeebooks/online/model/credit_charge_response.rb +1 -1
- data/lib/quickeebooks/online/model/customer_custom_field.rb +2 -2
- data/lib/quickeebooks/online/model/email.rb +2 -2
- data/lib/quickeebooks/online/model/id.rb +8 -8
- data/lib/quickeebooks/online/model/intuit_type.rb +5 -5
- data/lib/quickeebooks/online/model/invoice.rb +2 -2
- data/lib/quickeebooks/online/model/invoice_header.rb +1 -1
- data/lib/quickeebooks/online/model/invoice_line_item.rb +1 -1
- data/lib/quickeebooks/online/model/item.rb +12 -4
- data/lib/quickeebooks/online/model/job.rb +2 -2
- data/lib/quickeebooks/online/model/journal_entry.rb +1 -1
- data/lib/quickeebooks/online/model/journal_entry_line_item.rb +2 -2
- data/lib/quickeebooks/online/model/meta_data.rb +2 -2
- data/lib/quickeebooks/online/model/open_balance.rb +1 -1
- data/lib/quickeebooks/online/model/payment_detail.rb +1 -1
- data/lib/quickeebooks/online/model/payment_header.rb +1 -1
- data/lib/quickeebooks/online/model/payment_line_item.rb +3 -3
- data/lib/quickeebooks/online/model/phone.rb +1 -1
- data/lib/quickeebooks/online/model/price.rb +1 -1
- data/lib/quickeebooks/online/model/purchase_cost.rb +1 -1
- data/lib/quickeebooks/online/model/sales_receipt.rb +1 -1
- data/lib/quickeebooks/online/model/sales_receipt_line_item.rb +2 -2
- data/lib/quickeebooks/online/model/time_activity.rb +13 -0
- data/lib/quickeebooks/online/model/time_activity_employee.rb +1 -1
- data/lib/quickeebooks/online/model/time_activity_vendor.rb +1 -1
- data/lib/quickeebooks/online/model/tracking_class.rb +1 -1
- data/lib/quickeebooks/online/model/unit_price.rb +1 -1
- data/lib/quickeebooks/online/model/web_site.rb +2 -2
- data/lib/quickeebooks/online/service/account.rb +1 -1
- data/lib/quickeebooks/online/service/clazz.rb +1 -1
- data/lib/quickeebooks/online/service/employee.rb +1 -1
- data/lib/quickeebooks/online/service/entitlement.rb +1 -1
- data/lib/quickeebooks/online/service/item.rb +1 -1
- data/lib/quickeebooks/online/service/pagination.rb +1 -1
- data/lib/quickeebooks/online/service/payment_method.rb +1 -1
- data/lib/quickeebooks/online/service/sort.rb +1 -1
- data/lib/quickeebooks/online/service/tracking_class.rb +1 -1
- data/lib/quickeebooks/shared/service/filter.rb +4 -4
- data/lib/quickeebooks/shared/service/operation_node.rb +8 -8
- data/lib/quickeebooks/shared/service/sort.rb +1 -1
- data/lib/quickeebooks/version.rb +1 -1
- data/lib/quickeebooks/windows/model/account.rb +7 -7
- data/lib/quickeebooks/windows/model/account_reference.rb +2 -2
- data/lib/quickeebooks/windows/model/address.rb +4 -4
- data/lib/quickeebooks/windows/model/clazz.rb +6 -6
- data/lib/quickeebooks/windows/model/company_meta_data.rb +1 -1
- data/lib/quickeebooks/windows/model/custom_field.rb +1 -1
- data/lib/quickeebooks/windows/model/customer.rb +9 -9
- data/lib/quickeebooks/windows/model/customer_msg.rb +3 -3
- data/lib/quickeebooks/windows/model/email.rb +6 -6
- data/lib/quickeebooks/windows/model/error.rb +4 -4
- data/lib/quickeebooks/windows/model/external_key.rb +4 -4
- data/lib/quickeebooks/windows/model/id.rb +7 -7
- data/lib/quickeebooks/windows/model/id_set.rb +6 -6
- data/lib/quickeebooks/windows/model/intuit_type.rb +1 -1
- data/lib/quickeebooks/windows/model/invoice.rb +5 -5
- data/lib/quickeebooks/windows/model/invoice_header.rb +1 -1
- data/lib/quickeebooks/windows/model/invoice_line_item.rb +4 -4
- data/lib/quickeebooks/windows/model/item.rb +2 -2
- data/lib/quickeebooks/windows/model/job.rb +8 -7
- data/lib/quickeebooks/windows/model/job_job_info.rb +1 -1
- data/lib/quickeebooks/windows/model/meta_data.rb +1 -1
- data/lib/quickeebooks/windows/model/ng_id.rb +6 -6
- data/lib/quickeebooks/windows/model/ng_id_set.rb +5 -5
- data/lib/quickeebooks/windows/model/object_ref.rb +3 -3
- data/lib/quickeebooks/windows/model/open_balance.rb +1 -1
- data/lib/quickeebooks/windows/model/other_name.rb +2 -2
- data/lib/quickeebooks/windows/model/other_name_id.rb +4 -4
- data/lib/quickeebooks/windows/model/party_role_ref.rb +1 -1
- data/lib/quickeebooks/windows/model/payment_header.rb +4 -4
- data/lib/quickeebooks/windows/model/payment_line_item.rb +2 -2
- data/lib/quickeebooks/windows/model/payment_method.rb +2 -2
- data/lib/quickeebooks/windows/model/phone.rb +3 -3
- data/lib/quickeebooks/windows/model/price.rb +2 -2
- data/lib/quickeebooks/windows/model/purchase_cost.rb +1 -1
- data/lib/quickeebooks/windows/model/rest_response.rb +6 -6
- data/lib/quickeebooks/windows/model/sales_receipt.rb +2 -2
- data/lib/quickeebooks/windows/model/sales_receipt_header.rb +1 -1
- data/lib/quickeebooks/windows/model/sales_receipt_line_item.rb +4 -4
- data/lib/quickeebooks/windows/model/sales_rep.rb +5 -5
- data/lib/quickeebooks/windows/model/sales_tax.rb +4 -4
- data/lib/quickeebooks/windows/model/ship_method.rb +3 -3
- data/lib/quickeebooks/windows/model/success.rb +4 -4
- data/lib/quickeebooks/windows/model/sync_status_param.rb +5 -5
- data/lib/quickeebooks/windows/model/sync_status_request.rb +6 -6
- data/lib/quickeebooks/windows/model/sync_status_response.rb +6 -6
- data/lib/quickeebooks/windows/model/tax_line.rb +1 -1
- data/lib/quickeebooks/windows/model/time_activity_employee.rb +1 -1
- data/lib/quickeebooks/windows/model/time_activity_vendor.rb +1 -1
- data/lib/quickeebooks/windows/model/unit_price.rb +1 -1
- data/lib/quickeebooks/windows/model/vendor.rb +2 -2
- data/lib/quickeebooks/windows/model/vendor_id.rb +4 -4
- data/lib/quickeebooks/windows/model/vendor_reference.rb +2 -2
- data/lib/quickeebooks/windows/model/web_site.rb +2 -2
- data/lib/quickeebooks/windows/service/access_token.rb +1 -1
- data/lib/quickeebooks/windows/service/account.rb +7 -2
- data/lib/quickeebooks/windows/service/clazz.rb +1 -1
- data/lib/quickeebooks/windows/service/customer.rb +1 -1
- data/lib/quickeebooks/windows/service/customer_msg.rb +2 -2
- data/lib/quickeebooks/windows/service/invoice.rb +6 -6
- data/lib/quickeebooks/windows/service/item.rb +7 -2
- data/lib/quickeebooks/windows/service/job.rb +5 -5
- data/lib/quickeebooks/windows/service/payment.rb +2 -2
- data/lib/quickeebooks/windows/service/payment_method.rb +2 -2
- data/lib/quickeebooks/windows/service/sales_rep.rb +1 -1
- data/lib/quickeebooks/windows/service/sales_tax.rb +2 -2
- data/lib/quickeebooks/windows/service/service_base.rb +1 -1
- data/lib/quickeebooks/windows/service/ship_method.rb +3 -3
- data/lib/quickeebooks/windows/service/sort.rb +1 -1
- data/lib/quickeebooks/windows/service/sync_status.rb +4 -4
- metadata +27 -27
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
Y2VhOTU0ZTJiZGNiNmFlMTFiODg1MjA3N2E5ZmVhNTliYTFhYTBmOGVkOGQw
|
10
|
-
YjFiZDdjZDY1ODRjMTBiNGJjNTdkODMxMmRiYzBmZTRhZWQyZjljMzIxOWIw
|
11
|
-
YjJkZjkxNWFkNTA5MDk1MjhiNjE3ZTU2MmZjYmFhZWViYWJmMzA=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
NDUyMzcwMzNlYWZkYmM3OTkxMGMwMjVmMjlhMzI4ZTVjNTY2MTI3YWUwNzVj
|
14
|
-
Y2Q0YzFlYWRkOTNkMDE5MmQyZjg1NmFkYmUxNTA4YjQ3NGJiMjRlYjZlMDEy
|
15
|
-
OGE5OWViMzNjMjliZGFmMGZiMTNkN2M3ZjY3N2MwNjRiNDI5ODE=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 957d18c455b65bad21cb02301a81bed85e831c9f
|
4
|
+
data.tar.gz: dfe17e2f5a4a35260e72b445ec0c31872f7c566b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7215ec5084cbadd40ebb2cf27d6f0bd8e255d0194018e3220d556f385c2d642a055d21a7169ee411158b89ea11cf7044355ae309b60b15135f016a6565e518c1
|
7
|
+
data.tar.gz: c7caa643706f746f82b150942ccd2108d6efd786bafe29f3a43acab5f86810e84688a83602a9cdc1edd2905df90096f08bf58309a0c0d17cf18cb3ac8f11f56e
|
@@ -6,10 +6,10 @@ module Quickeebooks
|
|
6
6
|
base.send :include, InstanceMethods
|
7
7
|
base.extend ClassMethods
|
8
8
|
end
|
9
|
-
|
9
|
+
|
10
10
|
module ClassMethods
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
module InstanceMethods
|
14
14
|
def phone=(phone)
|
15
15
|
self.phones ||= []
|
@@ -58,9 +58,9 @@ module Quickeebooks
|
|
58
58
|
def select_address(tag)
|
59
59
|
addresses.detect { |address| address.tag == tag }
|
60
60
|
end
|
61
|
-
|
61
|
+
|
62
62
|
end # InstanceMethods
|
63
63
|
|
64
64
|
end
|
65
65
|
end
|
66
|
-
end
|
66
|
+
end
|
@@ -24,7 +24,7 @@ module OnlineEntityModel
|
|
24
24
|
xml_accessor :sales_term_id, :from => 'SalesTermId', :as => Quickeebooks::Online::Model::Id
|
25
25
|
xml_accessor :open_balance, :from => 'OpenBalance', :as => Quickeebooks::Online::Model::OpenBalance
|
26
26
|
xml_accessor :external_id, :from => 'ExternalId'
|
27
|
-
end
|
27
|
+
end
|
28
28
|
end
|
29
29
|
|
30
30
|
|
@@ -11,26 +11,26 @@ module Quickeebooks
|
|
11
11
|
|
12
12
|
XML_COLLECTION_NODE = 'Classes'
|
13
13
|
XML_NODE = 'Class'
|
14
|
-
|
14
|
+
|
15
15
|
# https://developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/class
|
16
16
|
REST_RESOURCE = "class"
|
17
|
-
|
17
|
+
|
18
18
|
xml_convention :camelcase
|
19
19
|
xml_accessor :id, :from => 'Id', :as => Quickeebooks::Online::Model::Id
|
20
20
|
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
21
21
|
xml_accessor :meta_data, :from => 'MetaData', :as => Quickeebooks::Online::Model::MetaData
|
22
22
|
xml_accessor :name
|
23
23
|
xml_accessor :class_parent_id, :from => 'ClassParentId', :as => Quickeebooks::Online::Model::Id
|
24
|
-
|
24
|
+
|
25
25
|
validates_length_of :name, :minimum => 1, :maximum => 256
|
26
|
-
|
26
|
+
|
27
27
|
def valid_for_update?
|
28
28
|
if sync_token.nil?
|
29
29
|
errors.add(:sync_token, "Missing required attribute SyncToken for update")
|
30
30
|
end
|
31
31
|
errors.empty?
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
def valid_for_create?
|
35
35
|
valid?
|
36
36
|
if type_of.nil?
|
@@ -49,7 +49,7 @@ module Quickeebooks
|
|
49
49
|
return false if(id.nil? || sync_token.nil?)
|
50
50
|
id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0
|
51
51
|
end
|
52
|
-
|
52
|
+
|
53
53
|
def self.resource_for_collection
|
54
54
|
"classes"
|
55
55
|
end
|
@@ -13,7 +13,7 @@ module Quickeebooks
|
|
13
13
|
xml_accessor :value, :from => 'Value'
|
14
14
|
|
15
15
|
def to_xml(options = {})
|
16
|
-
# Intuit v3 doesnt support custom field updating...
|
16
|
+
# Intuit v3 doesnt support custom field updating...
|
17
17
|
return ""
|
18
18
|
|
19
19
|
# return "" if value.to_s.empty?
|
@@ -48,4 +48,4 @@ module Quickeebooks
|
|
48
48
|
end
|
49
49
|
|
50
50
|
end
|
51
|
-
end
|
51
|
+
end
|
@@ -4,27 +4,27 @@ module Quickeebooks
|
|
4
4
|
module Online
|
5
5
|
module Model
|
6
6
|
class Id < Quickeebooks::Online::Model::IntuitType
|
7
|
-
|
8
|
-
|
7
|
+
|
8
|
+
|
9
9
|
DOMAIN = "QBO"
|
10
|
-
|
10
|
+
|
11
11
|
xml_convention :camelcase
|
12
12
|
xml_accessor :idDomain, :from => '@idDomain' # Attribute with name 'idDomain'
|
13
13
|
xml_accessor :value, :from => :content
|
14
|
-
|
14
|
+
|
15
15
|
def initialize(value = nil)
|
16
16
|
self.value = value
|
17
17
|
end
|
18
|
-
|
18
|
+
|
19
19
|
def to_i
|
20
20
|
self.value.to_i
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def to_s
|
24
24
|
self.value.to_s
|
25
25
|
end
|
26
|
-
|
26
|
+
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
30
|
-
end
|
30
|
+
end
|
@@ -5,13 +5,13 @@ module Quickeebooks
|
|
5
5
|
class IntuitType
|
6
6
|
include ROXML
|
7
7
|
include Logging
|
8
|
-
|
8
|
+
|
9
9
|
# These can be over-ridden in each model object as needed
|
10
10
|
# For the most part a model object has a single resource for all operations
|
11
11
|
# E.g. <baseURL>/resource/invoice/v2/<realmID>
|
12
12
|
# But for the Account object its collection is plural while all other operations are singular
|
13
|
-
# E.g.
|
14
|
-
# Fetch all accounts: <baseURL>/resource/accounts/v2/<realmID>
|
13
|
+
# E.g.
|
14
|
+
# Fetch all accounts: <baseURL>/resource/accounts/v2/<realmID>
|
15
15
|
# vs
|
16
16
|
# Create an account, fetch an account, etc: <baseURL>/resource/account/v2/<realmID>
|
17
17
|
def self.resource_for_collection
|
@@ -22,7 +22,7 @@ module Quickeebooks
|
|
22
22
|
self::REST_RESOURCE
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
|
26
26
|
private
|
27
27
|
|
28
28
|
# ROXML doesnt insert the namespaces into generated XML so we need to do it ourselves
|
@@ -32,7 +32,7 @@ module Quickeebooks
|
|
32
32
|
xml = to_xml(options).write_to(s, :indent => 0, :indent_text => '')
|
33
33
|
destination_name = options.fetch(:destination_name, nil)
|
34
34
|
destination_name ||= model_name
|
35
|
-
|
35
|
+
|
36
36
|
step1 = s.string.sub("<#{model_name}>", "<#{destination_name} #{Quickeebooks::Online::Service::ServiceBase::XML_NS}>")
|
37
37
|
step2 = step1.sub("</#{model_name}>", "</#{destination_name}>")
|
38
38
|
step2
|
@@ -14,10 +14,10 @@ module Quickeebooks
|
|
14
14
|
class Invoice < Quickeebooks::Online::Model::IntuitType
|
15
15
|
include ActiveModel::Validations
|
16
16
|
include OnlineLineItemModelMethods
|
17
|
-
|
17
|
+
|
18
18
|
XML_NODE = "Invoice"
|
19
19
|
REST_RESOURCE = "invoice"
|
20
|
-
|
20
|
+
|
21
21
|
xml_convention :camelcase
|
22
22
|
xml_accessor :id, :from => 'Id', :as => Quickeebooks::Online::Model::Id
|
23
23
|
xml_accessor :sync_token, :from => 'SyncToken', :as => Integer
|
@@ -37,7 +37,7 @@ module Quickeebooks
|
|
37
37
|
xml_accessor :discount_rate, :from => 'DiscountRate', :as => Float
|
38
38
|
xml_accessor :discount_taxable, :from => 'DiscountTaxable'
|
39
39
|
xml_accessor :txn_id, :from => 'TxnId', :as => Quickeebooks::Online::Model::Id
|
40
|
-
|
40
|
+
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -10,9 +10,9 @@ module Quickeebooks
|
|
10
10
|
module Model
|
11
11
|
class Item < Quickeebooks::Online::Model::IntuitType
|
12
12
|
include ActiveModel::Validations
|
13
|
-
|
13
|
+
|
14
14
|
XML_NODE = "Item"
|
15
|
-
|
15
|
+
|
16
16
|
# <baseURL>/resource/items/v2/<realmID>
|
17
17
|
REST_RESOURCE = "item"
|
18
18
|
|
@@ -44,12 +44,20 @@ module Quickeebooks
|
|
44
44
|
id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0
|
45
45
|
end
|
46
46
|
|
47
|
+
def valid_for_update?
|
48
|
+
if sync_token.nil?
|
49
|
+
errors.add(:sync_token, "Missing required attribute SyncToken for update")
|
50
|
+
end
|
51
|
+
valid?
|
52
|
+
errors.empty?
|
53
|
+
end
|
54
|
+
|
47
55
|
def taxable?
|
48
56
|
taxable == "true"
|
49
57
|
end
|
50
|
-
|
58
|
+
|
51
59
|
end
|
52
60
|
end
|
53
61
|
end
|
54
62
|
|
55
|
-
end
|
63
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'quickeebooks/online/model/id'
|
2
2
|
|
3
|
-
module Quickeebooks
|
4
|
-
module Online
|
3
|
+
module Quickeebooks
|
4
|
+
module Online
|
5
5
|
module Model
|
6
6
|
class PaymentLineItem < Quickeebooks::Online::Model::IntuitType
|
7
7
|
xml_name 'Line'
|
@@ -12,4 +12,4 @@ module Quickeebooks
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
15
|
-
end
|
15
|
+
end
|