increase 1.356.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 (107) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -2
  3. data/lib/increase/internal/transport/base_client.rb +1 -2
  4. data/lib/increase/models/account_statement.rb +12 -8
  5. data/lib/increase/models/card.rb +106 -1
  6. data/lib/increase/models/card_create_params.rb +63 -1
  7. data/lib/increase/models/card_payment.rb +37 -1
  8. data/lib/increase/models/card_renew_params.rb +22 -0
  9. data/lib/increase/models/check_deposit.rb +3 -0
  10. data/lib/increase/models/declined_transaction.rb +3 -0
  11. data/lib/increase/models/digital_card_profile.rb +12 -9
  12. data/lib/increase/models/digital_card_profile_clone_params.rb +12 -9
  13. data/lib/increase/models/digital_card_profile_create_params.rb +12 -9
  14. data/lib/increase/models/entity_create_params.rb +8 -4
  15. data/lib/increase/models/entity_update_params.rb +8 -4
  16. data/lib/increase/models/event.rb +3 -0
  17. data/lib/increase/models/event_list_params.rb +7 -4
  18. data/lib/increase/models/event_subscription.rb +3 -0
  19. data/lib/increase/models/event_subscription_create_params.rb +3 -0
  20. data/lib/increase/models/export.rb +12 -12
  21. data/lib/increase/models/export_create_params.rb +19 -18
  22. data/lib/increase/models/file.rb +1 -1
  23. data/lib/increase/models/file_create_params.rb +1 -1
  24. data/lib/increase/models/file_list_params.rb +1 -1
  25. data/lib/increase/models/inbound_check_deposit.rb +9 -7
  26. data/lib/increase/models/inbound_fednow_transfer.rb +12 -3
  27. data/lib/increase/models/pending_transaction.rb +9 -6
  28. data/lib/increase/models/physical_card.rb +32 -2
  29. data/lib/increase/models/simulations/check_deposit_adjustment_params.rb +3 -0
  30. data/lib/increase/models/simulations/inbound_check_deposit_adjustment_params.rb +3 -0
  31. data/lib/increase/models/transaction.rb +24 -0
  32. data/lib/increase/models/unwrap_webhook_event.rb +3 -0
  33. data/lib/increase/models.rb +2 -0
  34. data/lib/increase/resources/cards.rb +29 -1
  35. data/lib/increase/resources/digital_card_profiles.rb +12 -8
  36. data/lib/increase/resources/events.rb +2 -2
  37. data/lib/increase/resources/files.rb +3 -1
  38. data/lib/increase/resources/intrafi_account_enrollments.rb +2 -2
  39. data/lib/increase/resources/physical_card_profiles.rb +1 -1
  40. data/lib/increase/resources/supplemental_documents.rb +2 -2
  41. data/lib/increase/version.rb +1 -1
  42. data/lib/increase.rb +1 -0
  43. data/rbi/increase/models/account_statement.rbi +12 -8
  44. data/rbi/increase/models/card.rbi +162 -0
  45. data/rbi/increase/models/card_create_params.rbi +120 -0
  46. data/rbi/increase/models/card_payment.rbi +85 -1
  47. data/rbi/increase/models/card_renew_params.rbi +40 -0
  48. data/rbi/increase/models/check_deposit.rbi +7 -0
  49. data/rbi/increase/models/declined_transaction.rbi +7 -0
  50. data/rbi/increase/models/digital_card_profile.rbi +10 -8
  51. data/rbi/increase/models/digital_card_profile_clone_params.rbi +13 -11
  52. data/rbi/increase/models/digital_card_profile_create_params.rbi +13 -8
  53. data/rbi/increase/models/entity_create_params.rbi +8 -4
  54. data/rbi/increase/models/entity_update_params.rbi +8 -4
  55. data/rbi/increase/models/event.rbi +7 -0
  56. data/rbi/increase/models/event_list_params.rbi +11 -4
  57. data/rbi/increase/models/event_subscription.rbi +7 -0
  58. data/rbi/increase/models/event_subscription_create_params.rbi +7 -0
  59. data/rbi/increase/models/export.rbi +12 -12
  60. data/rbi/increase/models/export_create_params.rbi +18 -18
  61. data/rbi/increase/models/file.rbi +1 -1
  62. data/rbi/increase/models/file_create_params.rbi +1 -1
  63. data/rbi/increase/models/file_list_params.rbi +1 -1
  64. data/rbi/increase/models/inbound_check_deposit.rbi +13 -6
  65. data/rbi/increase/models/inbound_fednow_transfer.rbi +10 -2
  66. data/rbi/increase/models/pending_transaction.rbi +13 -6
  67. data/rbi/increase/models/physical_card.rbi +28 -0
  68. data/rbi/increase/models/simulations/check_deposit_adjustment_params.rbi +7 -0
  69. data/rbi/increase/models/simulations/inbound_check_deposit_adjustment_params.rbi +7 -0
  70. data/rbi/increase/models/transaction.rbi +56 -0
  71. data/rbi/increase/models/unwrap_webhook_event.rbi +7 -0
  72. data/rbi/increase/models.rbi +2 -0
  73. data/rbi/increase/resources/cards.rbi +22 -0
  74. data/rbi/increase/resources/digital_card_profiles.rbi +10 -8
  75. data/rbi/increase/resources/events.rbi +2 -2
  76. data/rbi/increase/resources/files.rbi +3 -1
  77. data/rbi/increase/resources/intrafi_account_enrollments.rbi +2 -2
  78. data/rbi/increase/resources/physical_card_profiles.rbi +1 -1
  79. data/rbi/increase/resources/supplemental_documents.rbi +2 -2
  80. data/sig/increase/models/card.rbs +79 -0
  81. data/sig/increase/models/card_create_params.rbs +52 -1
  82. data/sig/increase/models/card_payment.rbs +49 -1
  83. data/sig/increase/models/card_renew_params.rbs +23 -0
  84. data/sig/increase/models/check_deposit.rbs +8 -1
  85. data/sig/increase/models/declined_transaction.rbs +4 -0
  86. data/sig/increase/models/digital_card_profile.rbs +5 -5
  87. data/sig/increase/models/digital_card_profile_clone_params.rbs +7 -7
  88. data/sig/increase/models/digital_card_profile_create_params.rbs +7 -5
  89. data/sig/increase/models/event.rbs +4 -0
  90. data/sig/increase/models/event_list_params.rbs +4 -0
  91. data/sig/increase/models/event_subscription.rbs +4 -0
  92. data/sig/increase/models/event_subscription_create_params.rbs +4 -0
  93. data/sig/increase/models/file.rbs +1 -1
  94. data/sig/increase/models/file_create_params.rbs +1 -1
  95. data/sig/increase/models/file_list_params.rbs +1 -1
  96. data/sig/increase/models/inbound_check_deposit.rbs +12 -9
  97. data/sig/increase/models/inbound_fednow_transfer.rbs +5 -0
  98. data/sig/increase/models/pending_transaction.rbs +4 -0
  99. data/sig/increase/models/physical_card.rbs +15 -0
  100. data/sig/increase/models/simulations/check_deposit_adjustment_params.rbs +4 -0
  101. data/sig/increase/models/simulations/inbound_check_deposit_adjustment_params.rbs +4 -1
  102. data/sig/increase/models/transaction.rbs +32 -0
  103. data/sig/increase/models/unwrap_webhook_event.rbs +4 -0
  104. data/sig/increase/models.rbs +2 -0
  105. data/sig/increase/resources/cards.rbs +6 -0
  106. data/sig/increase/resources/digital_card_profiles.rbs +2 -2
  107. metadata +5 -2
@@ -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
 
@@ -3048,6 +3054,9 @@ module Increase
3048
3054
  # Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
3049
3055
  PULSE_SWITCH_FEE = :pulse_switch_fee
3050
3056
 
3057
+ # Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
3058
+ PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee
3059
+
3051
3060
  # @!method self.values
3052
3061
  # @return [Array<Symbol>]
3053
3062
  end
@@ -4808,6 +4817,9 @@ module Increase
4808
4817
  # Invoice number
4809
4818
  INVOICE_NUMBER = :invoice_number
4810
4819
 
4820
+ # Visa Recurrent reference identifier
4821
+ VISA_RECURRENT_REFERENCE_IDENTIFIER = :visa_recurrent_reference_identifier
4822
+
4811
4823
  # @!method self.values
4812
4824
  # @return [Array<Symbol>]
4813
4825
  end
@@ -5443,6 +5455,9 @@ module Increase
5443
5455
  # Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
5444
5456
  PULSE_SWITCH_FEE = :pulse_switch_fee
5445
5457
 
5458
+ # Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
5459
+ PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee
5460
+
5446
5461
  # @!method self.values
5447
5462
  # @return [Array<Symbol>]
5448
5463
  end
@@ -7082,6 +7097,9 @@ module Increase
7082
7097
  # Invoice number
7083
7098
  INVOICE_NUMBER = :invoice_number
7084
7099
 
7100
+ # Visa Recurrent reference identifier
7101
+ VISA_RECURRENT_REFERENCE_IDENTIFIER = :visa_recurrent_reference_identifier
7102
+
7085
7103
  # @!method self.values
7086
7104
  # @return [Array<Symbol>]
7087
7105
  end
@@ -7719,6 +7737,9 @@ module Increase
7719
7737
  # Pulse Switch Fee is a fee charged by the Pulse network for processing transactions on its network.
7720
7738
  PULSE_SWITCH_FEE = :pulse_switch_fee
7721
7739
 
7740
+ # Pulse Tokenization Fee is a fee charged by the Pulse network for processing tokenized transactions on its network.
7741
+ PULSE_TOKENIZATION_FEE = :pulse_tokenization_fee
7742
+
7722
7743
  # @!method self.values
7723
7744
  # @return [Array<Symbol>]
7724
7745
  end
@@ -8644,6 +8665,9 @@ module Increase
8644
8665
  # The check has already been deposited elsewhere and so this is a duplicate.
8645
8666
  PAID = :paid
8646
8667
 
8668
+ # A previous adjustment for the check was applied twice and the duplicate has been reversed.
8669
+ DUPLICATE_ENTRY = :duplicate_entry
8670
+
8647
8671
  # @!method self.values
8648
8672
  # @return [Array<Symbol>]
8649
8673
  end
@@ -184,6 +184,9 @@ module Increase
184
184
  # Occurs whenever a Digital Wallet Token is updated.
185
185
  DIGITAL_WALLET_TOKEN_UPDATED = :"digital_wallet_token.updated"
186
186
 
187
+ # Occurs whenever a Digital Wallet Token Request is created.
188
+ DIGITAL_WALLET_TOKEN_REQUEST_CREATED = :"digital_wallet_token_request.created"
189
+
187
190
  # Occurs whenever an Entity is created.
188
191
  ENTITY_CREATED = :"entity.created"
189
192
 
@@ -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: {})
@@ -5,7 +5,7 @@ module Increase
5
5
  class DigitalCardProfiles
6
6
  # Create a Digital Card Profile
7
7
  #
8
- # @overload create(app_icon_file_id:, background_image_file_id:, card_description:, description:, issuer_name:, contact_email: nil, contact_phone: nil, contact_website: nil, text_color: nil, request_options: {})
8
+ # @overload create(app_icon_file_id:, background_image_file_id:, card_description:, description:, contact_email: nil, contact_name: nil, contact_phone: nil, contact_website: nil, text_color: nil, request_options: {})
9
9
  #
10
10
  # @param app_icon_file_id [String] The identifier of the File containing the card's icon image.
11
11
  #
@@ -15,10 +15,12 @@ module Increase
15
15
  #
16
16
  # @param description [String] A description you can use to identify the Card Profile.
17
17
  #
18
- # @param issuer_name [String] A user-facing description for whoever is issuing the card.
19
- #
20
18
  # @param contact_email [String] An email address the user can contact to receive support for their card.
21
19
  #
20
+ # @param contact_name [String]
21
+ # The name of your company or card program, shown to the user as who to contact
22
+ # for support with their card.
23
+ #
22
24
  # @param contact_phone [String] A phone number the user can contact to receive support for their card.
23
25
  #
24
26
  # @param contact_website [String] A website the user can visit to view and receive support for their card.
@@ -62,7 +64,7 @@ module Increase
62
64
  )
63
65
  end
64
66
 
65
- # List Card Profiles
67
+ # List Digital Card Profiles
66
68
  #
67
69
  # @overload list(cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
68
70
  #
@@ -120,9 +122,9 @@ module Increase
120
122
  )
121
123
  end
122
124
 
123
- # Clones a Digital Card Profile
125
+ # Clone a Digital Card Profile
124
126
  #
125
- # @overload clone_(digital_card_profile_id, app_icon_file_id: nil, background_image_file_id: nil, card_description: nil, contact_email: nil, contact_phone: nil, contact_website: nil, description: nil, issuer_name: nil, text_color: nil, request_options: {})
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: {})
126
128
  #
127
129
  # @param digital_card_profile_id [String] The identifier of the Digital Card Profile to clone.
128
130
  #
@@ -134,14 +136,16 @@ module Increase
134
136
  #
135
137
  # @param contact_email [String] An email address the user can contact to receive support for their card.
136
138
  #
139
+ # @param contact_name [String]
140
+ # The name of your company or card program, shown to the user as who to contact
141
+ # for support with their card.
142
+ #
137
143
  # @param contact_phone [String] A phone number the user can contact to receive support for their card.
138
144
  #
139
145
  # @param contact_website [String] A website the user can visit to view and receive support for their card.
140
146
  #
141
147
  # @param description [String] A description you can use to identify the Card Profile.
142
148
  #
143
- # @param issuer_name [String] A user-facing description for whoever is issuing the card.
144
- #
145
149
  # @param text_color [Increase::Models::DigitalCardProfileCloneParams::TextColor]
146
150
  # The Card's text color, specified as an RGB triple. The default is white.
147
151
  #
@@ -37,8 +37,8 @@ module Increase
37
37
  # @param cursor [String] Return the page of entries after this one.
38
38
  #
39
39
  # @param limit [Integer]
40
- # Limit the size of the list that is returned. The default (and maximum) is 100
41
- # objects.
40
+ # Limit the size of the list that is returned. The default is 100 objects and the
41
+ # maximum is 1,000.
42
42
  #
43
43
  # Defaults to `100`.
44
44
  #
@@ -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.356.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