increase 1.8.0 → 1.10.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.
@@ -14,140 +14,95 @@ module Increase
14
14
  )
15
15
  end
16
16
 
17
- # The Account Number to which the recipient should send funds.
17
+ # The Account Number to which the debtor should send funds.
18
18
  sig { returns(String) }
19
19
  attr_accessor :account_number_id
20
20
 
21
- # The amount requested from the recipient, in USD cents.
21
+ # The amount requested from the debtor, in USD cents.
22
22
  sig { returns(Integer) }
23
23
  attr_accessor :amount
24
24
 
25
- # A message the recipient will see as part of the request.
26
- sig { returns(String) }
27
- attr_accessor :message_to_recipient
25
+ # The creditor's address.
26
+ sig do
27
+ returns(Increase::WireDrawdownRequestCreateParams::CreditorAddress)
28
+ end
29
+ attr_reader :creditor_address
28
30
 
29
- # The drawdown request's recipient's account number.
30
- sig { returns(String) }
31
- attr_accessor :recipient_account_number
31
+ sig do
32
+ params(
33
+ creditor_address:
34
+ Increase::WireDrawdownRequestCreateParams::CreditorAddress::OrHash
35
+ ).void
36
+ end
37
+ attr_writer :creditor_address
32
38
 
33
- # The drawdown request's recipient's name.
39
+ # The creditor's name.
34
40
  sig { returns(String) }
35
- attr_accessor :recipient_name
41
+ attr_accessor :creditor_name
36
42
 
37
- # The drawdown request's recipient's routing number.
43
+ # The debtor's account number.
38
44
  sig { returns(String) }
39
- attr_accessor :recipient_routing_number
40
-
41
- # The drawdown request originator's address line 1. This is only necessary if
42
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
43
- # associated entity's details.
44
- sig { returns(T.nilable(String)) }
45
- attr_reader :originator_address_line1
46
-
47
- sig { params(originator_address_line1: String).void }
48
- attr_writer :originator_address_line1
49
-
50
- # The drawdown request originator's address line 2. This is only necessary if
51
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
52
- # associated entity's details.
53
- sig { returns(T.nilable(String)) }
54
- attr_reader :originator_address_line2
55
-
56
- sig { params(originator_address_line2: String).void }
57
- attr_writer :originator_address_line2
58
-
59
- # The drawdown request originator's address line 3. This is only necessary if
60
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
61
- # associated entity's details.
62
- sig { returns(T.nilable(String)) }
63
- attr_reader :originator_address_line3
64
-
65
- sig { params(originator_address_line3: String).void }
66
- attr_writer :originator_address_line3
67
-
68
- # The drawdown request originator's name. This is only necessary if you're
69
- # requesting a payment to a commingled account. Otherwise, we'll use the
70
- # associated entity's details.
71
- sig { returns(T.nilable(String)) }
72
- attr_reader :originator_name
73
-
74
- sig { params(originator_name: String).void }
75
- attr_writer :originator_name
45
+ attr_accessor :debtor_account_number
76
46
 
77
- # Line 1 of the drawdown request's recipient's address.
78
- sig { returns(T.nilable(String)) }
79
- attr_reader :recipient_address_line1
47
+ # The debtor's address.
48
+ sig { returns(Increase::WireDrawdownRequestCreateParams::DebtorAddress) }
49
+ attr_reader :debtor_address
80
50
 
81
- sig { params(recipient_address_line1: String).void }
82
- attr_writer :recipient_address_line1
83
-
84
- # Line 2 of the drawdown request's recipient's address.
85
- sig { returns(T.nilable(String)) }
86
- attr_reader :recipient_address_line2
51
+ sig do
52
+ params(
53
+ debtor_address:
54
+ Increase::WireDrawdownRequestCreateParams::DebtorAddress::OrHash
55
+ ).void
56
+ end
57
+ attr_writer :debtor_address
87
58
 
88
- sig { params(recipient_address_line2: String).void }
89
- attr_writer :recipient_address_line2
59
+ # The debtor's name.
60
+ sig { returns(String) }
61
+ attr_accessor :debtor_name
90
62
 
91
- # Line 3 of the drawdown request's recipient's address.
92
- sig { returns(T.nilable(String)) }
93
- attr_reader :recipient_address_line3
63
+ # The debtor's routing number.
64
+ sig { returns(String) }
65
+ attr_accessor :debtor_routing_number
94
66
 
95
- sig { params(recipient_address_line3: String).void }
96
- attr_writer :recipient_address_line3
67
+ # Remittance information the debtor will see as part of the request.
68
+ sig { returns(String) }
69
+ attr_accessor :unstructured_remittance_information
97
70
 
98
71
  sig do
99
72
  params(
100
73
  account_number_id: String,
101
74
  amount: Integer,
102
- message_to_recipient: String,
103
- recipient_account_number: String,
104
- recipient_name: String,
105
- recipient_routing_number: String,
106
- originator_address_line1: String,
107
- originator_address_line2: String,
108
- originator_address_line3: String,
109
- originator_name: String,
110
- recipient_address_line1: String,
111
- recipient_address_line2: String,
112
- recipient_address_line3: String,
75
+ creditor_address:
76
+ Increase::WireDrawdownRequestCreateParams::CreditorAddress::OrHash,
77
+ creditor_name: String,
78
+ debtor_account_number: String,
79
+ debtor_address:
80
+ Increase::WireDrawdownRequestCreateParams::DebtorAddress::OrHash,
81
+ debtor_name: String,
82
+ debtor_routing_number: String,
83
+ unstructured_remittance_information: String,
113
84
  request_options: Increase::RequestOptions::OrHash
114
85
  ).returns(T.attached_class)
115
86
  end
116
87
  def self.new(
117
- # The Account Number to which the recipient should send funds.
88
+ # The Account Number to which the debtor should send funds.
118
89
  account_number_id:,
119
- # The amount requested from the recipient, in USD cents.
90
+ # The amount requested from the debtor, in USD cents.
120
91
  amount:,
121
- # A message the recipient will see as part of the request.
122
- message_to_recipient:,
123
- # The drawdown request's recipient's account number.
124
- recipient_account_number:,
125
- # The drawdown request's recipient's name.
126
- recipient_name:,
127
- # The drawdown request's recipient's routing number.
128
- recipient_routing_number:,
129
- # The drawdown request originator's address line 1. This is only necessary if
130
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
131
- # associated entity's details.
132
- originator_address_line1: nil,
133
- # The drawdown request originator's address line 2. This is only necessary if
134
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
135
- # associated entity's details.
136
- originator_address_line2: nil,
137
- # The drawdown request originator's address line 3. This is only necessary if
138
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
139
- # associated entity's details.
140
- originator_address_line3: nil,
141
- # The drawdown request originator's name. This is only necessary if you're
142
- # requesting a payment to a commingled account. Otherwise, we'll use the
143
- # associated entity's details.
144
- originator_name: nil,
145
- # Line 1 of the drawdown request's recipient's address.
146
- recipient_address_line1: nil,
147
- # Line 2 of the drawdown request's recipient's address.
148
- recipient_address_line2: nil,
149
- # Line 3 of the drawdown request's recipient's address.
150
- recipient_address_line3: nil,
92
+ # The creditor's address.
93
+ creditor_address:,
94
+ # The creditor's name.
95
+ creditor_name:,
96
+ # The debtor's account number.
97
+ debtor_account_number:,
98
+ # The debtor's address.
99
+ debtor_address:,
100
+ # The debtor's name.
101
+ debtor_name:,
102
+ # The debtor's routing number.
103
+ debtor_routing_number:,
104
+ # Remittance information the debtor will see as part of the request.
105
+ unstructured_remittance_information:,
151
106
  request_options: {}
152
107
  )
153
108
  end
@@ -157,23 +112,199 @@ module Increase
157
112
  {
158
113
  account_number_id: String,
159
114
  amount: Integer,
160
- message_to_recipient: String,
161
- recipient_account_number: String,
162
- recipient_name: String,
163
- recipient_routing_number: String,
164
- originator_address_line1: String,
165
- originator_address_line2: String,
166
- originator_address_line3: String,
167
- originator_name: String,
168
- recipient_address_line1: String,
169
- recipient_address_line2: String,
170
- recipient_address_line3: String,
115
+ creditor_address:
116
+ Increase::WireDrawdownRequestCreateParams::CreditorAddress,
117
+ creditor_name: String,
118
+ debtor_account_number: String,
119
+ debtor_address:
120
+ Increase::WireDrawdownRequestCreateParams::DebtorAddress,
121
+ debtor_name: String,
122
+ debtor_routing_number: String,
123
+ unstructured_remittance_information: String,
171
124
  request_options: Increase::RequestOptions
172
125
  }
173
126
  )
174
127
  end
175
128
  def to_hash
176
129
  end
130
+
131
+ class CreditorAddress < Increase::Internal::Type::BaseModel
132
+ OrHash =
133
+ T.type_alias do
134
+ T.any(
135
+ Increase::WireDrawdownRequestCreateParams::CreditorAddress,
136
+ Increase::Internal::AnyHash
137
+ )
138
+ end
139
+
140
+ # The city, district, town, or village of the address.
141
+ sig { returns(String) }
142
+ attr_accessor :city
143
+
144
+ # The two-letter
145
+ # [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for
146
+ # the country of the address.
147
+ sig { returns(String) }
148
+ attr_accessor :country
149
+
150
+ # The first line of the address. This is usually the street number and street.
151
+ sig { returns(String) }
152
+ attr_accessor :line1
153
+
154
+ # The second line of the address. This might be the floor or room number.
155
+ sig { returns(T.nilable(String)) }
156
+ attr_reader :line2
157
+
158
+ sig { params(line2: String).void }
159
+ attr_writer :line2
160
+
161
+ # The ZIP code of the address.
162
+ sig { returns(T.nilable(String)) }
163
+ attr_reader :postal_code
164
+
165
+ sig { params(postal_code: String).void }
166
+ attr_writer :postal_code
167
+
168
+ # The address state.
169
+ sig { returns(T.nilable(String)) }
170
+ attr_reader :state
171
+
172
+ sig { params(state: String).void }
173
+ attr_writer :state
174
+
175
+ # The creditor's address.
176
+ sig do
177
+ params(
178
+ city: String,
179
+ country: String,
180
+ line1: String,
181
+ line2: String,
182
+ postal_code: String,
183
+ state: String
184
+ ).returns(T.attached_class)
185
+ end
186
+ def self.new(
187
+ # The city, district, town, or village of the address.
188
+ city:,
189
+ # The two-letter
190
+ # [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for
191
+ # the country of the address.
192
+ country:,
193
+ # The first line of the address. This is usually the street number and street.
194
+ line1:,
195
+ # The second line of the address. This might be the floor or room number.
196
+ line2: nil,
197
+ # The ZIP code of the address.
198
+ postal_code: nil,
199
+ # The address state.
200
+ state: nil
201
+ )
202
+ end
203
+
204
+ sig do
205
+ override.returns(
206
+ {
207
+ city: String,
208
+ country: String,
209
+ line1: String,
210
+ line2: String,
211
+ postal_code: String,
212
+ state: String
213
+ }
214
+ )
215
+ end
216
+ def to_hash
217
+ end
218
+ end
219
+
220
+ class DebtorAddress < Increase::Internal::Type::BaseModel
221
+ OrHash =
222
+ T.type_alias do
223
+ T.any(
224
+ Increase::WireDrawdownRequestCreateParams::DebtorAddress,
225
+ Increase::Internal::AnyHash
226
+ )
227
+ end
228
+
229
+ # The city, district, town, or village of the address.
230
+ sig { returns(String) }
231
+ attr_accessor :city
232
+
233
+ # The two-letter
234
+ # [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for
235
+ # the country of the address.
236
+ sig { returns(String) }
237
+ attr_accessor :country
238
+
239
+ # The first line of the address. This is usually the street number and street.
240
+ sig { returns(String) }
241
+ attr_accessor :line1
242
+
243
+ # The second line of the address. This might be the floor or room number.
244
+ sig { returns(T.nilable(String)) }
245
+ attr_reader :line2
246
+
247
+ sig { params(line2: String).void }
248
+ attr_writer :line2
249
+
250
+ # The ZIP code of the address.
251
+ sig { returns(T.nilable(String)) }
252
+ attr_reader :postal_code
253
+
254
+ sig { params(postal_code: String).void }
255
+ attr_writer :postal_code
256
+
257
+ # The address state.
258
+ sig { returns(T.nilable(String)) }
259
+ attr_reader :state
260
+
261
+ sig { params(state: String).void }
262
+ attr_writer :state
263
+
264
+ # The debtor's address.
265
+ sig do
266
+ params(
267
+ city: String,
268
+ country: String,
269
+ line1: String,
270
+ line2: String,
271
+ postal_code: String,
272
+ state: String
273
+ ).returns(T.attached_class)
274
+ end
275
+ def self.new(
276
+ # The city, district, town, or village of the address.
277
+ city:,
278
+ # The two-letter
279
+ # [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for
280
+ # the country of the address.
281
+ country:,
282
+ # The first line of the address. This is usually the street number and street.
283
+ line1:,
284
+ # The second line of the address. This might be the floor or room number.
285
+ line2: nil,
286
+ # The ZIP code of the address.
287
+ postal_code: nil,
288
+ # The address state.
289
+ state: nil
290
+ )
291
+ end
292
+
293
+ sig do
294
+ override.returns(
295
+ {
296
+ city: String,
297
+ country: String,
298
+ line1: String,
299
+ line2: String,
300
+ postal_code: String,
301
+ state: String
302
+ }
303
+ )
304
+ end
305
+ def to_hash
306
+ end
307
+ end
177
308
  end
178
309
  end
179
310
  end
@@ -8,55 +8,37 @@ module Increase
8
8
  params(
9
9
  account_number_id: String,
10
10
  amount: Integer,
11
- message_to_recipient: String,
12
- recipient_account_number: String,
13
- recipient_name: String,
14
- recipient_routing_number: String,
15
- originator_address_line1: String,
16
- originator_address_line2: String,
17
- originator_address_line3: String,
18
- originator_name: String,
19
- recipient_address_line1: String,
20
- recipient_address_line2: String,
21
- recipient_address_line3: String,
11
+ creditor_address:
12
+ Increase::WireDrawdownRequestCreateParams::CreditorAddress::OrHash,
13
+ creditor_name: String,
14
+ debtor_account_number: String,
15
+ debtor_address:
16
+ Increase::WireDrawdownRequestCreateParams::DebtorAddress::OrHash,
17
+ debtor_name: String,
18
+ debtor_routing_number: String,
19
+ unstructured_remittance_information: String,
22
20
  request_options: Increase::RequestOptions::OrHash
23
21
  ).returns(Increase::WireDrawdownRequest)
24
22
  end
25
23
  def create(
26
- # The Account Number to which the recipient should send funds.
24
+ # The Account Number to which the debtor should send funds.
27
25
  account_number_id:,
28
- # The amount requested from the recipient, in USD cents.
26
+ # The amount requested from the debtor, in USD cents.
29
27
  amount:,
30
- # A message the recipient will see as part of the request.
31
- message_to_recipient:,
32
- # The drawdown request's recipient's account number.
33
- recipient_account_number:,
34
- # The drawdown request's recipient's name.
35
- recipient_name:,
36
- # The drawdown request's recipient's routing number.
37
- recipient_routing_number:,
38
- # The drawdown request originator's address line 1. This is only necessary if
39
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
40
- # associated entity's details.
41
- originator_address_line1: nil,
42
- # The drawdown request originator's address line 2. This is only necessary if
43
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
44
- # associated entity's details.
45
- originator_address_line2: nil,
46
- # The drawdown request originator's address line 3. This is only necessary if
47
- # you're requesting a payment to a commingled account. Otherwise, we'll use the
48
- # associated entity's details.
49
- originator_address_line3: nil,
50
- # The drawdown request originator's name. This is only necessary if you're
51
- # requesting a payment to a commingled account. Otherwise, we'll use the
52
- # associated entity's details.
53
- originator_name: nil,
54
- # Line 1 of the drawdown request's recipient's address.
55
- recipient_address_line1: nil,
56
- # Line 2 of the drawdown request's recipient's address.
57
- recipient_address_line2: nil,
58
- # Line 3 of the drawdown request's recipient's address.
59
- recipient_address_line3: nil,
28
+ # The creditor's address.
29
+ creditor_address:,
30
+ # The creditor's name.
31
+ creditor_name:,
32
+ # The debtor's account number.
33
+ debtor_account_number:,
34
+ # The debtor's address.
35
+ debtor_address:,
36
+ # The debtor's name.
37
+ debtor_name:,
38
+ # The debtor's routing number.
39
+ debtor_routing_number:,
40
+ # Remittance information the debtor will see as part of the request.
41
+ unstructured_remittance_information:,
60
42
  request_options: {}
61
43
  )
62
44
  end
@@ -1628,6 +1628,7 @@ module Increase
1628
1628
  | :invalid_physical_card
1629
1629
  | :missing_original_authorization
1630
1630
  | :failed_3ds_authentication
1631
+ | :suspected_card_testing
1631
1632
  | :suspected_fraud
1632
1633
 
1633
1634
  module Reason
@@ -1687,6 +1688,9 @@ module Increase
1687
1688
  # The transaction was declined because the 3DS authentication failed.
1688
1689
  FAILED_3DS_AUTHENTICATION: :failed_3ds_authentication
1689
1690
 
1691
+ # The transaction was suspected to be used by a card tester to test for valid card numbers.
1692
+ SUSPECTED_CARD_TESTING: :suspected_card_testing
1693
+
1690
1694
  # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information.
1691
1695
  SUSPECTED_FRAUD: :suspected_fraud
1692
1696
 
@@ -822,6 +822,7 @@ module Increase
822
822
  | :invalid_physical_card
823
823
  | :missing_original_authorization
824
824
  | :failed_3ds_authentication
825
+ | :suspected_card_testing
825
826
  | :suspected_fraud
826
827
 
827
828
  module Reason
@@ -881,6 +882,9 @@ module Increase
881
882
  # The transaction was declined because the 3DS authentication failed.
882
883
  FAILED_3DS_AUTHENTICATION: :failed_3ds_authentication
883
884
 
885
+ # The transaction was suspected to be used by a card tester to test for valid card numbers.
886
+ SUSPECTED_CARD_TESTING: :suspected_card_testing
887
+
884
888
  # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information.
885
889
  SUSPECTED_FRAUD: :suspected_fraud
886
890
 
@@ -72,6 +72,7 @@ module Increase
72
72
  {
73
73
  address: Increase::PhysicalCard::Shipment::Address,
74
74
  method_: Increase::Models::PhysicalCard::Shipment::method_,
75
+ schedule: Increase::Models::PhysicalCard::Shipment::schedule,
75
76
  status: Increase::Models::PhysicalCard::Shipment::status,
76
77
  tracking: Increase::PhysicalCard::Shipment::Tracking?
77
78
  }
@@ -81,6 +82,8 @@ module Increase
81
82
 
82
83
  attr_accessor method_: Increase::Models::PhysicalCard::Shipment::method_
83
84
 
85
+ attr_accessor schedule: Increase::Models::PhysicalCard::Shipment::schedule
86
+
84
87
  attr_accessor status: Increase::Models::PhysicalCard::Shipment::status
85
88
 
86
89
  attr_accessor tracking: Increase::PhysicalCard::Shipment::Tracking?
@@ -88,6 +91,7 @@ module Increase
88
91
  def initialize: (
89
92
  address: Increase::PhysicalCard::Shipment::Address,
90
93
  method_: Increase::Models::PhysicalCard::Shipment::method_,
94
+ schedule: Increase::Models::PhysicalCard::Shipment::schedule,
91
95
  status: Increase::Models::PhysicalCard::Shipment::status,
92
96
  tracking: Increase::PhysicalCard::Shipment::Tracking?
93
97
  ) -> void
@@ -95,6 +99,7 @@ module Increase
95
99
  def to_hash: -> {
96
100
  address: Increase::PhysicalCard::Shipment::Address,
97
101
  method_: Increase::Models::PhysicalCard::Shipment::method_,
102
+ schedule: Increase::Models::PhysicalCard::Shipment::schedule,
98
103
  status: Increase::Models::PhysicalCard::Shipment::status,
99
104
  tracking: Increase::PhysicalCard::Shipment::Tracking?
100
105
  }
@@ -163,6 +168,20 @@ module Increase
163
168
  def self?.values: -> ::Array[Increase::Models::PhysicalCard::Shipment::method_]
164
169
  end
165
170
 
171
+ type schedule = :next_day | :same_day
172
+
173
+ module Schedule
174
+ extend Increase::Internal::Type::Enum
175
+
176
+ # The physical card will be shipped one business day after the order is received by the card printer. A card that is submitted to Increase on a Monday evening (Pacific Time) will ship out on Wednesday.
177
+ NEXT_DAY: :next_day
178
+
179
+ # The physical card will be shipped on the same business day that the order is received by the card printer. A card that is submitted to Increase on a Monday evening (Pacific Time) will ship out on Tuesday.
180
+ SAME_DAY: :same_day
181
+
182
+ def self?.values: -> ::Array[Increase::Models::PhysicalCard::Shipment::schedule]
183
+ end
184
+
166
185
  type status =
167
186
  :pending
168
187
  | :canceled
@@ -160,6 +160,7 @@ module Increase
160
160
  | :invalid_physical_card
161
161
  | :missing_original_authorization
162
162
  | :failed_3ds_authentication
163
+ | :suspected_card_testing
163
164
  | :suspected_fraud
164
165
 
165
166
  module DeclineReason
@@ -219,6 +220,9 @@ module Increase
219
220
  # The transaction was declined because the 3DS authentication failed.
220
221
  FAILED_3DS_AUTHENTICATION: :failed_3ds_authentication
221
222
 
223
+ # The transaction was suspected to be used by a card tester to test for valid card numbers.
224
+ SUSPECTED_CARD_TESTING: :suspected_card_testing
225
+
222
226
  # The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information.
223
227
  SUSPECTED_FRAUD: :suspected_fraud
224
228