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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc85f2a59b39c750c23a913d0739ce3ef05ce5e2
4
- data.tar.gz: cc360b81a85326596dac60143791e41885f2e0a2
3
+ metadata.gz: 1ac11e5a23f2d2df24d84b7660709d67dfbf8933
4
+ data.tar.gz: e59ceb0ea7323fec46b0c10f3f1d5ba10e1373b0
5
5
  SHA512:
6
- metadata.gz: df62b282f58b7a1bfbc4eafe8fe7e9c376f7905f4a938cbb70751751c9b5bf6da66810e085a8ed7041ed5dfcdf307f808b4ff22115a2de5ba43c13deb2e8b2a8
7
- data.tar.gz: 257049570514a2c3bf85a1990dcca4d772b247a8fca4685db4cad01e4df59683a1212907ef54267f9ede493a8dbebb90ab2d26a5b335f2e8bfec7030cb4ef088
6
+ metadata.gz: 5435894b9ce6f54f1aa3d033efb97753ae04816b5d408275f2685e8624989529d86e6bc08ecc2bb73f050c8b28db078cbc41be965bc55a3f38b8dcd64a332216
7
+ data.tar.gz: 2401af76812005926e9dcf7700d85ecee107aba06545d4ab4ec9dfde601aebd4225b8e67e873b07a20c8eb4ae360c4ad37d132fd8371f320edb0937498dc7c2c
@@ -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'
@@ -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]
@@ -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)
@@ -0,0 +1,11 @@
1
+ module Myob
2
+ module Api
3
+ module Model
4
+ class CurrentUser < Myob::Api::Model::Base
5
+ def model_route
6
+ 'CurrentUser'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -8,4 +8,4 @@ module Myob
8
8
  end
9
9
  end
10
10
  end
11
- end
11
+ end
@@ -1,7 +1,7 @@
1
1
  module Myob
2
2
  module Api
3
3
  module Model
4
- class Invoice < Myob::Api::Model::Base
4
+ class Invoice < Base
5
5
  def model_route
6
6
  'Sale/Invoice'
7
7
  end
@@ -0,0 +1,11 @@
1
+ module Myob
2
+ module Api
3
+ module Model
4
+ class InvoiceItem < Base
5
+ def model_route
6
+ 'Sale/Invoice/Item'
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  module Myob
2
2
  module Api
3
- VERSION = "0.2.4"
3
+ VERSION = "0.3"
4
4
  end
5
5
  end
@@ -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", "~> 0.8"
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.2.4
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-08-31 00:00:00.000000000 Z
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.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: