intacctrb 0.5.7 → 0.5.8

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: 778b7089ed0bc7229254ae022327e841b571f235
4
- data.tar.gz: b82a22dc0c6c66cf266fc2065da536b1e58c7fbe
3
+ metadata.gz: 328f00d0ecf540d300b82cd5af43bed2799e5569
4
+ data.tar.gz: 7b771204fad2a1f723a4b76602ff535b0c0ebadd
5
5
  SHA512:
6
- metadata.gz: 448305349ed8c8ec1196092266ab56feb02e852ad535610f49123bde8de3f76e7888bf9e89e0e2d3f9f8a9b9b783f25c0eae291612c6534052b3419621483f81
7
- data.tar.gz: 3948bc38b2f0fb6114bcf9861f2f5837bfb10d50e57ca3405eeb35f22ac9e396558837f939ec2b230fd3df990297775e7cfa4dc2d93dfc8eefa1f438f0683fd3
6
+ metadata.gz: 8f4fb958e8ff0ae1a2520be02338a94f5a4cbf79c6c5b8f8bf0ca652ed1485145c62076ad36c235525b49ddbdce32bd605460e640e0a31b1756ecf9a5239a599
7
+ data.tar.gz: ad4845178f7973d379215d69d2e073471bf9cd1f56f3bbd3e945ff01ffad3a092d7dc05870d3274f5a71cdb22007790c8406d06e8e764074c3f2cb05c206d106
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- intacctrb (0.5.7)
4
+ intacctrb (0.5.8)
5
5
  hooks
6
6
  nokogiri
7
7
 
@@ -12,19 +12,19 @@ module IntacctRB
12
12
  successful?
13
13
  end
14
14
 
15
- def get *fields
16
- #return false unless object.intacct_system_id.present?
15
+ def get(options = {})
16
+ # return false unless object.intacct_system_id.present?
17
17
 
18
- fields = [
18
+ options[:fields] = [
19
19
  :employeeid,
20
- :personalinfo
21
- ] if fields.empty?
20
+ :contactname
21
+ ] if options[:fields].nil?
22
22
 
23
23
  send_xml('get') do |xml|
24
24
  xml.function(controlid: "f4") {
25
25
  xml.read {
26
26
  xml.object 'EMPLOYEE'
27
- xml.keys object.intacct_id
27
+ xml.keys object.try(:intacct_id) || options[:intacct_id]
28
28
  xml.fields '*'
29
29
  }
30
30
  }
@@ -32,8 +32,8 @@ module IntacctRB
32
32
 
33
33
  if successful?
34
34
  @data = OpenStruct.new({
35
- id: response.at("//employee//employeeid").content,
36
- name: response.at("//employee//personalinfo//contactname").content
35
+ id: response.at("//EMPLOYEE/RECORDNO").content,
36
+ name: response.at("//EMPLOYEE/PERSONALINFO/CONTACTNAME").content
37
37
  })
38
38
  end
39
39
 
@@ -95,7 +95,7 @@ module IntacctRB
95
95
 
96
96
  @response = send_xml('delete') do |xml|
97
97
  xml.function(controlid: "1") {
98
- xml.delete_customer(employeeid: intacct_system_id)
98
+ xml.delete_employee(employeeid: intacct_system_id)
99
99
  }
100
100
  end
101
101
 
@@ -51,7 +51,7 @@ module IntacctRB
51
51
  xml.query options[:filter]
52
52
  if options[:fields]
53
53
  xml.fields {
54
- fields.each do |field|
54
+ options[:fields].each do |field|
55
55
  xml.field field.to_s
56
56
  end
57
57
  }
@@ -87,7 +87,7 @@ module IntacctRB
87
87
  xml.keys object.try(:intacct_id) || options[:intacct_id]
88
88
  if options[:fields]
89
89
  xml.fields {
90
- fields.each do |field|
90
+ options[:fields].each do |field|
91
91
  xml.field field.to_s
92
92
  end
93
93
  }
@@ -1,3 +1,3 @@
1
1
  module IntacctRB
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intacctrb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Hale