mondo 0.1.0 → 0.2.0

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: f0ad81c1a965f26c73a422a50269614cfc126a41
4
- data.tar.gz: 2f28b956a9746dac9c368ea4089e04816312ef64
3
+ metadata.gz: e0eadcfb7260e06e44c4838adf6d68466d28f3fe
4
+ data.tar.gz: 5082e8edfd785314ce5fa6d48780a0791804cccc
5
5
  SHA512:
6
- metadata.gz: 672dbe7dae1285eab18e90d6bdef348ced0bc66abc09c43491fc0bfc0d88a5180f76ffc16ba5a727ec54450cbdd1ca5644431a8511ba69a0613376f469161a1c
7
- data.tar.gz: 4ceba43608623a96f5b58e161014a7a7b4452c04731a5890d98ea78c3dabe11cff3c636bff91b94524760ea542fd73ce767d2f57bef5754befe695211673bf3e
6
+ metadata.gz: 02bc42ce75e5091103eb61be994bf3f01e6f81873a269b69b2f75c8b1c673d98f740e6f09db596e7bb36798f1faf4c2340744a98390c3987967b2305a5abf2f2
7
+ data.tar.gz: 6e852e2fb918493528192a72838e6fddc65566bda7b0e19111ff763d65bed9178ca82cc4cac088accfd3593408a92bce6c75dd8c5b27df1374a2f2dc8e827d94
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.2.0 - September 19, 2015
2
+
3
+ - Added support for FeedItems
4
+
5
+
1
6
  ## 0.1.0 - September 12, 2015
2
7
 
3
8
  - Initial release
data/lib/mondo/client.rb CHANGED
@@ -95,6 +95,10 @@ module Mondo
95
95
  resp.parsed["transactions"].map { |tx| Transaction.new(tx, self) }
96
96
  end
97
97
 
98
+ def create_feed_item(params)
99
+ FeedItem.new(params, self).save
100
+ end
101
+
98
102
  def user_agent
99
103
  @user_agent ||=
100
104
  begin
@@ -108,8 +112,6 @@ module Mondo
108
112
  end
109
113
  end
110
114
 
111
- private
112
-
113
115
  # Send a request to the Mondo API servers
114
116
  #
115
117
  # @param [Symbol] method the HTTP method to use (e.g. +:get+, +:post+)
@@ -125,6 +127,9 @@ module Mondo
125
127
  opts[:headers]['Authorization'] = "Bearer #{@access_token}"
126
128
 
127
129
  opts[:body] = MultiJson.encode(opts[:data]) if !opts[:data].nil?
130
+
131
+ puts opts
132
+
128
133
  path = URI.encode(path)
129
134
 
130
135
  resp = connection.run_request(method, path, opts[:body], opts[:headers]) do |req|
@@ -1,7 +1,8 @@
1
1
  module Mondo
2
2
  class Resource
3
3
 
4
- attr_accessor :client
4
+ attr_accessor :client, :raw_data
5
+
5
6
 
6
7
  def initialize(hash={}, client)
7
8
  self.raw_data = hash
@@ -7,8 +7,7 @@ module Mondo
7
7
  :currency,
8
8
  :merchant,
9
9
  :notes,
10
- :metadata,
11
- :raw_data
10
+ :metadata
12
11
 
13
12
  date_accessor :created
14
13
 
data/lib/mondo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mondo
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
data/lib/mondo.rb CHANGED
@@ -7,4 +7,6 @@ module Mondo
7
7
  require './lib/mondo/utils'
8
8
 
9
9
  require './lib/mondo/transaction'
10
+ require './lib/mondo/feed_item'
11
+
10
12
  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.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom Blomfield
@@ -148,3 +148,4 @@ summary: Ruby wrapper for the Mondo API
148
148
  test_files:
149
149
  - spec/client_spec.rb
150
150
  - spec/spec_helper.rb
151
+ has_rdoc: