plaid 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 20fabd5a473d42ddb2e3ae9cf23177a368b27a3a
4
- data.tar.gz: 19b8c738694ef6da9635b2f422674a8ced3cfe62
2
+ SHA256:
3
+ metadata.gz: f70479c2504298edafa057a0924b2c2132f20d88d0fa0cbe0ae9bcb56487aa06
4
+ data.tar.gz: b0a7b9a3976e543e02ca97c99544cc41745543bbfe77c23d319a1e57053e77d3
5
5
  SHA512:
6
- metadata.gz: fe4fc9ee3f44a9b1318daa4a423aec82347bc09834211b2e85c2d413fdb54a976cfc2e80fd30f461bccc19a96c79edbf7487c2330796d6e7bc3bd08ce5890a5f
7
- data.tar.gz: 6569336d7dcfea2f168ecd081a8c0a3fba27518d1006d5f23065ab68b0f68bbacc4b35e5257fc6f92cd71ba056a547295b6837c0644d0ac6df01d0d4207d6b2c
6
+ metadata.gz: ceab5477a6a2a2113c9025027a7f80c709d4db419c09e9f43f9a20500c29c7dd3abe28f8cf3ac849ee94a3e3006100846611344e63a34b9fa88f84629f453fa4
7
+ data.tar.gz: 8a6bb6cf0a09ee13dec7f8025599f112f891de8dfe899aa231d2467f961f9e4b2519564d791d52c886e2ee34c1eb8a27f7c2a45a0a6aa9fb0d7f8d89374df9f9
@@ -1,3 +1,16 @@
1
+ # 8.4.0 23-Jan-2020
2
+
3
+ * Add support for new UK Payment Initiation product ([#246](https://github.com/plaid/plaid-ruby/pull/246))
4
+ * `/payment_initiation/recipient/create`
5
+ * `/payment_initiation/recipient/get`
6
+ * `/payment_initiation/recipient/list`
7
+ * `/payment_initiation/payment/create`
8
+ * `/payment_initiation/payment/token/create`
9
+ * `/payment_initiation/payment/get`
10
+ * `/payment_initiation/payment/list`
11
+ * Add `consent_expiration_time` to the Item interface ([#247](https://github.com/plaid/plaid-ruby/pull/247))
12
+
13
+
1
14
  # 8.3.0 17-Sep-2019
2
15
 
3
16
  * Add support for new [Ocrolus Partnership](https://plaid.com/docs/ocrolus/)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- plaid (6.2.1)
4
+ plaid (8.4.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
  hashie (>= 3.4.3)
@@ -11,15 +11,15 @@ GEM
11
11
  specs:
12
12
  ast (2.4.0)
13
13
  dotenv (2.4.0)
14
- faraday (0.15.2)
14
+ faraday (0.17.3)
15
15
  multipart-post (>= 1.2, < 3)
16
- faraday_middleware (0.12.2)
16
+ faraday_middleware (0.14.0)
17
17
  faraday (>= 0.7.4, < 1.0)
18
- hashie (3.5.7)
18
+ hashie (4.0.0)
19
19
  minitest (5.11.3)
20
20
  minitest-around (0.4.1)
21
21
  minitest (~> 5.0)
22
- multipart-post (2.0.0)
22
+ multipart-post (2.1.1)
23
23
  parallel (1.12.1)
24
24
  parser (2.5.1.0)
25
25
  ast (~> 2.4.0)
@@ -20,6 +20,7 @@ require_relative 'plaid/products/sandbox'
20
20
  require_relative 'plaid/products/transactions'
21
21
  require_relative 'plaid/products/investments'
22
22
  require_relative 'plaid/products/liabilities'
23
+ require_relative 'plaid/products/payment_initiation'
23
24
  require_relative 'plaid/client'
24
25
 
25
26
  # Public: The namespace for all the things Plaid.
@@ -102,6 +102,11 @@ module Plaid
102
102
  # Public: The Plaid::Investments product accessor.
103
103
  subproduct :investments
104
104
 
105
+ ##
106
+ # :attr_reader:
107
+ # Public: The Plaid::PaymentInitiation product accessor.
108
+ subproduct :payment_initiation
109
+
105
110
  # Public: Make a post request
106
111
  #
107
112
  # path - Path or URL to make the request to
@@ -127,6 +127,12 @@ module Plaid
127
127
  # :attr_reader:
128
128
  # Public: The String webhook URL.
129
129
  property :webhook
130
+
131
+ ##
132
+ # :attr_reader:
133
+ # Public: The String consent expiration timestamp (or nil)
134
+ # (e.g. "2019-04-22T00:00:00Z").
135
+ property :consent_expiration_time
130
136
  end
131
137
 
132
138
  # Public: A representation of Item webhook status
@@ -159,6 +165,21 @@ module Plaid
159
165
  property :last_successful_update
160
166
  end
161
167
 
168
+ # Public: A representation of Item investments update status
169
+ class ItemStatusInvestments < BaseModel
170
+ ##
171
+ # :attr_reader:
172
+ # Public: the String last failed update date (or nil).
173
+ # (e.g. "2019-04-22T00:00:00Z").
174
+ property :last_failed_update
175
+
176
+ ##
177
+ # :attr_reader:
178
+ # Public: the String last successful update date (or nil).
179
+ # (e.g. "2019-04-22T00:00:00Z").
180
+ property :last_successful_update
181
+ end
182
+
162
183
  # Public: A representation of Item status
163
184
  class ItemStatus < BaseModel
164
185
  ##
@@ -170,6 +191,11 @@ module Plaid
170
191
  # :attr_reader:
171
192
  # Public: The ItemStatusTransactions for this ItemStatus.
172
193
  property :transactions, coerce: ItemStatusTransactions
194
+
195
+ ##
196
+ # :attr_reader:
197
+ # Public: The ItemStatusInvestments for this ItemStatus.
198
+ property :investments, coerce: ItemStatusInvestments
173
199
  end
174
200
 
175
201
  # Public: A representation of account balances.
@@ -986,6 +1012,18 @@ module Plaid
986
1012
  # :attr_reader:
987
1013
  # Public: The String unofficial currency code for the amount
988
1014
  property :unofficial_currency_code
1015
+
1016
+ ##
1017
+ # :attr_reader:
1018
+ # Public: The String channel used to make a payment, e.g.
1019
+ # "online", "in store", or "other".
1020
+ property :payment_channel
1021
+
1022
+ ##
1023
+ # :attr_reader:
1024
+ # Public: The String date that the transaction was authorized,
1025
+ # e.g. "2017-01-01".
1026
+ property :authorized_date
989
1027
  end
990
1028
 
991
1029
  # Public: A representation of an InvestmentTransaction in an investment
@@ -1768,5 +1806,107 @@ module Plaid
1768
1806
  # Public: Student loan liabilities associated with the item.
1769
1807
  property :student, coerce: Array[StudentLoanLiability]
1770
1808
  end
1809
+
1810
+ # Public: A representation of a payment amount.
1811
+ class PaymentAmount < BaseModel
1812
+ ##
1813
+ # :attr_reader:
1814
+ # Public: Currency for the payment amount.
1815
+ property :currency
1816
+
1817
+ ##
1818
+ # :attr_reader:
1819
+ # Public: Value of the payment amount.
1820
+ property :value
1821
+ end
1822
+
1823
+ # Public: A representation of a payment amount.
1824
+ class PaymentRecipientAddress < BaseModel
1825
+ ##
1826
+ # :attr_reader:
1827
+ # Public: Street name.
1828
+ property :street
1829
+
1830
+ ##
1831
+ # :attr_reader:
1832
+ # Public: City.
1833
+ property :city
1834
+
1835
+ ##
1836
+ # :attr_reader:
1837
+ # Public: Postal code.
1838
+ property :postal_code
1839
+
1840
+ ##
1841
+ # :attr_reader:
1842
+ # Public: Country.
1843
+ property :country
1844
+ end
1845
+
1846
+ # Public: A representation of a payment recipient.
1847
+ class PaymentRecipient < BaseModel
1848
+ ##
1849
+ # :attr_reader:
1850
+ # Public: The recipient ID.
1851
+ property :recipient_id
1852
+
1853
+ ##
1854
+ # :attr_reader:
1855
+ # Public: The recipient name.
1856
+ property :name
1857
+
1858
+ ##
1859
+ # :attr_reader:
1860
+ # Public: The recipient IBAN.
1861
+ property :iban
1862
+
1863
+ ##
1864
+ # :attr_reader:
1865
+ # Public: The recipient address.
1866
+ property :address, coerce: PaymentRecipientAddress
1867
+ end
1868
+
1869
+ # Public: A representation of a payment.
1870
+ class Payment < BaseModel
1871
+ ##
1872
+ # :attr_reader:
1873
+ # Public: The payment ID.
1874
+ property :payment_id
1875
+
1876
+ ##
1877
+ # :attr_reader:
1878
+ # Public: The payment token.
1879
+ property :payment_token
1880
+
1881
+ ##
1882
+ # :attr_reader:
1883
+ # Public: The payment reference.
1884
+ property :reference
1885
+
1886
+ ##
1887
+ # :attr_reader:
1888
+ # Public: The payment amount.
1889
+ property :amount, coerce: PaymentAmount
1890
+
1891
+ ##
1892
+ # :attr_reader:
1893
+ # Public: The payment's status.
1894
+ property :status
1895
+
1896
+ ##
1897
+ # :attr_reader:
1898
+ # Public: The last status update time for payment.
1899
+ property :last_status_update
1900
+
1901
+ ##
1902
+ # :attr_reader:
1903
+ # Public: The payment token's expiration time.
1904
+ property :payment_token_expiration_time
1905
+
1906
+ ##
1907
+ # :attr_reader:
1908
+ # Public: The recipient ID for payment.
1909
+ property :recipient_id
1910
+ end
1771
1911
  end
1772
1912
  end
@@ -0,0 +1,211 @@
1
+ module Plaid
2
+ # Public: Class used to call the Payment product.
3
+ class PaymentInitiation < BaseProduct
4
+ # Public: Create a recipient.
5
+ #
6
+ # name - Recipient name.
7
+ # iban - Recipient IBAN.
8
+ # address - Recipient address.
9
+ #
10
+ # Returns a PaymentRecipientCreateResponse object.
11
+ def create_recipient(name, iban, address)
12
+ post_with_auth 'payment_initiation/recipient/create',
13
+ PaymentRecipientCreateResponse,
14
+ name: name,
15
+ iban: iban,
16
+ address: address
17
+ end
18
+
19
+ # Public: Retrieve a recipient.
20
+ #
21
+ # recipient_id - The recipient ID from the `create_recipient` response.
22
+ #
23
+ # Returns a PaymentRecipientGetResponse object.
24
+ def get_recipient(recipient_id)
25
+ post_with_auth 'payment_initiation/recipient/get',
26
+ PaymentRecipientGetResponse,
27
+ recipient_id: recipient_id
28
+ end
29
+
30
+ # Public: List all recipients.
31
+ #
32
+ # Returns a PaymentRecipientListResponse object.
33
+ def list_recipients
34
+ post_with_auth 'payment_initiation/recipient/list',
35
+ PaymentRecipientListResponse,
36
+ {}
37
+ end
38
+
39
+ # Public: Create a payment.
40
+ #
41
+ # recipient_id - Recipient ID that the payment will be initiated for.
42
+ # reference - Payment reference.
43
+ # amount - Payment amount.
44
+ #
45
+ # Returns a PaymentCreateResponse object.
46
+ def create_payment(recipient_id, reference, amount)
47
+ post_with_auth 'payment_initiation/payment/create',
48
+ PaymentCreateResponse,
49
+ recipient_id: recipient_id,
50
+ reference: reference,
51
+ amount: amount
52
+ end
53
+
54
+ # Public: Create a payment token.
55
+ #
56
+ # payment_id - Payment ID that the token will be created for.
57
+ #
58
+ # Returns a PaymentTokenCreateResponse object.
59
+ def create_payment_token(payment_id)
60
+ post_with_auth 'payment_initiation/payment/token/create',
61
+ PaymentTokenCreateResponse,
62
+ payment_id: payment_id
63
+ end
64
+
65
+ # Public: Retrieve a payment.
66
+ #
67
+ # payment_id - The payment ID from the `create_payment` response.
68
+ #
69
+ # Returns a PaymentGetResponse object.
70
+ def get_payment(payment_id)
71
+ post_with_auth 'payment_initiation/payment/get',
72
+ PaymentGetResponse,
73
+ payment_id: payment_id
74
+ end
75
+
76
+ # Public: List all payments.
77
+ #
78
+ # options - Object to specify optional parameters 'count' and 'cursor'.
79
+ # e.g {count: 10, cursor: '2019-12-06T22:35:49Z'} returns 10
80
+ # payments initiated before 2019-12-06T22:35:49Z.
81
+ #
82
+ # Returns a PaymentListResponse object.
83
+ def list_payments(options)
84
+ post_with_auth 'payment_initiation/payment/list',
85
+ PaymentListResponse,
86
+ options
87
+ end
88
+ end
89
+
90
+ # Public: The response wrapper for /payment_initiation/recipient/create.
91
+ class PaymentRecipientCreateResponse < Models::BaseResponse
92
+ ##
93
+ # :attr_reader:
94
+ # Public: The recipient ID.
95
+ property :recipient_id
96
+ end
97
+
98
+ # Public: The response wrapper for /payment_initiation/recipient/get.
99
+ class PaymentRecipientGetResponse < Models::BaseResponse
100
+ ##
101
+ # :attr_reader:
102
+ # Public: The recipient ID.
103
+ property :recipient_id
104
+
105
+ ##
106
+ # :attr_reader:
107
+ # Public: The recipient name.
108
+ property :name
109
+
110
+ ##
111
+ # :attr_reader:
112
+ # Public: The recipient IBAN.
113
+ property :iban
114
+
115
+ ##
116
+ # :attr_reader:
117
+ # Public: The recipient address.
118
+ property :address, coerce: Models::PaymentRecipientAddress
119
+ end
120
+
121
+ # Public: The response wrapper for /payment_initiation/recipient/list.
122
+ class PaymentRecipientListResponse < Models::BaseResponse
123
+ ##
124
+ # :attr_reader:
125
+ # Public: The list of recipients.
126
+ property :recipients, coerce: Array[Models::PaymentRecipient]
127
+ end
128
+
129
+ # Public: The response wrapper for /payment_initiation/payment/create.
130
+ class PaymentCreateResponse < Models::BaseResponse
131
+ ##
132
+ # :attr_reader:
133
+ # Public: The payment ID.
134
+ property :payment_id
135
+
136
+ ##
137
+ # :attr_reader:
138
+ # Public: The payment status.
139
+ property :status
140
+ end
141
+
142
+ # Public: The response wrapper for /payment_initiation/payment/token/create.
143
+ class PaymentTokenCreateResponse < Models::BaseResponse
144
+ ##
145
+ # :attr_reader:
146
+ # Public: The payment token.
147
+ property :payment_token
148
+
149
+ ##
150
+ # :attr_reader:
151
+ # Public: The payment token's expiration time.
152
+ property :payment_token_expiration_time
153
+ end
154
+
155
+ # Public: The response wrapper for /payment_initiation/payment/get.
156
+ class PaymentGetResponse < Models::BaseResponse
157
+ ##
158
+ # :attr_reader:
159
+ # Public: The payment ID.
160
+ property :payment_id
161
+
162
+ ##
163
+ # :attr_reader:
164
+ # Public: The payment token.
165
+ property :payment_token
166
+
167
+ ##
168
+ # :attr_reader:
169
+ # Public: The payment reference.
170
+ property :reference
171
+
172
+ ##
173
+ # :attr_reader:
174
+ # Public: The payment amount.
175
+ property :amount, coerce: Models::PaymentAmount
176
+
177
+ ##
178
+ # :attr_reader:
179
+ # Public: The payment's status.
180
+ property :status
181
+
182
+ ##
183
+ # :attr_reader:
184
+ # Public: The last status update time for payment.
185
+ property :last_status_update
186
+
187
+ ##
188
+ # :attr_reader:
189
+ # Public: The payment token's expiration time.
190
+ property :payment_token_expiration_time
191
+
192
+ ##
193
+ # :attr_reader:
194
+ # Public: The recipient ID for payment.
195
+ property :recipient_id
196
+ end
197
+
198
+ # Public: The response wrapper for /payment_initiation/payment/list.
199
+ class PaymentListResponse < Models::BaseResponse
200
+ ##
201
+ # :attr_reader:
202
+ # Public: The list of payments.
203
+ property :payments, coerce: Array[Models::Payment]
204
+
205
+ ##
206
+ # :attr_reader:
207
+ # Public: The cursor (its a timestamp) to use in the next
208
+ # /payment_initiation/payment/list call for retrieving more older payments.
209
+ property :next_cursor
210
+ end
211
+ end
@@ -1,4 +1,4 @@
1
1
  module Plaid
2
- VERSION = '8.3.0'.freeze
2
+ VERSION = '8.4.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: 8.3.0
4
+ version: 8.4.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: 2019-09-17 00:00:00.000000000 Z
11
+ date: 2020-01-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -203,6 +203,7 @@ files:
203
203
  - lib/plaid/products/investments.rb
204
204
  - lib/plaid/products/item.rb
205
205
  - lib/plaid/products/liabilities.rb
206
+ - lib/plaid/products/payment_initiation.rb
206
207
  - lib/plaid/products/processor.rb
207
208
  - lib/plaid/products/sandbox.rb
208
209
  - lib/plaid/products/transactions.rb
@@ -229,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
230
  version: '0'
230
231
  requirements: []
231
232
  rubyforge_project:
232
- rubygems_version: 2.5.2.3
233
+ rubygems_version: 2.7.7
233
234
  signing_key:
234
235
  specification_version: 4
235
236
  summary: Ruby bindings for Plaid