plaid 9.0.0 → 10.0.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
  SHA256:
3
- metadata.gz: 8b01d399843f5783e0e0cf64e88392b8c883eb29288d8c0535c1b7fbc9c34c32
4
- data.tar.gz: 8c267612077441ef461b8b590f4a40959d680085558d42145b0cc2d179e5a726
3
+ metadata.gz: faecc884c6c66ec104dda0a142bff5968dcfff6bbf205a5cd4ec9d02d69644e4
4
+ data.tar.gz: 63abb65cc3d5c5bf9bb9fd85bb78770fb54214161505e2575e890406363e62d6
5
5
  SHA512:
6
- metadata.gz: e976a0ba72f8a33ac057ce3fe0589324934c8e292a314acc33ad9014999fa8e230beb15b45ee02a8f55a4c3c0b12c668a453091f1f9d091ac16add0575217038
7
- data.tar.gz: 9b91b0105aa3ac0450d6bc38158390ebff5bc70066eb2d61924cd17039c7a9f670a9d1282169b38a2fb3ca860cf4af9ef14082ae992cdfe5b309bcb9a80b01f8
6
+ metadata.gz: 26a5e5ba54760e4c7193fc426e6f4187ef68250364fb16bea231a15ed9cf6a3a92d62743318613700470118699d0bc2ce91871ba3b74d931994c04ed0fccf6a4
7
+ data.tar.gz: e7a469afdd3bad0b6788f8f6de647065ce8bb1187375ba3595e694529959eaab871819a95767fdd5a769b147c21b0f7620ae9bb5de4f8a010c3773923aa55737
@@ -1,3 +1,14 @@
1
+ # 10.0.0
2
+
3
+ - Add support for optional user fields for `/item/add_token/create` endpoint ([278](https://github.com/plaid/plaid-ruby/pull/278))
4
+ - Add support for credit card liabilities ([286](https://github.com/plaid/plaid-ruby/pull/286))
5
+
6
+ BREAKING CHANGES:
7
+
8
+ - `RATE_LIMIT_EXCEEDED` Plaid error types will be correctly mapped to `RateLimitExceededError` ([285](https://github.com/plaid/plaid-ruby/pull/285))
9
+ - `INSTITUTION_ERROR` Plaid error types will be correctly mapped to `InstitutionError` ([275](https://github.com/plaid/plaid-ruby/pull/275))
10
+ - Enable payment recipient to be created with BACS ([288](https://github.com/plaid/plaid-ruby/pull/288))
11
+
1
12
  # 9.0.0
2
13
 
3
14
  - Adds support for `/sandbox/item/set_verification_status`
data/PUBLISH.md CHANGED
@@ -2,13 +2,18 @@
2
2
 
3
3
  The module is published to [RubyGems][1] under the gem name [plaid][2].
4
4
 
5
- To publish:
5
+ Prepare release:
6
6
 
7
- 1. `rake test` (runs the test suite locally).
8
- 2. Update, commit, and merge (with review) the `lib/plaid/version.rb` and `CHANGELOG.md` files.
9
- 5. `git pull` (makes sure your `HEAD` is up-to-date).
10
- 6. `rake release` (builds the gem, creates a tag, pushes the gem to RubyGems and tag to GitHub).
11
- 7. `rake update_github_docs` (generates RDoc files, updates `gh-pages` branch and pushes it to GitHub). (If you run into a `gh-pages` branch error, you may need to manually run `git checkout gh-pages` to ensure the branch is checked out locally.)
7
+ 1. update `lib/plaid/version.rb`, and `CHANGELOG.md` files.
8
+ 2. run `bundle` to bump the version in `Gemfile.lock`
9
+ 3. create and merge a PR with the changes from 1 and 2.
10
+
11
+ Publish:
12
+
13
+ 1. `git checkout master` and `git pull` (makes sure your `HEAD` is up-to-date).
14
+ 2. Check that tests are passing on latest `master` build and (optional) `bundle exec rake test` to run tests locally
15
+ 3. `bundle exec rake release` (builds the gem, creates a tag, pushes the gem to RubyGems and tag to GitHub).
16
+ 4. `bundle exec rake update_github_docs` (generates RDoc files, updates `gh-pages` branch and pushes it to GitHub). (If you run into a `gh-pages` branch error, you may need to manually run `git checkout gh-pages` to ensure the branch is checked out locally.)
12
17
 
13
18
  [1]: https://rubygems.org/
14
19
  [2]: https://rubygems.org/gems/plaid
data/README.md CHANGED
@@ -208,6 +208,8 @@ Any methods making API calls will result in an exception raised unless the respo
208
208
 
209
209
  `Plaid::ItemError` indicates that information provided for the Item (such as credentials or MFA) may be invalid or that the Item is not supported on Plaid's platform.
210
210
 
211
+ `Plaid::InstitutionError` is returned when there are errors for the requested financial institution.
212
+
211
213
  Read more about response codes and their meaning in the
212
214
  [Plaid documentation](https://plaid.com/docs/api).
213
215
 
@@ -58,14 +58,19 @@ TEXT
58
58
  # Plaid's platform.
59
59
  class ItemError < PlaidAPIError; end
60
60
 
61
+ # Public: Returned when there are errors for the requested financial
62
+ # institution.
63
+ class InstitutionError < PlaidAPIError; end
64
+
61
65
  # Internal: A module that provides utilities for errors.
62
66
  module Error
63
67
  ERROR_TYPE_MAP = {
64
68
  'INVALID_REQUEST' => Plaid::InvalidRequestError,
65
69
  'INVALID_INPUT' => Plaid::InvalidInputError,
66
- 'RATE_LIMIT_EXCEEDED_ERROR' => Plaid::RateLimitExceededError,
70
+ 'RATE_LIMIT_EXCEEDED' => Plaid::RateLimitExceededError,
67
71
  'API_ERROR' => Plaid::APIError,
68
- 'ITEM_ERROR' => Plaid::ItemError
72
+ 'ITEM_ERROR' => Plaid::ItemError,
73
+ 'INSTITUTION_ERROR' => Plaid::InstitutionError
69
74
  }.freeze
70
75
 
71
76
  # Internal: Map error_type to PlaidAPIError.
@@ -1812,6 +1812,84 @@ module Plaid
1812
1812
  property :ytd_principal_paid
1813
1813
  end
1814
1814
 
1815
+ # Public: A representation of a credit card liability APR
1816
+ class CreditCardLiabilityAPRs < BaseModel
1817
+ ##
1818
+ # :attr_reader:
1819
+ # Public: Annual Percentage Rate applied.
1820
+ property :apr_percentage
1821
+
1822
+ ##
1823
+ # :attr_reader:
1824
+ # Public: Enumerated response from the following options:
1825
+ # "balance_transfer_apr", "cash_apr", "purchase_apr", or
1826
+ # "special".
1827
+ property :apr_type
1828
+
1829
+ ##
1830
+ # :attr_reader:
1831
+ # Public: Amount of money that is subjected to the APR if a
1832
+ # balance was carried beyond payment due date. How it is
1833
+ # calculated can vary by card issuer. It is often calculated as
1834
+ # an average daily balance.
1835
+ property :balance_subject_to_apr
1836
+
1837
+ ##
1838
+ # :attr_reader:
1839
+ # Public: Amount of money charged due to interest from last
1840
+ # statement.
1841
+ property :interest_charge_amount
1842
+ end
1843
+
1844
+ # Public: A representation of a credit card liability
1845
+ class CreditCardLiability < BaseModel
1846
+ ##
1847
+ # :attr_reader:
1848
+ # Public: The ID of the account that this liability belongs to.
1849
+ property :account_id
1850
+
1851
+ ##
1852
+ # :attr_reader:
1853
+ # Public: See the APR object schema
1854
+ property :aprs, coerce: Array[CreditCardLiabilityAPRs]
1855
+
1856
+ ##
1857
+ # :attr_reader:
1858
+ # Public: true if a payment is currently overdue.
1859
+ property :is_overdue
1860
+
1861
+ ##
1862
+ # :attr_reader:
1863
+ # Public: The amount of the last payment.
1864
+ property :last_payment_amount
1865
+
1866
+ ##
1867
+ # :attr_reader:
1868
+ # Public: The date of the last payment.
1869
+ property :last_payment_date
1870
+
1871
+ ##
1872
+ # :attr_reader:
1873
+ # Public: The outstanding balance on the last statement.
1874
+ property :last_statement_balance
1875
+
1876
+ ##
1877
+ # :attr_reader:
1878
+ # Public: The date of the last statement.
1879
+ property :last_statement_issue_date
1880
+
1881
+ ##
1882
+ # :attr_reader:
1883
+ # Public: The minimum payment due for the next billing cycle.
1884
+ property :minimum_payment_amount
1885
+
1886
+ ##
1887
+ # :attr_reader:
1888
+ # Public: The due date for the next payment. The due date is null
1889
+ # if a payment is not expected.
1890
+ property :next_payment_due_date
1891
+ end
1892
+
1815
1893
  # Public: A representation of someone's liabilities of all types.
1816
1894
  class Liabilities < BaseModel
1817
1895
  include Hashie::Extensions::IgnoreUndeclared
@@ -1820,6 +1898,11 @@ module Plaid
1820
1898
  # :attr_reader:
1821
1899
  # Public: Student loan liabilities associated with the item.
1822
1900
  property :student, coerce: Array[StudentLoanLiability]
1901
+
1902
+ ##
1903
+ # :attr_reader:
1904
+ # Public: Credit card liabilities associated with the item.
1905
+ property :credit, coerce: Array[CreditCardLiability]
1823
1906
  end
1824
1907
 
1825
1908
  # Public: A representation of a payment amount.
@@ -1858,6 +1941,19 @@ module Plaid
1858
1941
  property :country
1859
1942
  end
1860
1943
 
1944
+ # Public: A representation of a payment recipient BACS number.
1945
+ class PaymentRecipientBACS < BaseModel
1946
+ ##
1947
+ # :attr_reader:
1948
+ # Public: The String account number. E.g. "66374958".
1949
+ property :account
1950
+
1951
+ ##
1952
+ # :attr_reader:
1953
+ # Public: The String sort code. E.g. "089999".
1954
+ property :sort_code
1955
+ end
1956
+
1861
1957
  # Public: A representation of a payment recipient.
1862
1958
  class PaymentRecipient < BaseModel
1863
1959
  ##
@@ -1875,6 +1971,11 @@ module Plaid
1875
1971
  # Public: The recipient IBAN.
1876
1972
  property :iban
1877
1973
 
1974
+ ##
1975
+ # :attr_reader:
1976
+ # Public: The recipient BACS number .
1977
+ property :bacs, coerce: PaymentRecipientBACS
1978
+
1878
1979
  ##
1879
1980
  # :attr_reader:
1880
1981
  # Public: The recipient address.
@@ -6,13 +6,15 @@ module Plaid
6
6
  # name - Recipient name.
7
7
  # iban - Recipient IBAN.
8
8
  # address - Recipient address.
9
+ # bacs - Recipient BACS (hash with "account" and "sort_code" keys)
9
10
  #
10
11
  # Returns a PaymentRecipientCreateResponse object.
11
- def create_recipient(name, iban, address)
12
+ def create_recipient(name, iban, address, bacs)
12
13
  post_with_auth 'payment_initiation/recipient/create',
13
14
  PaymentRecipientCreateResponse,
14
15
  name: name,
15
16
  iban: iban,
17
+ bacs: bacs,
16
18
  address: address
17
19
  end
18
20
 
@@ -112,6 +114,11 @@ module Plaid
112
114
  # Public: The recipient IBAN.
113
115
  property :iban
114
116
 
117
+ ##
118
+ # :attr_reader:
119
+ # Public: The recipient IBAN.
120
+ property :bacs, coerce: Models::PaymentRecipientBACS
121
+
115
122
  ##
116
123
  # :attr_reader:
117
124
  # Public: The recipient address.
@@ -1,4 +1,4 @@
1
1
  module Plaid
2
- VERSION = '9.0.0'.freeze
2
+ VERSION = '10.0.0'.freeze
3
3
  API_VERSION = '2019-05-29'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plaid
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 10.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edmund Loo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2020-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday