paid 1.0.7 → 1.0.8

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: 2255486d5344ae0f86ee2c59845885bd8d90bea5
4
- data.tar.gz: 89f203c03a83d4689cbbc3c428455956599d2f41
3
+ metadata.gz: fb1d2102bf2e8f1d5a28bac81ff7ae2acf0631d8
4
+ data.tar.gz: b03d7744b0b54687bceba7c24be898b90d4355e8
5
5
  SHA512:
6
- metadata.gz: 94d06f706f48072340ae837a582b98c17fc8de2999969dbade97d6216cf906e953e8df335177a8b41df74034b1e25c3e66aa84db8cb4f4a5672fafd7f2c371a5
7
- data.tar.gz: f3cba11dd2838403549075aa6baf71b3bdf3e47f62d8cbc6e93d93b5584c0006429adf70a3cb56a6d744f8714ba45e1e14c21361ee8c731bec70188b339b1299
6
+ metadata.gz: c004c02b2396baf9a49ed770a00b5201bdd6696d49adbe2140ab1b1aae901b08f84913e3722ed8818675a06b9a0f7dc7d7d119196fe8b57d18983b316caf9ba6
7
+ data.tar.gz: 88febd9916a10666ff184d3542c27569511bbf9990c4007c4671202a541bb5ba9167068ef48f46117986f03d4ed689d6962b995293dfbef67502324dcc3e9fb6
data/History.txt CHANGED
@@ -1,3 +1,11 @@
1
+ === 1.0.7 2015-05-28
2
+
3
+ * 3 minor enhancements:
4
+ * Adding endpoint for updating an Invoice
5
+ * Adding metadata attribute to Invoice
6
+ * Adding metadata attribute to Transaction
7
+
8
+
1
9
  === 1.0.4 2015-04-16
2
10
 
3
11
  * 1 minor enhancements:
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.7
1
+ 1.0.8
data/lib/paid/invoice.rb CHANGED
@@ -8,6 +8,7 @@ module Paid
8
8
  attr_accessor :customer
9
9
  attr_accessor :issued_at
10
10
  attr_accessor :terms
11
+ attr_accessor :metadata
11
12
  attr_accessor :url
12
13
 
13
14
  def self.all(params={}, headers={})
@@ -33,6 +34,12 @@ module Paid
33
34
  self.refresh_from(method.execute, method)
34
35
  end
35
36
 
37
+ def save(params={}, headers={})
38
+ params = ParamsBuilder.merge(params, changed_api_attributes)
39
+ method = APIMethod.new(:put, "/invoices/:id", params, headers, self)
40
+ self.refresh_from(method.execute, method)
41
+ end
42
+
36
43
  def issue(params={}, headers={})
37
44
  method = APIMethod.new(:post, "/invoices/:id/issue", params, headers, self)
38
45
  self.refresh_from(method.execute, method)
@@ -59,6 +66,7 @@ module Paid
59
66
  :customer => nil,
60
67
  :issued_at => nil,
61
68
  :terms => nil,
69
+ :metadata => nil,
62
70
  :url => nil
63
71
  }
64
72
  end
@@ -8,6 +8,7 @@ module Paid
8
8
  attr_accessor :paid
9
9
  attr_accessor :paid_on
10
10
  attr_accessor :properties
11
+ attr_accessor :metadata
11
12
  attr_accessor :invoice
12
13
 
13
14
 
@@ -64,6 +65,7 @@ module Paid
64
65
  :paid => nil,
65
66
  :paid_on => nil,
66
67
  :properties => nil,
68
+ :metadata => nil,
67
69
  :invoice => nil
68
70
  }
69
71
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Calhoun
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-05-22 00:00:00.000000000 Z
12
+ date: 2015-05-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client