xeroizer 2.15.2 → 2.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/xeroizer/models/account.rb +4 -0
- data/lib/xeroizer/models/bank_transaction.rb +1 -0
- data/lib/xeroizer/record/base.rb +12 -0
- data/lib/xeroizer/record/base_model.rb +5 -0
- data/xeroizer.gemspec +2 -2
- metadata +4 -4
data/README.md
CHANGED
|
@@ -251,7 +251,7 @@ Renewal of an access token requires knowledge of the previous access token gener
|
|
|
251
251
|
client.renew_access_token
|
|
252
252
|
|
|
253
253
|
# If you are renewing from stored token/session details.
|
|
254
|
-
client.renew_access_token(
|
|
254
|
+
client.renew_access_token(access_token, access_secret, session_handle)
|
|
255
255
|
```
|
|
256
256
|
|
|
257
257
|
This will invalidate the previous token and refresh the `access_key` and `access_secret` as specified in the
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.15.
|
|
1
|
+
2.15.3
|
data/lib/xeroizer/record/base.rb
CHANGED
|
@@ -53,6 +53,18 @@ module Xeroizer
|
|
|
53
53
|
def []=(attribute, value)
|
|
54
54
|
self.send("#{attribute}=".to_sym, value)
|
|
55
55
|
end
|
|
56
|
+
|
|
57
|
+
def attributes=(new_attributes)
|
|
58
|
+
return unless new_attributes.is_a?(Hash)
|
|
59
|
+
new_attributes.each do | key, value |
|
|
60
|
+
self.send("#{key}=".to_sym, value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def update_attributes(attributes)
|
|
65
|
+
self.attributes = attributes
|
|
66
|
+
save
|
|
67
|
+
end
|
|
56
68
|
|
|
57
69
|
def new_record?
|
|
58
70
|
id.nil?
|
|
@@ -88,6 +88,11 @@ module Xeroizer
|
|
|
88
88
|
def build(attributes = {})
|
|
89
89
|
model_class.build(attributes, self)
|
|
90
90
|
end
|
|
91
|
+
|
|
92
|
+
# Create (build and save) a record with attributes set to the value of attributes.
|
|
93
|
+
def create(attributes = {})
|
|
94
|
+
build(attributes).tap { |resource| resource.save }
|
|
95
|
+
end
|
|
91
96
|
|
|
92
97
|
# Retreive full record list for this model.
|
|
93
98
|
def all(options = {})
|
data/xeroizer.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "xeroizer"
|
|
8
|
-
s.version = "2.15.
|
|
8
|
+
s.version = "2.15.3"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Wayne Robinson"]
|
|
12
|
-
s.date = "2012-
|
|
12
|
+
s.date = "2012-12-07"
|
|
13
13
|
s.description = "Ruby library for the Xero accounting system API."
|
|
14
14
|
s.email = "wayne.robinson@gmail.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xeroizer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 53
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 2
|
|
8
8
|
- 15
|
|
9
|
-
-
|
|
10
|
-
version: 2.15.
|
|
9
|
+
- 3
|
|
10
|
+
version: 2.15.3
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Wayne Robinson
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-
|
|
18
|
+
date: 2012-12-07 00:00:00 Z
|
|
19
19
|
dependencies:
|
|
20
20
|
- !ruby/object:Gem::Dependency
|
|
21
21
|
prerelease: false
|