quickbooks-ruby 0.4.7 → 0.4.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: bf58ab2146665d8d154f9bb9169e3d6028d66343
4
- data.tar.gz: f7049347e1d87eb961a93680e2401986995d2f89
3
+ metadata.gz: 8accb99a9e2e28cd2274f2c1c45dfc9bfabe7817
4
+ data.tar.gz: 4ba3e432402d2b07533f5ff819bf8e62fe4a5dff
5
5
  SHA512:
6
- metadata.gz: 4fdad280be3946c721fa615879fa1b5211683a0cb9a289b00ee5c3d65724e2377ea22ef10a371432b8ab2072f3d406767de4c76c6ab39f5701a41d0df0104917
7
- data.tar.gz: 9eb317dc1d41dcef46635279f723e0d73b4f404861c6f414d3f188ad4962b2a386f352d8de762f6bdb08a0d787a8032105e4478be81ba53e038260b45873cc03
6
+ metadata.gz: 832f43c2df17cdd71f82b82475aa48f7046ec94b8f0c437746a0d2dcc83705119f5fb41494785f9eda893351ab8bd54b0a412fec9403fb3c63f814acc64c1f68
7
+ data.tar.gz: 6127fb270adce5d42790d5c1ec29507a42a9fc4c3be1db2beaf3498e4177f6b5f23ed5ec4b91be94daa197e92088a28ed8efe7592a44cd63b0c26f8599ee4a6a
@@ -86,7 +86,9 @@ module Quickbooks
86
86
  references = args.empty? ? reference_attrs : args
87
87
 
88
88
  references.each do |attribute|
89
- method_name = "#{attribute.to_s.gsub('_ref', '_id')}=".to_sym
89
+ last_index = attribute.to_s.rindex('_ref')
90
+ field_name = !last_index.nil? ? attribute.to_s.slice(0, last_index) : attribute
91
+ method_name = "#{field_name}_id=".to_sym
90
92
  unless instance_methods(false).include?(method_name)
91
93
  method_definition = <<-METH
92
94
  def #{method_name}(id)
@@ -1,5 +1,5 @@
1
1
  module Quickbooks
2
2
 
3
- VERSION = "0.4.7"
3
+ VERSION = "0.4.8"
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.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Caughlan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-07 00:00:00.000000000 Z
11
+ date: 2017-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oauth