myob-api 0.2.4 → 0.3
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 +5 -0
- data/lib/myob/api/client.rb +4 -0
- data/lib/myob/api/models/base.rb +0 -2
- data/lib/myob/api/models/current_user.rb +11 -0
- data/lib/myob/api/models/employee_payroll_advice.rb +1 -1
- data/lib/myob/api/models/invoice.rb +1 -1
- data/lib/myob/api/models/invoice_item.rb +11 -0
- data/lib/myob/api/version.rb +1 -1
- data/myob-api.gemspec +1 -1
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ac11e5a23f2d2df24d84b7660709d67dfbf8933
|
4
|
+
data.tar.gz: e59ceb0ea7323fec46b0c10f3f1d5ba10e1373b0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5435894b9ce6f54f1aa3d033efb97753ae04816b5d408275f2685e8624989529d86e6bc08ecc2bb73f050c8b28db078cbc41be965bc55a3f38b8dcd64a332216
|
7
|
+
data.tar.gz: 2401af76812005926e9dcf7700d85ecee107aba06545d4ab4ec9dfde601aebd4225b8e67e873b07a20c8eb4ae360c4ad37d132fd8371f320edb0937498dc7c2c
|
data/lib/myob-api.rb
CHANGED
@@ -6,6 +6,8 @@ require 'myob/api/models/base'
|
|
6
6
|
require 'myob/api/models/company_file'
|
7
7
|
require 'myob/api/models/company'
|
8
8
|
|
9
|
+
require 'myob/api/models/current_user'
|
10
|
+
|
9
11
|
require 'myob/api/models/contact'
|
10
12
|
require 'myob/api/models/customer'
|
11
13
|
require 'myob/api/models/employee'
|
@@ -14,10 +16,13 @@ require 'myob/api/models/employee_payroll_details'
|
|
14
16
|
require 'myob/api/models/employee_payroll_advice'
|
15
17
|
|
16
18
|
require 'myob/api/models/invoice'
|
19
|
+
require 'myob/api/models/invoice_item'
|
17
20
|
|
18
21
|
require 'myob/api/models/payroll_category'
|
19
22
|
require 'myob/api/models/wage'
|
20
23
|
|
21
24
|
require 'myob/api/models/timesheet'
|
22
25
|
|
26
|
+
require 'myob/api/models/employee_payroll_advice'
|
27
|
+
|
23
28
|
require 'myob/api/client'
|
data/lib/myob/api/client.rb
CHANGED
@@ -11,6 +11,7 @@ module Myob
|
|
11
11
|
def initialize(options)
|
12
12
|
model :CompanyFile
|
13
13
|
|
14
|
+
model :CurrentUser
|
14
15
|
model :Company
|
15
16
|
|
16
17
|
model :Contact
|
@@ -21,12 +22,15 @@ module Myob
|
|
21
22
|
model :EmployeePayrollAdvice
|
22
23
|
|
23
24
|
model :Invoice
|
25
|
+
model :InvoiceItem
|
24
26
|
|
25
27
|
model :PayrollCategory
|
26
28
|
model :Wage
|
27
29
|
|
28
30
|
model :Timesheet
|
29
31
|
|
32
|
+
model :EmployeePayrollAdvice
|
33
|
+
|
30
34
|
@redirect_uri = options[:redirect_uri]
|
31
35
|
@consumer = options[:consumer]
|
32
36
|
@access_token = options[:access_token]
|
data/lib/myob/api/models/base.rb
CHANGED
@@ -56,13 +56,11 @@ module Myob
|
|
56
56
|
def create(object)
|
57
57
|
object = typecast(object)
|
58
58
|
response = @client.connection.post(self.url, {:headers => @client.headers, :body => object.to_json})
|
59
|
-
response.status == 201
|
60
59
|
end
|
61
60
|
|
62
61
|
def update(object)
|
63
62
|
object = typecast(object)
|
64
63
|
response = @client.connection.put(self.url(object), {:headers => @client.headers, :body => object.to_json})
|
65
|
-
response.status == 200
|
66
64
|
end
|
67
65
|
|
68
66
|
def typecast(object)
|
data/lib/myob/api/version.rb
CHANGED
data/myob-api.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "oauth2", "
|
21
|
+
spec.add_dependency "oauth2", "> 0.8"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myob-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Lumley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: oauth2
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
@@ -72,11 +72,13 @@ files:
|
|
72
72
|
- lib/myob/api/models/company.rb
|
73
73
|
- lib/myob/api/models/company_file.rb
|
74
74
|
- lib/myob/api/models/contact.rb
|
75
|
+
- lib/myob/api/models/current_user.rb
|
75
76
|
- lib/myob/api/models/customer.rb
|
76
77
|
- lib/myob/api/models/employee.rb
|
77
78
|
- lib/myob/api/models/employee_payroll_advice.rb
|
78
79
|
- lib/myob/api/models/employee_payroll_details.rb
|
79
80
|
- lib/myob/api/models/invoice.rb
|
81
|
+
- lib/myob/api/models/invoice_item.rb
|
80
82
|
- lib/myob/api/models/payroll_category.rb
|
81
83
|
- lib/myob/api/models/timesheet.rb
|
82
84
|
- lib/myob/api/models/wage.rb
|
@@ -102,8 +104,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
104
|
version: '0'
|
103
105
|
requirements: []
|
104
106
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.2.
|
107
|
+
rubygems_version: 2.2.0.rc.1
|
106
108
|
signing_key:
|
107
109
|
specification_version: 4
|
108
110
|
summary: MYOB AccountRight Live API V2
|
109
111
|
test_files: []
|
112
|
+
has_rdoc:
|