increase 1.357.0 → 1.358.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.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/increase/models/account_statement.rb +12 -8
  4. data/lib/increase/models/card.rb +106 -1
  5. data/lib/increase/models/card_create_params.rb +63 -1
  6. data/lib/increase/models/card_renew_params.rb +22 -0
  7. data/lib/increase/models/entity_create_params.rb +8 -4
  8. data/lib/increase/models/entity_update_params.rb +8 -4
  9. data/lib/increase/models/export.rb +12 -12
  10. data/lib/increase/models/export_create_params.rb +19 -18
  11. data/lib/increase/models/inbound_fednow_transfer.rb +12 -3
  12. data/lib/increase/models/physical_card.rb +23 -1
  13. data/lib/increase/models/transaction.rb +6 -0
  14. data/lib/increase/models.rb +2 -0
  15. data/lib/increase/resources/cards.rb +29 -1
  16. data/lib/increase/resources/digital_card_profiles.rb +2 -2
  17. data/lib/increase/resources/files.rb +3 -1
  18. data/lib/increase/resources/intrafi_account_enrollments.rb +2 -2
  19. data/lib/increase/resources/physical_card_profiles.rb +1 -1
  20. data/lib/increase/resources/supplemental_documents.rb +2 -2
  21. data/lib/increase/version.rb +1 -1
  22. data/lib/increase.rb +1 -0
  23. data/rbi/increase/models/account_statement.rbi +12 -8
  24. data/rbi/increase/models/card.rbi +162 -0
  25. data/rbi/increase/models/card_create_params.rbi +120 -0
  26. data/rbi/increase/models/card_renew_params.rbi +40 -0
  27. data/rbi/increase/models/entity_create_params.rbi +8 -4
  28. data/rbi/increase/models/entity_update_params.rbi +8 -4
  29. data/rbi/increase/models/export.rbi +12 -12
  30. data/rbi/increase/models/export_create_params.rbi +18 -18
  31. data/rbi/increase/models/inbound_fednow_transfer.rbi +10 -2
  32. data/rbi/increase/models/physical_card.rbi +20 -0
  33. data/rbi/increase/models/transaction.rbi +14 -0
  34. data/rbi/increase/models.rbi +2 -0
  35. data/rbi/increase/resources/cards.rbi +22 -0
  36. data/rbi/increase/resources/digital_card_profiles.rbi +2 -2
  37. data/rbi/increase/resources/files.rbi +3 -1
  38. data/rbi/increase/resources/intrafi_account_enrollments.rbi +2 -2
  39. data/rbi/increase/resources/physical_card_profiles.rbi +1 -1
  40. data/rbi/increase/resources/supplemental_documents.rbi +2 -2
  41. data/sig/increase/models/card.rbs +79 -0
  42. data/sig/increase/models/card_create_params.rbs +52 -1
  43. data/sig/increase/models/card_renew_params.rbs +23 -0
  44. data/sig/increase/models/inbound_fednow_transfer.rbs +5 -0
  45. data/sig/increase/models/physical_card.rbs +10 -0
  46. data/sig/increase/models/transaction.rbs +8 -0
  47. data/sig/increase/models.rbs +2 -0
  48. data/sig/increase/resources/cards.rbs +6 -0
  49. metadata +5 -2
@@ -35,6 +35,20 @@ module Increase
35
35
  # @return [Time]
36
36
  required :created_at, Time
37
37
 
38
+ # @!attribute expiration_month
39
+ # The month printed on the Physical Card as its expiration, in M format (e.g.,
40
+ # August is 8). This stays the same when the Card is renewed.
41
+ #
42
+ # @return [Integer]
43
+ required :expiration_month, Integer
44
+
45
+ # @!attribute expiration_year
46
+ # The year printed on the Physical Card as its expiration, in YYYY format (e.g.,
47
+ # 2025). This stays the same when the Card is renewed.
48
+ #
49
+ # @return [Integer]
50
+ required :expiration_year, Integer
51
+
38
52
  # @!attribute idempotency_key
39
53
  # The idempotency key you chose for this object. This value is unique across
40
54
  # Increase and is used to ensure that a request is only processed once. Learn more
@@ -68,7 +82,7 @@ module Increase
68
82
  # @return [Symbol, Increase::Models::PhysicalCard::Type]
69
83
  required :type, enum: -> { Increase::PhysicalCard::Type }
70
84
 
71
- # @!method initialize(id:, account_id:, card_id:, cardholder:, created_at:, idempotency_key:, physical_card_profile_id:, shipment:, status:, type:)
85
+ # @!method initialize(id:, account_id:, card_id:, cardholder:, created_at:, expiration_month:, expiration_year:, idempotency_key:, physical_card_profile_id:, shipment:, status:, type:)
72
86
  # Custom physical Visa cards that are shipped to your customers. The artwork is
73
87
  # configurable by a connected [Card Profile](/documentation/api#card-profiles).
74
88
  # The same Card can be used for multiple Physical Cards. Printing cards incurs a
@@ -88,6 +102,14 @@ module Increase
88
102
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
89
103
  # the Physical Card was created.
90
104
  #
105
+ # @param expiration_month [Integer]
106
+ # The month printed on the Physical Card as its expiration, in M format (e.g.,
107
+ # August is 8). This stays the same when the Card is renewed.
108
+ #
109
+ # @param expiration_year [Integer]
110
+ # The year printed on the Physical Card as its expiration, in YYYY format (e.g.,
111
+ # 2025). This stays the same when the Card is renewed.
112
+ #
91
113
  # @param idempotency_key [String, nil]
92
114
  # The idempotency key you chose for this object. This value is unique across
93
115
  # Increase and is used to ensure that a request is only processed once. Learn more
@@ -1666,6 +1666,9 @@ module Increase
1666
1666
  # The user's chargeback was submitted.
1667
1667
  CHARGEBACK_SUBMITTED = :chargeback_submitted
1668
1668
 
1669
+ # The merchant's pre-arbitration submission was accepted by the user or not responded to in time.
1670
+ MERCHANT_PREARBITRATION_ACCEPTED = :merchant_prearbitration_accepted
1671
+
1669
1672
  # The user declined the merchant's pre-arbitration submission.
1670
1673
  MERCHANT_PREARBITRATION_DECLINE_SUBMITTED = :merchant_prearbitration_decline_submitted
1671
1674
 
@@ -1675,6 +1678,9 @@ module Increase
1675
1678
  # The transaction was re-presented by the merchant.
1676
1679
  REPRESENTED = :represented
1677
1680
 
1681
+ # The user's pre-arbitration was accepted by the merchant or not responded to in time.
1682
+ USER_PREARBITRATION_ACCEPTED = :user_prearbitration_accepted
1683
+
1678
1684
  # The user's pre-arbitration was declined by the merchant.
1679
1685
  USER_PREARBITRATION_DECLINE_RECEIVED = :user_prearbitration_decline_received
1680
1686
 
@@ -167,6 +167,8 @@ module Increase
167
167
 
168
168
  CardPushTransferRetrieveParams = Increase::Models::CardPushTransferRetrieveParams
169
169
 
170
+ CardRenewParams = Increase::Models::CardRenewParams
171
+
170
172
  CardRetrieveParams = Increase::Models::CardRetrieveParams
171
173
 
172
174
  CardToken = Increase::Models::CardToken
@@ -5,7 +5,7 @@ module Increase
5
5
  class Cards
6
6
  # Create a Card
7
7
  #
8
- # @overload create(account_id:, authorization_controls: nil, billing_address: nil, cardholder_name: nil, description: nil, digital_wallet: nil, entity_id: nil, request_options: {})
8
+ # @overload create(account_id:, authorization_controls: nil, billing_address: nil, cardholder_name: nil, description: nil, digital_wallet: nil, entity_id: nil, replacement_for: nil, request_options: {})
9
9
  #
10
10
  # @param account_id [String] The Account the card should belong to.
11
11
  #
@@ -31,6 +31,10 @@ module Increase
31
31
  # The Entity the card belongs to. You only need to supply this in rare situations
32
32
  # when the card is not for the Account holder.
33
33
  #
34
+ # @param replacement_for [Increase::Models::CardCreateParams::ReplacementFor]
35
+ # Details about the Card this Card replaces. Supply this when issuing a new Card
36
+ # to take over from an existing one. The replaced Card is not canceled.
37
+ #
34
38
  # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
35
39
  #
36
40
  # @return [Increase::Models::Card]
@@ -216,6 +220,30 @@ module Increase
216
220
  )
217
221
  end
218
222
 
223
+ # Renew a Card in place. The Card keeps its identifier, card number, PIN, and
224
+ # Physical Cards, and receives a new expiration date in the current month four
225
+ # years from now along with a new verification code, which the Card's details will
226
+ # return afterwards. Physical Cards that have already shipped keep working until
227
+ # they are canceled.
228
+ #
229
+ # @overload renew(card_id, request_options: {})
230
+ #
231
+ # @param card_id [String] The identifier of the Card to renew.
232
+ #
233
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
234
+ #
235
+ # @return [Increase::Models::Card]
236
+ #
237
+ # @see Increase::Models::CardRenewParams
238
+ def renew(card_id, params = {})
239
+ @client.request(
240
+ method: :post,
241
+ path: ["cards/%1$s/renew", card_id],
242
+ model: Increase::Card,
243
+ options: params[:request_options]
244
+ )
245
+ end
246
+
219
247
  # Update a Card's PIN
220
248
  #
221
249
  # @overload update_pin(card_id, pin:, request_options: {})
@@ -64,7 +64,7 @@ module Increase
64
64
  )
65
65
  end
66
66
 
67
- # List Card Profiles
67
+ # List Digital Card Profiles
68
68
  #
69
69
  # @overload list(cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
70
70
  #
@@ -122,7 +122,7 @@ module Increase
122
122
  )
123
123
  end
124
124
 
125
- # Clones a Digital Card Profile
125
+ # Clone a Digital Card Profile
126
126
  #
127
127
  # @overload clone_(digital_card_profile_id, app_icon_file_id: nil, background_image_file_id: nil, card_description: nil, contact_email: nil, contact_name: nil, contact_phone: nil, contact_website: nil, description: nil, text_color: nil, request_options: {})
128
128
  #
@@ -38,7 +38,9 @@ module Increase
38
38
  )
39
39
  end
40
40
 
41
- # Retrieve a File
41
+ # Fetch metadata about a File, like its `purpose` and MIME type. To access the
42
+ # content, use the [Get File contents](/documentation/api/files#get-file-contents)
43
+ # API.
42
44
  #
43
45
  # @overload retrieve(file_id, request_options: {})
44
46
  #
@@ -3,7 +3,7 @@
3
3
  module Increase
4
4
  module Resources
5
5
  class IntrafiAccountEnrollments
6
- # Enroll an account in the IntraFi deposit sweep network
6
+ # Enroll an Account in the IntraFi deposit sweep network
7
7
  #
8
8
  # @overload create(account_id:, email_address:, request_options: {})
9
9
  #
@@ -88,7 +88,7 @@ module Increase
88
88
  )
89
89
  end
90
90
 
91
- # Unenroll an account from IntraFi
91
+ # Unenroll an Account from IntraFi
92
92
  #
93
93
  # @overload unenroll(intrafi_account_enrollment_id, request_options: {})
94
94
  #
@@ -43,7 +43,7 @@ module Increase
43
43
  )
44
44
  end
45
45
 
46
- # Retrieve a Card Profile
46
+ # Retrieve a Physical Card Profile
47
47
  #
48
48
  # @overload retrieve(physical_card_profile_id, request_options: {})
49
49
  #
@@ -3,7 +3,7 @@
3
3
  module Increase
4
4
  module Resources
5
5
  class SupplementalDocuments
6
- # Create a supplemental document for an Entity
6
+ # Create a Supplemental Document
7
7
  #
8
8
  # @overload create(entity_id:, file_id:, request_options: {})
9
9
  #
@@ -27,7 +27,7 @@ module Increase
27
27
  )
28
28
  end
29
29
 
30
- # List Entity Supplemental Document Submissions
30
+ # List Supplemental Documents
31
31
  #
32
32
  # @overload list(entity_id:, cursor: nil, idempotency_key: nil, limit: nil, request_options: {})
33
33
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Increase
4
- VERSION = "1.357.0"
4
+ VERSION = "1.358.0"
5
5
  end
data/lib/increase.rb CHANGED
@@ -118,6 +118,7 @@ require_relative "increase/models/card_push_transfer_cancel_params"
118
118
  require_relative "increase/models/card_push_transfer_create_params"
119
119
  require_relative "increase/models/card_push_transfer_list_params"
120
120
  require_relative "increase/models/card_push_transfer_retrieve_params"
121
+ require_relative "increase/models/card_renew_params"
121
122
  require_relative "increase/models/card_retrieve_params"
122
123
  require_relative "increase/models/card_token"
123
124
  require_relative "increase/models/card_token_capabilities"
@@ -44,15 +44,17 @@ module Increase
44
44
 
45
45
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
46
46
  # of the period the Account Statement covers. The statement covers all
47
- # transactions up to, but not including this timestamp. Usually, this is the
48
- # beginning of the following month.
47
+ # transactions up to, but not including this timestamp. Statement periods are
48
+ # measured in UTC days, so this is usually midnight UTC on the first day of the
49
+ # following month.
49
50
  sig { returns(Time) }
50
51
  attr_accessor :statement_period_end
51
52
 
52
53
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
53
54
  # start of the period the Account Statement covers. This is the first moment of
54
- # the statement period and is inclusive. Usually, this is the beginning of the
55
- # month this statement covers.
55
+ # the statement period and is inclusive. Statement periods are measured in UTC
56
+ # days, so this is usually midnight UTC on the first day of the month this
57
+ # statement covers.
56
58
  sig { returns(Time) }
57
59
  attr_accessor :statement_period_start
58
60
 
@@ -96,13 +98,15 @@ module Increase
96
98
  starting_balance:,
97
99
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
98
100
  # of the period the Account Statement covers. The statement covers all
99
- # transactions up to, but not including this timestamp. Usually, this is the
100
- # beginning of the following month.
101
+ # transactions up to, but not including this timestamp. Statement periods are
102
+ # measured in UTC days, so this is usually midnight UTC on the first day of the
103
+ # following month.
101
104
  statement_period_end:,
102
105
  # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
103
106
  # start of the period the Account Statement covers. This is the first moment of
104
- # the statement period and is inclusive. Usually, this is the beginning of the
105
- # month this statement covers.
107
+ # the statement period and is inclusive. Statement periods are measured in UTC
108
+ # days, so this is usually midnight UTC on the first day of the month this
109
+ # statement covers.
106
110
  statement_period_start:,
107
111
  # A constant representing the object's type. For this resource it will always be
108
112
  # `account_statement`.
@@ -95,6 +95,22 @@ module Increase
95
95
  sig { returns(String) }
96
96
  attr_accessor :last4
97
97
 
98
+ # Completed renewals of this Card, sorted by `renewed_at` in ascending order. Each
99
+ # renewal records the expiration date the Card had before it was renewed.
100
+ sig { returns(T::Array[Increase::Card::Renewal]) }
101
+ attr_accessor :renewals
102
+
103
+ # Details about the Card this Card replaces, if it was created as a replacement.
104
+ sig { returns(T.nilable(Increase::Card::ReplacementFor)) }
105
+ attr_reader :replacement_for
106
+
107
+ sig do
108
+ params(
109
+ replacement_for: T.nilable(Increase::Card::ReplacementFor::OrHash)
110
+ ).void
111
+ end
112
+ attr_writer :replacement_for
113
+
98
114
  # This indicates if payments can be made with the card.
99
115
  sig { returns(Increase::Card::Status::TaggedSymbol) }
100
116
  attr_accessor :status
@@ -126,6 +142,8 @@ module Increase
126
142
  expiration_year: Integer,
127
143
  idempotency_key: T.nilable(String),
128
144
  last4: String,
145
+ renewals: T::Array[Increase::Card::Renewal::OrHash],
146
+ replacement_for: T.nilable(Increase::Card::ReplacementFor::OrHash),
129
147
  status: Increase::Card::Status::OrSymbol,
130
148
  type: Increase::Card::Type::OrSymbol
131
149
  ).returns(T.attached_class)
@@ -165,6 +183,11 @@ module Increase
165
183
  idempotency_key:,
166
184
  # The last 4 digits of the Card's Primary Account Number.
167
185
  last4:,
186
+ # Completed renewals of this Card, sorted by `renewed_at` in ascending order. Each
187
+ # renewal records the expiration date the Card had before it was renewed.
188
+ renewals:,
189
+ # Details about the Card this Card replaces, if it was created as a replacement.
190
+ replacement_for:,
168
191
  # This indicates if payments can be made with the card.
169
192
  status:,
170
193
  # A constant representing the object's type. For this resource it will always be
@@ -191,6 +214,8 @@ module Increase
191
214
  expiration_year: Integer,
192
215
  idempotency_key: T.nilable(String),
193
216
  last4: String,
217
+ renewals: T::Array[Increase::Card::Renewal],
218
+ replacement_for: T.nilable(Increase::Card::ReplacementFor),
194
219
  status: Increase::Card::Status::TaggedSymbol,
195
220
  type: Increase::Card::Type::TaggedSymbol
196
221
  }
@@ -1393,6 +1418,143 @@ module Increase
1393
1418
  end
1394
1419
  end
1395
1420
 
1421
+ class Renewal < Increase::Internal::Type::BaseModel
1422
+ OrHash =
1423
+ T.type_alias do
1424
+ T.any(Increase::Card::Renewal, Increase::Internal::AnyHash)
1425
+ end
1426
+
1427
+ # The month the Card expired in before this renewal, in M format (e.g., August is
1428
+ # 8).
1429
+ sig { returns(Integer) }
1430
+ attr_accessor :previous_expiration_month
1431
+
1432
+ # The year the Card expired in before this renewal, in YYYY format (e.g., 2025).
1433
+ sig { returns(Integer) }
1434
+ attr_accessor :previous_expiration_year
1435
+
1436
+ # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
1437
+ # the Card was renewed.
1438
+ sig { returns(Time) }
1439
+ attr_accessor :renewed_at
1440
+
1441
+ sig do
1442
+ params(
1443
+ previous_expiration_month: Integer,
1444
+ previous_expiration_year: Integer,
1445
+ renewed_at: Time
1446
+ ).returns(T.attached_class)
1447
+ end
1448
+ def self.new(
1449
+ # The month the Card expired in before this renewal, in M format (e.g., August is
1450
+ # 8).
1451
+ previous_expiration_month:,
1452
+ # The year the Card expired in before this renewal, in YYYY format (e.g., 2025).
1453
+ previous_expiration_year:,
1454
+ # The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which
1455
+ # the Card was renewed.
1456
+ renewed_at:
1457
+ )
1458
+ end
1459
+
1460
+ sig do
1461
+ override.returns(
1462
+ {
1463
+ previous_expiration_month: Integer,
1464
+ previous_expiration_year: Integer,
1465
+ renewed_at: Time
1466
+ }
1467
+ )
1468
+ end
1469
+ def to_hash
1470
+ end
1471
+ end
1472
+
1473
+ class ReplacementFor < Increase::Internal::Type::BaseModel
1474
+ OrHash =
1475
+ T.type_alias do
1476
+ T.any(Increase::Card::ReplacementFor, Increase::Internal::AnyHash)
1477
+ end
1478
+
1479
+ # The identifier of the replaced Card.
1480
+ sig { returns(String) }
1481
+ attr_accessor :card_id
1482
+
1483
+ # Why the Card was replaced. Only `expiring` notifies merchants that have the
1484
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1485
+ # replaced Card that have not been deactivated to the new Card.
1486
+ sig { returns(Increase::Card::ReplacementFor::Reason::TaggedSymbol) }
1487
+ attr_accessor :reason
1488
+
1489
+ # Details about the Card this Card replaces, if it was created as a replacement.
1490
+ sig do
1491
+ params(
1492
+ card_id: String,
1493
+ reason: Increase::Card::ReplacementFor::Reason::OrSymbol
1494
+ ).returns(T.attached_class)
1495
+ end
1496
+ def self.new(
1497
+ # The identifier of the replaced Card.
1498
+ card_id:,
1499
+ # Why the Card was replaced. Only `expiring` notifies merchants that have the
1500
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1501
+ # replaced Card that have not been deactivated to the new Card.
1502
+ reason:
1503
+ )
1504
+ end
1505
+
1506
+ sig do
1507
+ override.returns(
1508
+ {
1509
+ card_id: String,
1510
+ reason: Increase::Card::ReplacementFor::Reason::TaggedSymbol
1511
+ }
1512
+ )
1513
+ end
1514
+ def to_hash
1515
+ end
1516
+
1517
+ # Why the Card was replaced. Only `expiring` notifies merchants that have the
1518
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1519
+ # replaced Card that have not been deactivated to the new Card.
1520
+ module Reason
1521
+ extend Increase::Internal::Type::Enum
1522
+
1523
+ TaggedSymbol =
1524
+ T.type_alias do
1525
+ T.all(Symbol, Increase::Card::ReplacementFor::Reason)
1526
+ end
1527
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1528
+
1529
+ # The replaced card is expiring. Merchants with the replaced card on file will be notified of the new card, and its digital wallet tokens that have not been deactivated will move to the new card.
1530
+ EXPIRING =
1531
+ T.let(
1532
+ :expiring,
1533
+ Increase::Card::ReplacementFor::Reason::TaggedSymbol
1534
+ )
1535
+
1536
+ # The replaced card was lost. Merchants will not be notified of the new card.
1537
+ LOST =
1538
+ T.let(:lost, Increase::Card::ReplacementFor::Reason::TaggedSymbol)
1539
+
1540
+ # The replaced card was stolen. Merchants will not be notified of the new card.
1541
+ STOLEN =
1542
+ T.let(:stolen, Increase::Card::ReplacementFor::Reason::TaggedSymbol)
1543
+
1544
+ # The replaced card was used fraudulently. Merchants will not be notified of the new card.
1545
+ FRAUD =
1546
+ T.let(:fraud, Increase::Card::ReplacementFor::Reason::TaggedSymbol)
1547
+
1548
+ sig do
1549
+ override.returns(
1550
+ T::Array[Increase::Card::ReplacementFor::Reason::TaggedSymbol]
1551
+ )
1552
+ end
1553
+ def self.values
1554
+ end
1555
+ end
1556
+ end
1557
+
1396
1558
  # This indicates if payments can be made with the card.
1397
1559
  module Status
1398
1560
  extend Increase::Internal::Type::Enum
@@ -82,6 +82,18 @@ module Increase
82
82
  sig { params(entity_id: String).void }
83
83
  attr_writer :entity_id
84
84
 
85
+ # Details about the Card this Card replaces. Supply this when issuing a new Card
86
+ # to take over from an existing one. The replaced Card is not canceled.
87
+ sig { returns(T.nilable(Increase::CardCreateParams::ReplacementFor)) }
88
+ attr_reader :replacement_for
89
+
90
+ sig do
91
+ params(
92
+ replacement_for: Increase::CardCreateParams::ReplacementFor::OrHash
93
+ ).void
94
+ end
95
+ attr_writer :replacement_for
96
+
85
97
  sig do
86
98
  params(
87
99
  account_id: String,
@@ -92,6 +104,7 @@ module Increase
92
104
  description: String,
93
105
  digital_wallet: Increase::CardCreateParams::DigitalWallet::OrHash,
94
106
  entity_id: String,
107
+ replacement_for: Increase::CardCreateParams::ReplacementFor::OrHash,
95
108
  request_options: Increase::RequestOptions::OrHash
96
109
  ).returns(T.attached_class)
97
110
  end
@@ -116,6 +129,9 @@ module Increase
116
129
  # The Entity the card belongs to. You only need to supply this in rare situations
117
130
  # when the card is not for the Account holder.
118
131
  entity_id: nil,
132
+ # Details about the Card this Card replaces. Supply this when issuing a new Card
133
+ # to take over from an existing one. The replaced Card is not canceled.
134
+ replacement_for: nil,
119
135
  request_options: {}
120
136
  )
121
137
  end
@@ -131,6 +147,7 @@ module Increase
131
147
  description: String,
132
148
  digital_wallet: Increase::CardCreateParams::DigitalWallet,
133
149
  entity_id: String,
150
+ replacement_for: Increase::CardCreateParams::ReplacementFor,
134
151
  request_options: Increase::RequestOptions
135
152
  }
136
153
  )
@@ -1387,6 +1404,109 @@ module Increase
1387
1404
  def to_hash
1388
1405
  end
1389
1406
  end
1407
+
1408
+ class ReplacementFor < Increase::Internal::Type::BaseModel
1409
+ OrHash =
1410
+ T.type_alias do
1411
+ T.any(
1412
+ Increase::CardCreateParams::ReplacementFor,
1413
+ Increase::Internal::AnyHash
1414
+ )
1415
+ end
1416
+
1417
+ # The identifier of the Card being replaced.
1418
+ sig { returns(String) }
1419
+ attr_accessor :card_id
1420
+
1421
+ # Why the Card is being replaced. Only `expiring` notifies merchants that have the
1422
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1423
+ # replaced Card that have not been deactivated to the new Card.
1424
+ sig do
1425
+ returns(Increase::CardCreateParams::ReplacementFor::Reason::OrSymbol)
1426
+ end
1427
+ attr_accessor :reason
1428
+
1429
+ # Details about the Card this Card replaces. Supply this when issuing a new Card
1430
+ # to take over from an existing one. The replaced Card is not canceled.
1431
+ sig do
1432
+ params(
1433
+ card_id: String,
1434
+ reason: Increase::CardCreateParams::ReplacementFor::Reason::OrSymbol
1435
+ ).returns(T.attached_class)
1436
+ end
1437
+ def self.new(
1438
+ # The identifier of the Card being replaced.
1439
+ card_id:,
1440
+ # Why the Card is being replaced. Only `expiring` notifies merchants that have the
1441
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1442
+ # replaced Card that have not been deactivated to the new Card.
1443
+ reason:
1444
+ )
1445
+ end
1446
+
1447
+ sig do
1448
+ override.returns(
1449
+ {
1450
+ card_id: String,
1451
+ reason:
1452
+ Increase::CardCreateParams::ReplacementFor::Reason::OrSymbol
1453
+ }
1454
+ )
1455
+ end
1456
+ def to_hash
1457
+ end
1458
+
1459
+ # Why the Card is being replaced. Only `expiring` notifies merchants that have the
1460
+ # replaced Card on file of the new Card and moves Digital Wallet Tokens on the
1461
+ # replaced Card that have not been deactivated to the new Card.
1462
+ module Reason
1463
+ extend Increase::Internal::Type::Enum
1464
+
1465
+ TaggedSymbol =
1466
+ T.type_alias do
1467
+ T.all(Symbol, Increase::CardCreateParams::ReplacementFor::Reason)
1468
+ end
1469
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1470
+
1471
+ # The replaced card is expiring. Merchants with the replaced card on file will be notified of the new card, and its digital wallet tokens that have not been deactivated will move to the new card.
1472
+ EXPIRING =
1473
+ T.let(
1474
+ :expiring,
1475
+ Increase::CardCreateParams::ReplacementFor::Reason::TaggedSymbol
1476
+ )
1477
+
1478
+ # The replaced card was lost. Merchants will not be notified of the new card.
1479
+ LOST =
1480
+ T.let(
1481
+ :lost,
1482
+ Increase::CardCreateParams::ReplacementFor::Reason::TaggedSymbol
1483
+ )
1484
+
1485
+ # The replaced card was stolen. Merchants will not be notified of the new card.
1486
+ STOLEN =
1487
+ T.let(
1488
+ :stolen,
1489
+ Increase::CardCreateParams::ReplacementFor::Reason::TaggedSymbol
1490
+ )
1491
+
1492
+ # The replaced card was used fraudulently. Merchants will not be notified of the new card.
1493
+ FRAUD =
1494
+ T.let(
1495
+ :fraud,
1496
+ Increase::CardCreateParams::ReplacementFor::Reason::TaggedSymbol
1497
+ )
1498
+
1499
+ sig do
1500
+ override.returns(
1501
+ T::Array[
1502
+ Increase::CardCreateParams::ReplacementFor::Reason::TaggedSymbol
1503
+ ]
1504
+ )
1505
+ end
1506
+ def self.values
1507
+ end
1508
+ end
1509
+ end
1390
1510
  end
1391
1511
  end
1392
1512
  end
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Increase
4
+ module Models
5
+ class CardRenewParams < Increase::Internal::Type::BaseModel
6
+ extend Increase::Internal::Type::RequestParameters::Converter
7
+ include Increase::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Increase::CardRenewParams, Increase::Internal::AnyHash)
12
+ end
13
+
14
+ # The identifier of the Card to renew.
15
+ sig { returns(String) }
16
+ attr_accessor :card_id
17
+
18
+ sig do
19
+ params(
20
+ card_id: String,
21
+ request_options: Increase::RequestOptions::OrHash
22
+ ).returns(T.attached_class)
23
+ end
24
+ def self.new(
25
+ # The identifier of the Card to renew.
26
+ card_id:,
27
+ request_options: {}
28
+ )
29
+ end
30
+
31
+ sig do
32
+ override.returns(
33
+ { card_id: String, request_options: Increase::RequestOptions }
34
+ )
35
+ end
36
+ def to_hash
37
+ end
38
+ end
39
+ end
40
+ end