lithic 0.1.0.pre.alpha.15 → 0.1.0.pre.alpha.17

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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +28 -0
  3. data/README.md +61 -52
  4. data/lib/lithic/client.rb +4 -4
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -5
  6. data/lib/lithic/internal/type/array_of.rb +9 -0
  7. data/lib/lithic/internal/type/base_model.rb +29 -13
  8. data/lib/lithic/internal/type/base_page.rb +8 -0
  9. data/lib/lithic/internal/type/boolean.rb +4 -0
  10. data/lib/lithic/internal/type/enum.rb +9 -0
  11. data/lib/lithic/internal/type/hash_of.rb +9 -0
  12. data/lib/lithic/internal/type/io_like.rb +4 -0
  13. data/lib/lithic/internal/type/union.rb +10 -1
  14. data/lib/lithic/internal/type/unknown.rb +4 -0
  15. data/lib/lithic/internal.rb +0 -1
  16. data/lib/lithic/models/account.rb +3 -0
  17. data/lib/lithic/models/account_holder.rb +2 -0
  18. data/lib/lithic/models/account_holder_create_params.rb +2 -0
  19. data/lib/lithic/models/account_holder_update_params.rb +2 -0
  20. data/lib/lithic/models/account_update_params.rb +2 -0
  21. data/lib/lithic/models/card.rb +28 -0
  22. data/lib/lithic/models/kyb.rb +2 -0
  23. data/lib/lithic/models/{card_list_response.rb → non_pci_card.rb} +31 -29
  24. data/lib/lithic/models/settlement_report.rb +12 -0
  25. data/lib/lithic/models/transaction.rb +16 -0
  26. data/lib/lithic/resources/cards.rb +16 -16
  27. data/lib/lithic/version.rb +1 -1
  28. data/lib/lithic.rb +2 -17
  29. data/rbi/lib/lithic/client.rbi +4 -4
  30. data/rbi/lib/lithic/internal/type/array_of.rbi +3 -0
  31. data/rbi/lib/lithic/internal/type/base_model.rbi +6 -1
  32. data/rbi/lib/lithic/internal/type/base_page.rbi +2 -0
  33. data/rbi/lib/lithic/internal/type/enum.rbi +3 -0
  34. data/rbi/lib/lithic/internal/type/hash_of.rbi +3 -0
  35. data/rbi/lib/lithic/internal/type/union.rbi +3 -0
  36. data/rbi/lib/lithic/internal.rbi +0 -1
  37. data/rbi/lib/lithic/models/card.rbi +30 -0
  38. data/rbi/lib/lithic/models/{card_list_response.rbi → non_pci_card.rbi} +59 -60
  39. data/rbi/lib/lithic/resources/cards.rbi +8 -8
  40. data/sig/lithic/internal/type/array_of.rbs +2 -0
  41. data/sig/lithic/internal/type/base_model.rbs +4 -0
  42. data/sig/lithic/internal/type/enum.rbs +2 -0
  43. data/sig/lithic/internal/type/hash_of.rbs +2 -0
  44. data/sig/lithic/internal/type/union.rbs +2 -0
  45. data/sig/lithic/models/card.rbs +19 -0
  46. data/sig/lithic/models/{card_list_response.rbs → non_pci_card.rbs} +31 -31
  47. data/sig/lithic/resources/cards.rbs +8 -8
  48. metadata +8 -26
  49. data/lib/lithic/models/card_convert_physical_response.rb +0 -391
  50. data/lib/lithic/models/card_create_response.rb +0 -390
  51. data/lib/lithic/models/card_reissue_response.rb +0 -390
  52. data/lib/lithic/models/card_renew_response.rb +0 -390
  53. data/lib/lithic/models/card_retrieve_response.rb +0 -390
  54. data/lib/lithic/models/card_search_by_pan_response.rb +0 -390
  55. data/lib/lithic/models/card_update_response.rb +0 -390
  56. data/rbi/lib/lithic/models/card_convert_physical_response.rbi +0 -467
  57. data/rbi/lib/lithic/models/card_create_response.rbi +0 -458
  58. data/rbi/lib/lithic/models/card_reissue_response.rbi +0 -458
  59. data/rbi/lib/lithic/models/card_renew_response.rbi +0 -457
  60. data/rbi/lib/lithic/models/card_retrieve_response.rbi +0 -459
  61. data/rbi/lib/lithic/models/card_search_by_pan_response.rbi +0 -461
  62. data/rbi/lib/lithic/models/card_update_response.rbi +0 -458
  63. data/sig/lithic/models/card_convert_physical_response.rbs +0 -257
  64. data/sig/lithic/models/card_create_response.rbs +0 -257
  65. data/sig/lithic/models/card_reissue_response.rbs +0 -257
  66. data/sig/lithic/models/card_renew_response.rbs +0 -257
  67. data/sig/lithic/models/card_retrieve_response.rbs +0 -257
  68. data/sig/lithic/models/card_search_by_pan_response.rbs +0 -257
  69. data/sig/lithic/models/card_update_response.rbs +0 -257
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Lithic
4
4
  module Models
5
- class CardListResponse < Lithic::Internal::Type::BaseModel
5
+ class NonPCICard < Lithic::Internal::Type::BaseModel
6
6
  # Globally unique identifier.
7
7
  sig { returns(String) }
8
8
  attr_accessor :token
@@ -20,10 +20,10 @@ module Lithic
20
20
  attr_accessor :created
21
21
 
22
22
  # Deprecated: Funding account for the card.
23
- sig { returns(Lithic::Models::CardListResponse::Funding) }
23
+ sig { returns(Lithic::Models::NonPCICard::Funding) }
24
24
  attr_reader :funding
25
25
 
26
- sig { params(funding: T.any(Lithic::Models::CardListResponse::Funding, Lithic::Internal::AnyHash)).void }
26
+ sig { params(funding: T.any(Lithic::Models::NonPCICard::Funding, Lithic::Internal::AnyHash)).void }
27
27
  attr_writer :funding
28
28
 
29
29
  # Last four digits of the card number.
@@ -32,7 +32,7 @@ module Lithic
32
32
 
33
33
  # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
34
34
  # attempts).
35
- sig { returns(Lithic::Models::CardListResponse::PinStatus::TaggedSymbol) }
35
+ sig { returns(Lithic::Models::NonPCICard::PinStatus::TaggedSymbol) }
36
36
  attr_accessor :pin_status
37
37
 
38
38
  # Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
@@ -41,7 +41,7 @@ module Lithic
41
41
  attr_accessor :spend_limit
42
42
 
43
43
  # Spend limit duration
44
- sig { returns(Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol) }
44
+ sig { returns(Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol) }
45
45
  attr_accessor :spend_limit_duration
46
46
 
47
47
  # Card state values: _ `CLOSED` - Card will no longer approve authorizations.
@@ -59,7 +59,7 @@ module Lithic
59
59
  # card's state to `OPEN` only after the cardholder confirms receipt of the card.
60
60
  # In sandbox, the same daily batch fulfillment occurs, but no cards are actually
61
61
  # manufactured.
62
- sig { returns(Lithic::Models::CardListResponse::State::TaggedSymbol) }
62
+ sig { returns(Lithic::Models::NonPCICard::State::TaggedSymbol) }
63
63
  attr_accessor :state
64
64
 
65
65
  # Card types: _ `VIRTUAL` - Card will authorize at any merchant and can be added
@@ -72,7 +72,7 @@ module Lithic
72
72
  # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _
73
73
  # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
74
74
  # VIRTUAL instead.
75
- sig { returns(Lithic::Models::CardListResponse::Type::TaggedSymbol) }
75
+ sig { returns(Lithic::Models::NonPCICard::Type::TaggedSymbol) }
76
76
  attr_accessor :type
77
77
 
78
78
  # List of identifiers for the Auth Rule(s) that are applied on the card. This
@@ -159,13 +159,13 @@ module Lithic
159
159
  account_token: String,
160
160
  card_program_token: String,
161
161
  created: Time,
162
- funding: T.any(Lithic::Models::CardListResponse::Funding, Lithic::Internal::AnyHash),
162
+ funding: T.any(Lithic::Models::NonPCICard::Funding, Lithic::Internal::AnyHash),
163
163
  last_four: String,
164
- pin_status: Lithic::Models::CardListResponse::PinStatus::OrSymbol,
164
+ pin_status: Lithic::Models::NonPCICard::PinStatus::OrSymbol,
165
165
  spend_limit: Integer,
166
- spend_limit_duration: Lithic::Models::CardListResponse::SpendLimitDuration::OrSymbol,
167
- state: Lithic::Models::CardListResponse::State::OrSymbol,
168
- type: Lithic::Models::CardListResponse::Type::OrSymbol,
166
+ spend_limit_duration: Lithic::Models::NonPCICard::SpendLimitDuration::OrSymbol,
167
+ state: Lithic::Models::NonPCICard::State::OrSymbol,
168
+ type: Lithic::Models::NonPCICard::Type::OrSymbol,
169
169
  auth_rule_tokens: T::Array[String],
170
170
  cardholder_currency: String,
171
171
  digital_card_art_token: String,
@@ -210,13 +210,13 @@ module Lithic
210
210
  account_token: String,
211
211
  card_program_token: String,
212
212
  created: Time,
213
- funding: Lithic::Models::CardListResponse::Funding,
213
+ funding: Lithic::Models::NonPCICard::Funding,
214
214
  last_four: String,
215
- pin_status: Lithic::Models::CardListResponse::PinStatus::TaggedSymbol,
215
+ pin_status: Lithic::Models::NonPCICard::PinStatus::TaggedSymbol,
216
216
  spend_limit: Integer,
217
- spend_limit_duration: Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol,
218
- state: Lithic::Models::CardListResponse::State::TaggedSymbol,
219
- type: Lithic::Models::CardListResponse::Type::TaggedSymbol,
217
+ spend_limit_duration: Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol,
218
+ state: Lithic::Models::NonPCICard::State::TaggedSymbol,
219
+ type: Lithic::Models::NonPCICard::Type::TaggedSymbol,
220
220
  auth_rule_tokens: T::Array[String],
221
221
  cardholder_currency: String,
222
222
  digital_card_art_token: String,
@@ -251,12 +251,12 @@ module Lithic
251
251
  # account is available to use for card creation and transactions. _ `PENDING` -
252
252
  # The funding account is still being verified e.g. bank micro-deposits
253
253
  # verification. \* `DELETED` - The founding account has been deleted.
254
- sig { returns(Lithic::Models::CardListResponse::Funding::State::TaggedSymbol) }
254
+ sig { returns(Lithic::Models::NonPCICard::Funding::State::TaggedSymbol) }
255
255
  attr_accessor :state
256
256
 
257
257
  # Types of funding source: _ `DEPOSITORY_CHECKING` - Bank checking account. _
258
258
  # `DEPOSITORY_SAVINGS` - Bank savings account.
259
- sig { returns(Lithic::Models::CardListResponse::Funding::Type::TaggedSymbol) }
259
+ sig { returns(Lithic::Models::NonPCICard::Funding::Type::TaggedSymbol) }
260
260
  attr_accessor :type
261
261
 
262
262
  # Account name identifying the funding source. This may be `null`.
@@ -279,8 +279,8 @@ module Lithic
279
279
  token: String,
280
280
  created: Time,
281
281
  last_four: String,
282
- state: Lithic::Models::CardListResponse::Funding::State::OrSymbol,
283
- type: Lithic::Models::CardListResponse::Funding::Type::OrSymbol,
282
+ state: Lithic::Models::NonPCICard::Funding::State::OrSymbol,
283
+ type: Lithic::Models::NonPCICard::Funding::Type::OrSymbol,
284
284
  account_name: String,
285
285
  nickname: String
286
286
  )
@@ -295,8 +295,8 @@ module Lithic
295
295
  token: String,
296
296
  created: Time,
297
297
  last_four: String,
298
- state: Lithic::Models::CardListResponse::Funding::State::TaggedSymbol,
299
- type: Lithic::Models::CardListResponse::Funding::Type::TaggedSymbol,
298
+ state: Lithic::Models::NonPCICard::Funding::State::TaggedSymbol,
299
+ type: Lithic::Models::NonPCICard::Funding::Type::TaggedSymbol,
300
300
  account_name: String,
301
301
  nickname: String
302
302
  }
@@ -311,14 +311,14 @@ module Lithic
311
311
  module State
312
312
  extend Lithic::Internal::Type::Enum
313
313
 
314
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::Funding::State) }
314
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::Funding::State) }
315
315
  OrSymbol = T.type_alias { T.any(Symbol, String) }
316
316
 
317
- DELETED = T.let(:DELETED, Lithic::Models::CardListResponse::Funding::State::TaggedSymbol)
318
- ENABLED = T.let(:ENABLED, Lithic::Models::CardListResponse::Funding::State::TaggedSymbol)
319
- PENDING = T.let(:PENDING, Lithic::Models::CardListResponse::Funding::State::TaggedSymbol)
317
+ DELETED = T.let(:DELETED, Lithic::Models::NonPCICard::Funding::State::TaggedSymbol)
318
+ ENABLED = T.let(:ENABLED, Lithic::Models::NonPCICard::Funding::State::TaggedSymbol)
319
+ PENDING = T.let(:PENDING, Lithic::Models::NonPCICard::Funding::State::TaggedSymbol)
320
320
 
321
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::Funding::State::TaggedSymbol]) }
321
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::Funding::State::TaggedSymbol]) }
322
322
  def self.values; end
323
323
  end
324
324
 
@@ -327,15 +327,14 @@ module Lithic
327
327
  module Type
328
328
  extend Lithic::Internal::Type::Enum
329
329
 
330
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::Funding::Type) }
330
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::Funding::Type) }
331
331
  OrSymbol = T.type_alias { T.any(Symbol, String) }
332
332
 
333
333
  DEPOSITORY_CHECKING =
334
- T.let(:DEPOSITORY_CHECKING, Lithic::Models::CardListResponse::Funding::Type::TaggedSymbol)
335
- DEPOSITORY_SAVINGS =
336
- T.let(:DEPOSITORY_SAVINGS, Lithic::Models::CardListResponse::Funding::Type::TaggedSymbol)
334
+ T.let(:DEPOSITORY_CHECKING, Lithic::Models::NonPCICard::Funding::Type::TaggedSymbol)
335
+ DEPOSITORY_SAVINGS = T.let(:DEPOSITORY_SAVINGS, Lithic::Models::NonPCICard::Funding::Type::TaggedSymbol)
337
336
 
338
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::Funding::Type::TaggedSymbol]) }
337
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::Funding::Type::TaggedSymbol]) }
339
338
  def self.values; end
340
339
  end
341
340
  end
@@ -345,14 +344,14 @@ module Lithic
345
344
  module PinStatus
346
345
  extend Lithic::Internal::Type::Enum
347
346
 
348
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::PinStatus) }
347
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::PinStatus) }
349
348
  OrSymbol = T.type_alias { T.any(Symbol, String) }
350
349
 
351
- OK = T.let(:OK, Lithic::Models::CardListResponse::PinStatus::TaggedSymbol)
352
- BLOCKED = T.let(:BLOCKED, Lithic::Models::CardListResponse::PinStatus::TaggedSymbol)
353
- NOT_SET = T.let(:NOT_SET, Lithic::Models::CardListResponse::PinStatus::TaggedSymbol)
350
+ OK = T.let(:OK, Lithic::Models::NonPCICard::PinStatus::TaggedSymbol)
351
+ BLOCKED = T.let(:BLOCKED, Lithic::Models::NonPCICard::PinStatus::TaggedSymbol)
352
+ NOT_SET = T.let(:NOT_SET, Lithic::Models::NonPCICard::PinStatus::TaggedSymbol)
354
353
 
355
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::PinStatus::TaggedSymbol]) }
354
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::PinStatus::TaggedSymbol]) }
356
355
  def self.values; end
357
356
  end
358
357
 
@@ -360,16 +359,16 @@ module Lithic
360
359
  module SpendLimitDuration
361
360
  extend Lithic::Internal::Type::Enum
362
361
 
363
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::SpendLimitDuration) }
362
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::SpendLimitDuration) }
364
363
  OrSymbol = T.type_alias { T.any(Symbol, String) }
365
364
 
366
- ANNUALLY = T.let(:ANNUALLY, Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol)
367
- FOREVER = T.let(:FOREVER, Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol)
368
- MONTHLY = T.let(:MONTHLY, Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol)
369
- TRANSACTION = T.let(:TRANSACTION, Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol)
370
- DAILY = T.let(:DAILY, Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol)
365
+ ANNUALLY = T.let(:ANNUALLY, Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol)
366
+ FOREVER = T.let(:FOREVER, Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol)
367
+ MONTHLY = T.let(:MONTHLY, Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol)
368
+ TRANSACTION = T.let(:TRANSACTION, Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol)
369
+ DAILY = T.let(:DAILY, Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol)
371
370
 
372
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::SpendLimitDuration::TaggedSymbol]) }
371
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::SpendLimitDuration::TaggedSymbol]) }
373
372
  def self.values; end
374
373
  end
375
374
 
@@ -391,16 +390,16 @@ module Lithic
391
390
  module State
392
391
  extend Lithic::Internal::Type::Enum
393
392
 
394
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::State) }
393
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::State) }
395
394
  OrSymbol = T.type_alias { T.any(Symbol, String) }
396
395
 
397
- CLOSED = T.let(:CLOSED, Lithic::Models::CardListResponse::State::TaggedSymbol)
398
- OPEN = T.let(:OPEN, Lithic::Models::CardListResponse::State::TaggedSymbol)
399
- PAUSED = T.let(:PAUSED, Lithic::Models::CardListResponse::State::TaggedSymbol)
400
- PENDING_ACTIVATION = T.let(:PENDING_ACTIVATION, Lithic::Models::CardListResponse::State::TaggedSymbol)
401
- PENDING_FULFILLMENT = T.let(:PENDING_FULFILLMENT, Lithic::Models::CardListResponse::State::TaggedSymbol)
396
+ CLOSED = T.let(:CLOSED, Lithic::Models::NonPCICard::State::TaggedSymbol)
397
+ OPEN = T.let(:OPEN, Lithic::Models::NonPCICard::State::TaggedSymbol)
398
+ PAUSED = T.let(:PAUSED, Lithic::Models::NonPCICard::State::TaggedSymbol)
399
+ PENDING_ACTIVATION = T.let(:PENDING_ACTIVATION, Lithic::Models::NonPCICard::State::TaggedSymbol)
400
+ PENDING_FULFILLMENT = T.let(:PENDING_FULFILLMENT, Lithic::Models::NonPCICard::State::TaggedSymbol)
402
401
 
403
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::State::TaggedSymbol]) }
402
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::State::TaggedSymbol]) }
404
403
  def self.values; end
405
404
  end
406
405
 
@@ -417,17 +416,17 @@ module Lithic
417
416
  module Type
418
417
  extend Lithic::Internal::Type::Enum
419
418
 
420
- TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::CardListResponse::Type) }
419
+ TaggedSymbol = T.type_alias { T.all(Symbol, Lithic::Models::NonPCICard::Type) }
421
420
  OrSymbol = T.type_alias { T.any(Symbol, String) }
422
421
 
423
- MERCHANT_LOCKED = T.let(:MERCHANT_LOCKED, Lithic::Models::CardListResponse::Type::TaggedSymbol)
424
- PHYSICAL = T.let(:PHYSICAL, Lithic::Models::CardListResponse::Type::TaggedSymbol)
425
- SINGLE_USE = T.let(:SINGLE_USE, Lithic::Models::CardListResponse::Type::TaggedSymbol)
426
- VIRTUAL = T.let(:VIRTUAL, Lithic::Models::CardListResponse::Type::TaggedSymbol)
427
- UNLOCKED = T.let(:UNLOCKED, Lithic::Models::CardListResponse::Type::TaggedSymbol)
428
- DIGITAL_WALLET = T.let(:DIGITAL_WALLET, Lithic::Models::CardListResponse::Type::TaggedSymbol)
422
+ MERCHANT_LOCKED = T.let(:MERCHANT_LOCKED, Lithic::Models::NonPCICard::Type::TaggedSymbol)
423
+ PHYSICAL = T.let(:PHYSICAL, Lithic::Models::NonPCICard::Type::TaggedSymbol)
424
+ SINGLE_USE = T.let(:SINGLE_USE, Lithic::Models::NonPCICard::Type::TaggedSymbol)
425
+ VIRTUAL = T.let(:VIRTUAL, Lithic::Models::NonPCICard::Type::TaggedSymbol)
426
+ UNLOCKED = T.let(:UNLOCKED, Lithic::Models::NonPCICard::Type::TaggedSymbol)
427
+ DIGITAL_WALLET = T.let(:DIGITAL_WALLET, Lithic::Models::NonPCICard::Type::TaggedSymbol)
429
428
 
430
- sig { override.returns(T::Array[Lithic::Models::CardListResponse::Type::TaggedSymbol]) }
429
+ sig { override.returns(T::Array[Lithic::Models::NonPCICard::Type::TaggedSymbol]) }
431
430
  def self.values; end
432
431
  end
433
432
  end
@@ -35,7 +35,7 @@ module Lithic
35
35
  state: Lithic::Models::CardCreateParams::State::OrSymbol,
36
36
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
37
37
  )
38
- .returns(Lithic::Models::CardCreateResponse)
38
+ .returns(Lithic::Models::Card)
39
39
  end
40
40
  def create(
41
41
  # Card types:
@@ -147,7 +147,7 @@ module Lithic
147
147
  card_token: String,
148
148
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
149
149
  )
150
- .returns(Lithic::Models::CardRetrieveResponse)
150
+ .returns(Lithic::Models::Card)
151
151
  end
152
152
  def retrieve(card_token, request_options: {}); end
153
153
 
@@ -168,7 +168,7 @@ module Lithic
168
168
  state: Lithic::Models::CardUpdateParams::State::OrSymbol,
169
169
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
170
170
  )
171
- .returns(Lithic::Models::CardUpdateResponse)
171
+ .returns(Lithic::Models::Card)
172
172
  end
173
173
  def update(
174
174
  card_token,
@@ -228,7 +228,7 @@ module Lithic
228
228
  state: Lithic::Models::CardListParams::State::OrSymbol,
229
229
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
230
230
  )
231
- .returns(Lithic::Internal::CursorPage[Lithic::Models::CardListResponse])
231
+ .returns(Lithic::Internal::CursorPage[Lithic::Models::NonPCICard])
232
232
  end
233
233
  def list(
234
234
  # Returns cards associated with the specified account.
@@ -270,7 +270,7 @@ module Lithic
270
270
  shipping_method: Lithic::Models::CardConvertPhysicalParams::ShippingMethod::OrSymbol,
271
271
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
272
272
  )
273
- .returns(Lithic::Models::CardConvertPhysicalResponse)
273
+ .returns(Lithic::Models::Card)
274
274
  end
275
275
  def convert_physical(
276
276
  card_token,
@@ -400,7 +400,7 @@ module Lithic
400
400
  shipping_method: Lithic::Models::CardReissueParams::ShippingMethod::OrSymbol,
401
401
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
402
402
  )
403
- .returns(Lithic::Models::CardReissueResponse)
403
+ .returns(Lithic::Models::Card)
404
404
  end
405
405
  def reissue(
406
406
  card_token,
@@ -447,7 +447,7 @@ module Lithic
447
447
  shipping_method: Lithic::Models::CardRenewParams::ShippingMethod::OrSymbol,
448
448
  request_options: T.nilable(T.any(Lithic::RequestOptions, Lithic::Internal::AnyHash))
449
449
  )
450
- .returns(Lithic::Models::CardRenewResponse)
450
+ .returns(Lithic::Models::Card)
451
451
  end
452
452
  def renew(
453
453
  card_token,
@@ -508,7 +508,7 @@ module Lithic
508
508
  )
509
509
  )
510
510
  )
511
- .returns(Lithic::Models::CardSearchByPanResponse)
511
+ .returns(Lithic::Models::Card)
512
512
  end
513
513
  def search_by_pan(
514
514
  # The PAN for the card being retrieved.
@@ -15,6 +15,8 @@ module Lithic
15
15
 
16
16
  def ==: (top other) -> bool
17
17
 
18
+ def hash: -> Integer
19
+
18
20
  def coerce: (
19
21
  ::Array[top] | top value,
20
22
  state: Lithic::Internal::Type::Converter::coerce_state
@@ -49,8 +49,12 @@ module Lithic
49
49
 
50
50
  def self.==: (top other) -> bool
51
51
 
52
+ def self.hash: -> Integer
53
+
52
54
  def ==: (top other) -> bool
53
55
 
56
+ def hash: -> Integer
57
+
54
58
  def self.coerce: (
55
59
  Lithic::Internal::Type::BaseModel | ::Hash[top, top] | top value,
56
60
  state: Lithic::Internal::Type::Converter::coerce_state
@@ -10,6 +10,8 @@ module Lithic
10
10
 
11
11
  def ==: (top other) -> bool
12
12
 
13
+ def hash: -> Integer
14
+
13
15
  def coerce: (
14
16
  String | Symbol | top value,
15
17
  state: Lithic::Internal::Type::Converter::coerce_state
@@ -15,6 +15,8 @@ module Lithic
15
15
 
16
16
  def ==: (top other) -> bool
17
17
 
18
+ def hash: -> Integer
19
+
18
20
  def coerce: (
19
21
  ::Hash[top, top] | top value,
20
22
  state: Lithic::Internal::Type::Converter::coerce_state
@@ -30,6 +30,8 @@ module Lithic
30
30
 
31
31
  def ==: (top other) -> bool
32
32
 
33
+ def hash: -> Integer
34
+
33
35
  def coerce: (
34
36
  top value,
35
37
  state: Lithic::Internal::Type::Converter::coerce_state
@@ -0,0 +1,19 @@
1
+ module Lithic
2
+ module Models
3
+ type card = { cvv: String, pan: String }
4
+
5
+ class Card < Lithic::Models::NonPCICard
6
+ def cvv: -> String?
7
+
8
+ def cvv=: (String _) -> String
9
+
10
+ def pan: -> String?
11
+
12
+ def pan=: (String _) -> String
13
+
14
+ def initialize: (?cvv: String, ?pan: String) -> void
15
+
16
+ def to_hash: -> Lithic::Models::card
17
+ end
18
+ end
19
+ end
@@ -1,18 +1,18 @@
1
1
  module Lithic
2
2
  module Models
3
- type card_list_response =
3
+ type non_pci_card =
4
4
  {
5
5
  token: String,
6
6
  account_token: String,
7
7
  card_program_token: String,
8
8
  created: Time,
9
- funding: Lithic::Models::CardListResponse::Funding,
9
+ funding: Lithic::Models::NonPCICard::Funding,
10
10
  last_four: String,
11
- pin_status: Lithic::Models::CardListResponse::pin_status,
11
+ pin_status: Lithic::Models::NonPCICard::pin_status,
12
12
  spend_limit: Integer,
13
- spend_limit_duration: Lithic::Models::CardListResponse::spend_limit_duration,
14
- state: Lithic::Models::CardListResponse::state,
15
- type: Lithic::Models::CardListResponse::type_,
13
+ spend_limit_duration: Lithic::Models::NonPCICard::spend_limit_duration,
14
+ state: Lithic::Models::NonPCICard::state,
15
+ type: Lithic::Models::NonPCICard::type_,
16
16
  auth_rule_tokens: ::Array[String],
17
17
  cardholder_currency: String,
18
18
  digital_card_art_token: String,
@@ -25,7 +25,7 @@ module Lithic
25
25
  replacement_for: String?
26
26
  }
27
27
 
28
- class CardListResponse < Lithic::Internal::Type::BaseModel
28
+ class NonPCICard < Lithic::Internal::Type::BaseModel
29
29
  attr_accessor token: String
30
30
 
31
31
  attr_accessor account_token: String
@@ -34,19 +34,19 @@ module Lithic
34
34
 
35
35
  attr_accessor created: Time
36
36
 
37
- attr_accessor funding: Lithic::Models::CardListResponse::Funding
37
+ attr_accessor funding: Lithic::Models::NonPCICard::Funding
38
38
 
39
39
  attr_accessor last_four: String
40
40
 
41
- attr_accessor pin_status: Lithic::Models::CardListResponse::pin_status
41
+ attr_accessor pin_status: Lithic::Models::NonPCICard::pin_status
42
42
 
43
43
  attr_accessor spend_limit: Integer
44
44
 
45
- attr_accessor spend_limit_duration: Lithic::Models::CardListResponse::spend_limit_duration
45
+ attr_accessor spend_limit_duration: Lithic::Models::NonPCICard::spend_limit_duration
46
46
 
47
- attr_accessor state: Lithic::Models::CardListResponse::state
47
+ attr_accessor state: Lithic::Models::NonPCICard::state
48
48
 
49
- attr_accessor type: Lithic::Models::CardListResponse::type_
49
+ attr_accessor type: Lithic::Models::NonPCICard::type_
50
50
 
51
51
  attr_reader auth_rule_tokens: ::Array[String]?
52
52
 
@@ -91,13 +91,13 @@ module Lithic
91
91
  account_token: String,
92
92
  card_program_token: String,
93
93
  created: Time,
94
- funding: Lithic::Models::CardListResponse::Funding,
94
+ funding: Lithic::Models::NonPCICard::Funding,
95
95
  last_four: String,
96
- pin_status: Lithic::Models::CardListResponse::pin_status,
96
+ pin_status: Lithic::Models::NonPCICard::pin_status,
97
97
  spend_limit: Integer,
98
- spend_limit_duration: Lithic::Models::CardListResponse::spend_limit_duration,
99
- state: Lithic::Models::CardListResponse::state,
100
- type: Lithic::Models::CardListResponse::type_,
98
+ spend_limit_duration: Lithic::Models::NonPCICard::spend_limit_duration,
99
+ state: Lithic::Models::NonPCICard::state,
100
+ type: Lithic::Models::NonPCICard::type_,
101
101
  ?auth_rule_tokens: ::Array[String],
102
102
  ?cardholder_currency: String,
103
103
  ?digital_card_art_token: String,
@@ -110,15 +110,15 @@ module Lithic
110
110
  ?replacement_for: String?
111
111
  ) -> void
112
112
 
113
- def to_hash: -> Lithic::Models::card_list_response
113
+ def to_hash: -> Lithic::Models::non_pci_card
114
114
 
115
115
  type funding =
116
116
  {
117
117
  token: String,
118
118
  created: Time,
119
119
  last_four: String,
120
- state: Lithic::Models::CardListResponse::Funding::state,
121
- type: Lithic::Models::CardListResponse::Funding::type_,
120
+ state: Lithic::Models::NonPCICard::Funding::state,
121
+ type: Lithic::Models::NonPCICard::Funding::type_,
122
122
  account_name: String,
123
123
  nickname: String
124
124
  }
@@ -130,9 +130,9 @@ module Lithic
130
130
 
131
131
  attr_accessor last_four: String
132
132
 
133
- attr_accessor state: Lithic::Models::CardListResponse::Funding::state
133
+ attr_accessor state: Lithic::Models::NonPCICard::Funding::state
134
134
 
135
- attr_accessor type: Lithic::Models::CardListResponse::Funding::type_
135
+ attr_accessor type: Lithic::Models::NonPCICard::Funding::type_
136
136
 
137
137
  attr_reader account_name: String?
138
138
 
@@ -146,13 +146,13 @@ module Lithic
146
146
  token: String,
147
147
  created: Time,
148
148
  last_four: String,
149
- state: Lithic::Models::CardListResponse::Funding::state,
150
- type: Lithic::Models::CardListResponse::Funding::type_,
149
+ state: Lithic::Models::NonPCICard::Funding::state,
150
+ type: Lithic::Models::NonPCICard::Funding::type_,
151
151
  ?account_name: String,
152
152
  ?nickname: String
153
153
  ) -> void
154
154
 
155
- def to_hash: -> Lithic::Models::CardListResponse::funding
155
+ def to_hash: -> Lithic::Models::NonPCICard::funding
156
156
 
157
157
  type state = :DELETED | :ENABLED | :PENDING
158
158
 
@@ -163,7 +163,7 @@ module Lithic
163
163
  ENABLED: :ENABLED
164
164
  PENDING: :PENDING
165
165
 
166
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::Funding::state]
166
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::Funding::state]
167
167
  end
168
168
 
169
169
  type type_ = :DEPOSITORY_CHECKING | :DEPOSITORY_SAVINGS
@@ -174,7 +174,7 @@ module Lithic
174
174
  DEPOSITORY_CHECKING: :DEPOSITORY_CHECKING
175
175
  DEPOSITORY_SAVINGS: :DEPOSITORY_SAVINGS
176
176
 
177
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::Funding::type_]
177
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::Funding::type_]
178
178
  end
179
179
  end
180
180
 
@@ -187,7 +187,7 @@ module Lithic
187
187
  BLOCKED: :BLOCKED
188
188
  NOT_SET: :NOT_SET
189
189
 
190
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::pin_status]
190
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::pin_status]
191
191
  end
192
192
 
193
193
  type spend_limit_duration =
@@ -202,7 +202,7 @@ module Lithic
202
202
  TRANSACTION: :TRANSACTION
203
203
  DAILY: :DAILY
204
204
 
205
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::spend_limit_duration]
205
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::spend_limit_duration]
206
206
  end
207
207
 
208
208
  type state =
@@ -217,7 +217,7 @@ module Lithic
217
217
  PENDING_ACTIVATION: :PENDING_ACTIVATION
218
218
  PENDING_FULFILLMENT: :PENDING_FULFILLMENT
219
219
 
220
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::state]
220
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::state]
221
221
  end
222
222
 
223
223
  type type_ =
@@ -238,7 +238,7 @@ module Lithic
238
238
  UNLOCKED: :UNLOCKED
239
239
  DIGITAL_WALLET: :DIGITAL_WALLET
240
240
 
241
- def self?.values: -> ::Array[Lithic::Models::CardListResponse::type_]
241
+ def self?.values: -> ::Array[Lithic::Models::NonPCICard::type_]
242
242
  end
243
243
  end
244
244
  end
@@ -26,12 +26,12 @@ module Lithic
26
26
  ?spend_limit_duration: Lithic::Models::spend_limit_duration,
27
27
  ?state: Lithic::Models::CardCreateParams::state,
28
28
  ?request_options: Lithic::request_opts
29
- ) -> Lithic::Models::CardCreateResponse
29
+ ) -> Lithic::Models::Card
30
30
 
31
31
  def retrieve: (
32
32
  String card_token,
33
33
  ?request_options: Lithic::request_opts
34
- ) -> Lithic::Models::CardRetrieveResponse
34
+ ) -> Lithic::Models::Card
35
35
 
36
36
  def update: (
37
37
  String card_token,
@@ -43,7 +43,7 @@ module Lithic
43
43
  ?spend_limit_duration: Lithic::Models::spend_limit_duration,
44
44
  ?state: Lithic::Models::CardUpdateParams::state,
45
45
  ?request_options: Lithic::request_opts
46
- ) -> Lithic::Models::CardUpdateResponse
46
+ ) -> Lithic::Models::Card
47
47
 
48
48
  def list: (
49
49
  ?account_token: String,
@@ -54,7 +54,7 @@ module Lithic
54
54
  ?starting_after: String,
55
55
  ?state: Lithic::Models::CardListParams::state,
56
56
  ?request_options: Lithic::request_opts
57
- ) -> Lithic::Internal::CursorPage[Lithic::Models::CardListResponse]
57
+ ) -> Lithic::Internal::CursorPage[Lithic::Models::NonPCICard]
58
58
 
59
59
  def convert_physical: (
60
60
  String card_token,
@@ -63,7 +63,7 @@ module Lithic
63
63
  ?product_id: String,
64
64
  ?shipping_method: Lithic::Models::CardConvertPhysicalParams::shipping_method,
65
65
  ?request_options: Lithic::request_opts
66
- ) -> Lithic::Models::CardConvertPhysicalResponse
66
+ ) -> Lithic::Models::Card
67
67
 
68
68
  def embed: (
69
69
  embed_request: String,
@@ -89,7 +89,7 @@ module Lithic
89
89
  ?shipping_address: Lithic::Models::ShippingAddress,
90
90
  ?shipping_method: Lithic::Models::CardReissueParams::shipping_method,
91
91
  ?request_options: Lithic::request_opts
92
- ) -> Lithic::Models::CardReissueResponse
92
+ ) -> Lithic::Models::Card
93
93
 
94
94
  def renew: (
95
95
  String card_token,
@@ -100,7 +100,7 @@ module Lithic
100
100
  ?product_id: String,
101
101
  ?shipping_method: Lithic::Models::CardRenewParams::shipping_method,
102
102
  ?request_options: Lithic::request_opts
103
- ) -> Lithic::Models::CardRenewResponse
103
+ ) -> Lithic::Models::Card
104
104
 
105
105
  def retrieve_spend_limits: (
106
106
  String card_token,
@@ -110,7 +110,7 @@ module Lithic
110
110
  def search_by_pan: (
111
111
  pan: String,
112
112
  ?request_options: Lithic::request_opts
113
- ) -> Lithic::Models::CardSearchByPanResponse
113
+ ) -> Lithic::Models::Card
114
114
 
115
115
  def initialize: (client: Lithic::Client) -> void
116
116
  end