xeroizer 2.15.2 → 2.15.3

Sign up to get free protection for your applications and to get access to all the features.
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(access_key, access_secret, session_handle)
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.2
1
+ 2.15.3
@@ -56,6 +56,10 @@ module Xeroizer
56
56
  string :description
57
57
  string :system_account
58
58
  boolean :enable_payments_to_account
59
+ boolean :show_in_expense_claims
60
+ string :bank_account_number
61
+ string :reporting_code
62
+ string :reporting_code_name
59
63
 
60
64
  end
61
65
 
@@ -19,6 +19,7 @@ module Xeroizer
19
19
 
20
20
  date :updated_date_utc, :api_name => "UpdatedDateUTC"
21
21
  date :fully_paid_on_date
22
+ string :reference
22
23
  string :bank_transaction_id, :api_name => "BankTransactionID"
23
24
  boolean :is_reconciled
24
25
 
@@ -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.2"
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-11-05"
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: 55
4
+ hash: 53
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 15
9
- - 2
10
- version: 2.15.2
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-11-05 00:00:00 Z
18
+ date: 2012-12-07 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  prerelease: false