coyodlee 0.2.1 → 0.2.2

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
  SHA256:
3
- metadata.gz: ddb78e2e15bb86178da1b217ed03d504bf2b98432a4aa2c02b015912a4fd3c82
4
- data.tar.gz: b4721ec5c63c2f1ec64a1434dc0a6769bc9153861189b5c231daacaae02a5def
3
+ metadata.gz: f4fdc7642da9a5d21ad077a91f6942cbc3f50f174185dabaeaba8b2e796fb174
4
+ data.tar.gz: 84dbc8104d3e036db7aa47b2083c47dc0757da2ac9376a3c409c580e1321498e
5
5
  SHA512:
6
- metadata.gz: db46b6b36f3ddcb5a07b10621a010707541b09fdcffad122fd1b7fc1511468132cbb1fde9b49f7b5db81fedef574e262068d9431fb052776303a9c5a60ee902c
7
- data.tar.gz: 9658771e29873f52025b3918b4fa4c542d75b15edc8b901f705b267907fd7e0cd4eb81463945f6451850fccf1a4d9368cee970b2b26ea9d14c044e3ed85d20d8
6
+ metadata.gz: f3d80dcda2c275403e1c351b2750d7f4950b1d65c9cf84fd70b3907db4f85c9348440c9173e9a1a3f74c2ad28cf599dd75fca924c3b141a17d3aca872f64fb39
7
+ data.tar.gz: 217a9afd7b0fdd9d579f4798efae931276e3729d995716970ce1f3bfb2944a7b88f859c6c6d28fb78ee5887ae8b742dfd99320ac4d58339bf3ec2d88807be631
@@ -0,0 +1,47 @@
1
+ # Ruby CircleCI 2.0 configuration file
2
+ #
3
+ # Check https://circleci.com/docs/2.0/language-ruby/ for more details
4
+ #
5
+ version: 2
6
+ dependencies:
7
+ pre:
8
+ - openssl aes-256-cbc -d -in .env.enc -k $KEY >> ~/.circlerc
9
+ jobs:
10
+ build:
11
+ docker:
12
+ - image: circleci/ruby:2.4.1-node-browsers
13
+ working_directory: ~/repo
14
+
15
+ steps:
16
+ - checkout
17
+
18
+ # Download and cache dependencies
19
+ - restore_cache:
20
+ keys:
21
+ - v1-dependencies-{{ checksum "Gemfile.lock" }}
22
+ # fallback to using the latest cache if no exact match is found
23
+ - v1-dependencies-
24
+
25
+ - run:
26
+ name: install dependencies
27
+ command: |
28
+ bundle install --jobs=4 --retry=3 --path vendor/bundle
29
+
30
+ - save_cache:
31
+ paths:
32
+ - ./vendor/bundle
33
+ key: v1-dependencies-{{ checksum "Gemfile.lock" }}
34
+
35
+ # run tests!
36
+ - run:
37
+ name: run tests
38
+ command: |
39
+ mkdir /tmp/test-results
40
+ bundle exec rake test
41
+
42
+ # collect reports
43
+ - store_test_results:
44
+ path: /tmp/test-results
45
+ - store_artifacts:
46
+ path: /tmp/test-results
47
+ destination: test-results
data/.env.enc ADDED
Binary file
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Coyodlee
2
2
  [![Gem Version](https://badge.fury.io/rb/coyodlee.svg)](https://badge.fury.io/rb/coyodlee)
3
3
  [![Build Status](https://travis-ci.org/pennymac/coyodlee.svg?branch=master)](https://travis-ci.org/pennymac/coyodlee)
4
+ [![CircleCI](https://circleci.com/gh/pennymac/coyodlee/tree/master.svg?style=svg)](https://circleci.com/gh/pennymac/coyodlee/tree/master)
4
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/f36b069069540b196fbd/maintainability)](https://codeclimate.com/github/pennymac/coyodlee/maintainability)
5
6
  [![Test Coverage](https://api.codeclimate.com/v1/badges/f36b069069540b196fbd/test_coverage)](https://codeclimate.com/github/pennymac/coyodlee/test_coverage)
6
7
 
@@ -14,7 +15,7 @@ This library works with Ruby 2.3+.
14
15
 
15
16
  ## Setup
16
17
 
17
- In sandbox mode, point the ```base_url``` to ```https://developer.api.yodlee.com/ysl/restserver/v1```.
18
+ In sandbox mode, set ```Coyodlee.host``` to ```developer.api.yodlee.com```.
18
19
 
19
20
  Export the following environment variables:
20
21
 
@@ -82,6 +82,7 @@ module Coyodlee
82
82
 
83
83
  def_delegator :@user_facade, :login, :login_user
84
84
  def_delegator :@user_facade, :logout, :logout_user
85
+ def_delegator :@user_facade, :access_tokens, :user_access_tokens
85
86
  def_delegator :@user_facade, :register, :register_user
86
87
  def_delegator :@user_facade, :unregister, :unregister_user
87
88
 
@@ -109,7 +110,7 @@ module Coyodlee
109
110
  def_delegator :@transactions_facade, :run_categorization_rule, :run_transaction_categorization_rule
110
111
  def_delegator :@transactions_facade, :run_all_categorization_rule, :run_all_transaction_categorization_rule
111
112
  def_delegator :@transactions_facade, :update, :update_transaction
112
- def_delegator :@transactions_facade, :category_list, :transaction_category_list
113
+ def_delegator :@transactions_facade, :list_categories, :transaction_categories
113
114
  def_delegator :@transactions_facade, :create_category, :create_transaction_category
114
115
  def_delegator :@transactions_facade, :update_category, :update_transaction_category
115
116
  def_delegator :@transactions_facade, :delete_category, :delete_transaction_category
@@ -13,7 +13,7 @@ module Coyodlee
13
13
 
14
14
  def details(account_id:, container:)
15
15
  headers = { 'Accept' => 'application/json' }
16
- params = { container: container }
16
+ params = { 'container' => container }
17
17
  req = @request_facade.build(:get, "accounts/#{account_id}", params: params, headers: headers)
18
18
  @request_facade.execute(req)
19
19
  end
@@ -60,15 +60,16 @@ module Coyodlee
60
60
  @request_facade.execute(req)
61
61
  end
62
62
 
63
- def category_list
63
+ def list_categories
64
64
  headers = { 'Accept' => 'application/json' }
65
65
  req = @request_facade.build(:get, 'transactions/categories', headers: headers)
66
66
  @request_facade.execute(req)
67
67
  end
68
68
 
69
- def create_category(body:)
70
- headers = { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
71
- req = @request_facade.build(:post, 'transactions/categories', headers: headers, body: body.to_json)
69
+ def create_category(category_name:, parent_category_id:)
70
+ headers = { 'Accept' => 'application/json' }
71
+ params = { 'categoryParam' => { 'categoryName' => category_name, 'parentCategoryId' => parent_category_id }.to_json }
72
+ req = @request_facade.build(:post, 'transactions/categories', headers: headers, params: params)
72
73
  @request_facade.execute(req)
73
74
  end
74
75
 
@@ -18,9 +18,23 @@ module Coyodlee
18
18
  @request_facade.execute(req)
19
19
  end
20
20
 
21
- def register(login_name:, password:)
21
+ def access_tokens(app_ids:)
22
22
  headers = { 'Accept' => 'application/json' }
23
- req = @request_facade.build(:post, 'user/logout', headers: headers)
23
+ params = { 'appIds' => app_ids }
24
+ req = @request_facade.build(:get, 'user/accessTokens', params: params, headers: headers)
25
+ @request_facade.execute(req)
26
+ end
27
+
28
+ def register(login_name:, password:, email:, user: {})
29
+ headers = { 'Accept' => 'application/json', 'Content-Type' => 'application/json' }
30
+ body = {
31
+ user: {
32
+ loginName: login_name,
33
+ password: password,
34
+ email: email
35
+ }.merge(user)
36
+ }.to_json
37
+ req = @request_facade.build(:post, 'user/register', headers: headers, body: body)
24
38
  @request_facade.execute(req)
25
39
  end
26
40
 
@@ -29,7 +43,7 @@ module Coyodlee
29
43
  @request_facade.execute(req)
30
44
  end
31
45
 
32
- def logout(login_name:, password:)
46
+ def logout
33
47
  headers = { 'Accept' => 'application/json' }
34
48
  req = @request_facade.build(:post, 'user/logout', headers: headers)
35
49
  @request_facade.execute(req)
@@ -1,3 +1,3 @@
1
1
  module Coyodlee
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/coyodlee.rb CHANGED
@@ -17,6 +17,12 @@ module Coyodlee
17
17
  # The password of your cobrand
18
18
  # @return [String] The password of your cobrand
19
19
  attr_accessor :cobrand_password
20
+ # A comma-separated string of FastLink App IDs
21
+ # @return [String] A comma-separated string of FastLink App IDs
22
+ attr_accessor :fastlink_app_ids
23
+ # The FastLink url
24
+ # @return [String] The FastLink url
25
+ attr_accessor :fastlink_url
20
26
 
21
27
  # The method to configure Yodlee parameters. Use this to set the global parameters such as {Yodlee.base_url}, {Yodlee.cobrand_login}, and {Yodlee.cobrand_password}
22
28
  # @yieldparam config [Yodlee] The Yodlee object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coyodlee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Dyba
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-04 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yajl-ruby
@@ -200,6 +200,8 @@ executables: []
200
200
  extensions: []
201
201
  extra_rdoc_files: []
202
202
  files:
203
+ - ".circleci/config.yml"
204
+ - ".env.enc"
203
205
  - ".gitignore"
204
206
  - ".travis.yml"
205
207
  - CODE_OF_CONDUCT.md