mondo 0.4.0 → 0.4.1

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: 6ed5dcc373f5e53cd3d24148159811756031dffd
4
- data.tar.gz: a57ec85fa9a477b5331008309ee083a983e90d16
3
+ metadata.gz: 1a86e0346276dc433c2c6656ee8e85a960d7d683
4
+ data.tar.gz: 6a84018a4318815baba9c56ae76bb9d880432d50
5
5
  SHA512:
6
- metadata.gz: 3b9ae27325edb38750e6bdc5ecbde9d36c67a2f8740c1d950f2d5af687067345b23384e04a3bc35a728d85ecff1a20752cdd41b0ad2f2c9e1fe618a1bee61ed9
7
- data.tar.gz: 5793f8c3f501157bd7f9041a82bbf0ec9598170d6f6681b394e26a271a66ae7bec15bd58df79bf340e9f21c0ceb0dd10681f59f0cebe98b4bb65a80819f5c44e
6
+ metadata.gz: 7e64c21a8a9f55343a9ae3a6e39b52fbb6abd0c66ea08d4096fe5518b0f280cb684e38a4aceca46ce6761c555ee15108d297982eae68e315f7d1d9e9ef0eeb15
7
+ data.tar.gz: 53734ac3157c20dddda54190377ba0647b6de6c00e16a5bfb4130e73313d8f4db32e72e9891ac302efb0ca1999438328c9d9e758a523773f1f1330f6ce19c182
data/CHANGELOG.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.4.1 - September 19, 2015
2
+
3
+ - Added support to deregister attachments
4
+
5
+ ## 0.4.0 - September 19, 2015
6
+
7
+ - Fix to fetch account_id on initialisation of client (API changed)
8
+ - Added support for attachments on transactions
9
+
1
10
  ## 0.3.2 - September 19, 2015
2
11
 
3
12
  - Catch nil merchants
data/README.md CHANGED
@@ -68,3 +68,20 @@ tx.metadata[:tags] += "#expenses" # tag this "expenses"
68
68
  tx.save_metadata
69
69
  => true
70
70
  ```
71
+
72
+
73
+ ## Add an attachment to a transaction
74
+
75
+ ```ruby
76
+ tx = mondo.transactions.first
77
+
78
+ tx.register_attachment(
79
+ file_url: "https://example.com/nyannyan.jpg",
80
+ file_type: "image/jpg"
81
+ )
82
+
83
+ => [#<Mondo::Attachment {"id"=>"attach_00009253YR2h9Besgp6aLR", "url"=>"https://example.com/nyannyan.jpg", "type"=>"image/jpg", "created"=>"2015-11-13T16:50:05Z"}>]
84
+
85
+ # And remove it again
86
+ tx.attachments.first.deregsiter
87
+ ```
@@ -11,6 +11,10 @@ module Mondo
11
11
  self.client.api_post("attachment/register", registration_data)
12
12
  end
13
13
 
14
+ def deregister
15
+ self.client.api_post("attachment/deregister", id: self.id)
16
+ end
17
+
14
18
  def registration_data
15
19
  {
16
20
  external_id: self.external_id,
data/lib/mondo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mondo
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mondo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Blomfield