church_community_builder 0.0.10 → 0.0.11

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: fee51638a4c9d419d2641ea69cffe5db8868f12b
4
- data.tar.gz: eaffae833d807c2303208351a23f9314a8389391
3
+ metadata.gz: 9c49607b4bba46ccf9d09040ee949aae5d2c5deb
4
+ data.tar.gz: ff411c4b73dc6e811af8f26d40ebbbee4d36abe7
5
5
  SHA512:
6
- metadata.gz: 108b18b35b5c026b0fa3488593c34ab720e9a4d96ac60af7caa4cb8cd0648f63a3e2c0843148b1060502159ed3e7f7298e9a3462edbf6e4b4ad83164e70efeb3
7
- data.tar.gz: 90b8189fbf435b283480d2af3dd4b33f7a6fbd5b568d977345853d94498acfc8d3622077f60d7ea591cc08472b1d743aa5027724c901d97cce174d8c15f80057
6
+ metadata.gz: b4c403520c66d69383cf2f341878c1c444097f76a048f0c968f56ec1879074daca3f90ad982592e011792f9a2e02b8ef0002ea81ea76bec772828ffeb070ea9f
7
+ data.tar.gz: c83a808c3bf61561ab23e245ddffe34fdc4f53a1e65f696e69ebb87dd6616983267e7aa9c8d92fdcec3efaa2fd68eb77d33539b32e3294dc0db7d847687482c0
@@ -3,7 +3,7 @@ require "base64"
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "church_community_builder"
6
- s.version = "0.0.10"
6
+ s.version = "0.0.11"
7
7
  s.authors = ['Taylor Brooks']
8
8
  s.email = ["dGJyb29rc0BnbWFpbC5jb20="].map{ |e| Base64.decode64(e) }
9
9
  s.homepage = "https://github.com/taylorbrooks/church_community_builder"
@@ -9,9 +9,9 @@ Dir[File.expand_path('../response/*.rb', __FILE__)].each{|f| require f}
9
9
 
10
10
  module ChurchCommunityBuilder
11
11
  class Client
12
- include ChurchCommunityBuilder::Client::Campus
13
- include ChurchCommunityBuilder::Client::Contribution
14
- include ChurchCommunityBuilder::Client::Person
12
+ [Campus, Contribution, Fund, Person].each do |resource|
13
+ include resource
14
+ end
15
15
 
16
16
  attr_reader :subdomain, :username, :password
17
17
 
@@ -0,0 +1,12 @@
1
+ module ChurchCommunityBuilder
2
+ class Client
3
+ module Fund
4
+
5
+ def list_funds
6
+ response = get("?srv=transaction_detail_type_list")
7
+ ::Fund.new(response).parse
8
+ end
9
+
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ class Fund
2
+ attr_reader :response, :funds
3
+
4
+ def initialize(response)
5
+ @response = response["ccb_api"]["response"]
6
+ @funds = @response["transaction_detail_types"]["transaction_detail_type"]
7
+ end
8
+
9
+ def parse
10
+ @funds.map do |fund|
11
+ OpenStruct.new(
12
+ id: fund["id"],
13
+ name: fund["name"]
14
+ )
15
+ end
16
+ end
17
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: church_community_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-11 00:00:00.000000000 Z
11
+ date: 2016-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -154,9 +154,11 @@ files:
154
154
  - lib/church_community_builder/client.rb
155
155
  - lib/church_community_builder/resources/campus.rb
156
156
  - lib/church_community_builder/resources/contribution.rb
157
+ - lib/church_community_builder/resources/fund.rb
157
158
  - lib/church_community_builder/resources/person.rb
158
159
  - lib/church_community_builder/response/campus.rb
159
160
  - lib/church_community_builder/response/contribution.rb
161
+ - lib/church_community_builder/response/fund.rb
160
162
  - lib/church_community_builder/response/person.rb
161
163
  - test/person/person_test.rb
162
164
  - test/test_helper.rb