myob-api 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/myob-api.rb +1 -0
- data/lib/myob/api/helpers.rb +16 -10
- data/lib/myob/api/models/employee_payment_details.rb +11 -0
- data/lib/myob/api/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd65862bea9473d3a94425109564b71659cdd9f2
|
4
|
+
data.tar.gz: 1e7074e94613c7e51f263c21902b24f0c5a141d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c59359ce29ac690d27376f690baf427035e3bd951d3243d118308d06ec1c7b6f2696e81a746584c1a11b85af08d9228a7798633e8cd022ffb4d3ac8b98187931
|
7
|
+
data.tar.gz: 71585e4d59b567dbf40e5f0409765184736337c3d57e9acf160cdfe5ed821ab7f433d66bb097d61fb8a4a75db7cbf92dee61c2099fca757f3cc432a4183c2135
|
data/lib/myob-api.rb
CHANGED
@@ -11,6 +11,7 @@ require 'myob/api/models/current_user'
|
|
11
11
|
require 'myob/api/models/contact'
|
12
12
|
require 'myob/api/models/customer'
|
13
13
|
require 'myob/api/models/employee'
|
14
|
+
require 'myob/api/models/employee_payment_details'
|
14
15
|
require 'myob/api/models/employee_payroll_details'
|
15
16
|
require 'myob/api/models/employee_standard_pay'
|
16
17
|
|
data/lib/myob/api/helpers.rb
CHANGED
@@ -1,16 +1,21 @@
|
|
1
|
-
class String
|
2
|
-
def underscore
|
3
|
-
self.gsub(/::/, '/').
|
4
|
-
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
5
|
-
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
6
|
-
tr("-", "_").
|
7
|
-
downcase
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
1
|
module Myob
|
12
2
|
module Api
|
3
|
+
|
4
|
+
module RefinedString
|
5
|
+
refine String do
|
6
|
+
def underscore
|
7
|
+
self.gsub(/::/, '/').
|
8
|
+
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2').
|
9
|
+
gsub(/([a-z\d])([A-Z])/,'\1_\2').
|
10
|
+
tr("-", "_").
|
11
|
+
downcase
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
13
16
|
module Helpers
|
17
|
+
using RefinedString
|
18
|
+
|
14
19
|
def model(model_name)
|
15
20
|
method_name = model_name.to_s.underscore
|
16
21
|
variable_name = "@#{method_name}_model".to_sym
|
@@ -23,5 +28,6 @@ module Myob
|
|
23
28
|
instance_variable_get(variable_name)
|
24
29
|
end
|
25
30
|
end
|
31
|
+
|
26
32
|
end
|
27
33
|
end
|
data/lib/myob/api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myob-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lumley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- lib/myob/api/models/customer.rb
|
77
77
|
- lib/myob/api/models/customer_payment.rb
|
78
78
|
- lib/myob/api/models/employee.rb
|
79
|
+
- lib/myob/api/models/employee_payment_details.rb
|
79
80
|
- lib/myob/api/models/employee_payroll_advice.rb
|
80
81
|
- lib/myob/api/models/employee_payroll_details.rb
|
81
82
|
- lib/myob/api/models/employee_standard_pay.rb
|