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
@@ -57,6 +57,8 @@ module Lithic
57
57
  required :workflow, enum: -> { Lithic::Models::KYB::Workflow }
58
58
 
59
59
  # @!attribute beneficial_owner_entities
60
+ # @deprecated
61
+ #
60
62
  # Deprecated.
61
63
  #
62
64
  # @return [Array<Lithic::Models::KYB::BeneficialOwnerEntity>, nil]
@@ -3,7 +3,7 @@
3
3
  module Lithic
4
4
  module Models
5
5
  # @see Lithic::Resources::Cards#list
6
- class CardListResponse < Lithic::Internal::Type::BaseModel
6
+ class NonPCICard < Lithic::Internal::Type::BaseModel
7
7
  # @!attribute token
8
8
  # Globally unique identifier.
9
9
  #
@@ -31,8 +31,8 @@ module Lithic
31
31
  # @!attribute funding
32
32
  # Deprecated: Funding account for the card.
33
33
  #
34
- # @return [Lithic::Models::CardListResponse::Funding]
35
- required :funding, -> { Lithic::Models::CardListResponse::Funding }
34
+ # @return [Lithic::Models::NonPCICard::Funding]
35
+ required :funding, -> { Lithic::Models::NonPCICard::Funding }
36
36
 
37
37
  # @!attribute last_four
38
38
  # Last four digits of the card number.
@@ -44,8 +44,8 @@ module Lithic
44
44
  # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
45
45
  # attempts).
46
46
  #
47
- # @return [Symbol, Lithic::Models::CardListResponse::PinStatus]
48
- required :pin_status, enum: -> { Lithic::Models::CardListResponse::PinStatus }
47
+ # @return [Symbol, Lithic::Models::NonPCICard::PinStatus]
48
+ required :pin_status, enum: -> { Lithic::Models::NonPCICard::PinStatus }
49
49
 
50
50
  # @!attribute spend_limit
51
51
  # Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
@@ -57,8 +57,8 @@ module Lithic
57
57
  # @!attribute spend_limit_duration
58
58
  # Spend limit duration
59
59
  #
60
- # @return [Symbol, Lithic::Models::CardListResponse::SpendLimitDuration]
61
- required :spend_limit_duration, enum: -> { Lithic::Models::CardListResponse::SpendLimitDuration }
60
+ # @return [Symbol, Lithic::Models::NonPCICard::SpendLimitDuration]
61
+ required :spend_limit_duration, enum: -> { Lithic::Models::NonPCICard::SpendLimitDuration }
62
62
 
63
63
  # @!attribute state
64
64
  # Card state values: _ `CLOSED` - Card will no longer approve authorizations.
@@ -77,8 +77,8 @@ module Lithic
77
77
  # In sandbox, the same daily batch fulfillment occurs, but no cards are actually
78
78
  # manufactured.
79
79
  #
80
- # @return [Symbol, Lithic::Models::CardListResponse::State]
81
- required :state, enum: -> { Lithic::Models::CardListResponse::State }
80
+ # @return [Symbol, Lithic::Models::NonPCICard::State]
81
+ required :state, enum: -> { Lithic::Models::NonPCICard::State }
82
82
 
83
83
  # @!attribute type
84
84
  # Card types: _ `VIRTUAL` - Card will authorize at any merchant and can be added
@@ -92,10 +92,12 @@ module Lithic
92
92
  # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
93
93
  # VIRTUAL instead.
94
94
  #
95
- # @return [Symbol, Lithic::Models::CardListResponse::Type]
96
- required :type, enum: -> { Lithic::Models::CardListResponse::Type }
95
+ # @return [Symbol, Lithic::Models::NonPCICard::Type]
96
+ required :type, enum: -> { Lithic::Models::NonPCICard::Type }
97
97
 
98
98
  # @!attribute auth_rule_tokens
99
+ # @deprecated
100
+ #
99
101
  # List of identifiers for the Auth Rule(s) that are applied on the card. This
100
102
  # field is deprecated and will no longer be populated in the `Card` object. The
101
103
  # key will be removed from the schema in a future release. Use the `/auth_rules`
@@ -172,13 +174,13 @@ module Lithic
172
174
  # @param account_token [String]
173
175
  # @param card_program_token [String]
174
176
  # @param created [Time]
175
- # @param funding [Lithic::Models::CardListResponse::Funding]
177
+ # @param funding [Lithic::Models::NonPCICard::Funding]
176
178
  # @param last_four [String]
177
- # @param pin_status [Symbol, Lithic::Models::CardListResponse::PinStatus]
179
+ # @param pin_status [Symbol, Lithic::Models::NonPCICard::PinStatus]
178
180
  # @param spend_limit [Integer]
179
- # @param spend_limit_duration [Symbol, Lithic::Models::CardListResponse::SpendLimitDuration]
180
- # @param state [Symbol, Lithic::Models::CardListResponse::State]
181
- # @param type [Symbol, Lithic::Models::CardListResponse::Type]
181
+ # @param spend_limit_duration [Symbol, Lithic::Models::NonPCICard::SpendLimitDuration]
182
+ # @param state [Symbol, Lithic::Models::NonPCICard::State]
183
+ # @param type [Symbol, Lithic::Models::NonPCICard::Type]
182
184
  # @param auth_rule_tokens [Array<String>]
183
185
  # @param cardholder_currency [String]
184
186
  # @param digital_card_art_token [String]
@@ -190,7 +192,7 @@ module Lithic
190
192
  # @param product_id [String]
191
193
  # @param replacement_for [String, nil]
192
194
 
193
- # @see Lithic::Models::CardListResponse#funding
195
+ # @see Lithic::Models::NonPCICard#funding
194
196
  class Funding < Lithic::Internal::Type::BaseModel
195
197
  # @!attribute token
196
198
  # A globally unique identifier for this FundingAccount.
@@ -218,15 +220,15 @@ module Lithic
218
220
  # The funding account is still being verified e.g. bank micro-deposits
219
221
  # verification. \* `DELETED` - The founding account has been deleted.
220
222
  #
221
- # @return [Symbol, Lithic::Models::CardListResponse::Funding::State]
222
- required :state, enum: -> { Lithic::Models::CardListResponse::Funding::State }
223
+ # @return [Symbol, Lithic::Models::NonPCICard::Funding::State]
224
+ required :state, enum: -> { Lithic::Models::NonPCICard::Funding::State }
223
225
 
224
226
  # @!attribute type
225
227
  # Types of funding source: _ `DEPOSITORY_CHECKING` - Bank checking account. _
226
228
  # `DEPOSITORY_SAVINGS` - Bank savings account.
227
229
  #
228
- # @return [Symbol, Lithic::Models::CardListResponse::Funding::Type]
229
- required :type, enum: -> { Lithic::Models::CardListResponse::Funding::Type }
230
+ # @return [Symbol, Lithic::Models::NonPCICard::Funding::Type]
231
+ required :type, enum: -> { Lithic::Models::NonPCICard::Funding::Type }
230
232
 
231
233
  # @!attribute account_name
232
234
  # Account name identifying the funding source. This may be `null`.
@@ -246,8 +248,8 @@ module Lithic
246
248
  # @param token [String]
247
249
  # @param created [Time]
248
250
  # @param last_four [String]
249
- # @param state [Symbol, Lithic::Models::CardListResponse::Funding::State]
250
- # @param type [Symbol, Lithic::Models::CardListResponse::Funding::Type]
251
+ # @param state [Symbol, Lithic::Models::NonPCICard::Funding::State]
252
+ # @param type [Symbol, Lithic::Models::NonPCICard::Funding::Type]
251
253
  # @param account_name [String]
252
254
  # @param nickname [String]
253
255
 
@@ -256,7 +258,7 @@ module Lithic
256
258
  # The funding account is still being verified e.g. bank micro-deposits
257
259
  # verification. \* `DELETED` - The founding account has been deleted.
258
260
  #
259
- # @see Lithic::Models::CardListResponse::Funding#state
261
+ # @see Lithic::Models::NonPCICard::Funding#state
260
262
  module State
261
263
  extend Lithic::Internal::Type::Enum
262
264
 
@@ -271,7 +273,7 @@ module Lithic
271
273
  # Types of funding source: _ `DEPOSITORY_CHECKING` - Bank checking account. _
272
274
  # `DEPOSITORY_SAVINGS` - Bank savings account.
273
275
  #
274
- # @see Lithic::Models::CardListResponse::Funding#type
276
+ # @see Lithic::Models::NonPCICard::Funding#type
275
277
  module Type
276
278
  extend Lithic::Internal::Type::Enum
277
279
 
@@ -286,7 +288,7 @@ module Lithic
286
288
  # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
287
289
  # attempts).
288
290
  #
289
- # @see Lithic::Models::CardListResponse#pin_status
291
+ # @see Lithic::Models::NonPCICard#pin_status
290
292
  module PinStatus
291
293
  extend Lithic::Internal::Type::Enum
292
294
 
@@ -300,7 +302,7 @@ module Lithic
300
302
 
301
303
  # Spend limit duration
302
304
  #
303
- # @see Lithic::Models::CardListResponse#spend_limit_duration
305
+ # @see Lithic::Models::NonPCICard#spend_limit_duration
304
306
  module SpendLimitDuration
305
307
  extend Lithic::Internal::Type::Enum
306
308
 
@@ -330,7 +332,7 @@ module Lithic
330
332
  # In sandbox, the same daily batch fulfillment occurs, but no cards are actually
331
333
  # manufactured.
332
334
  #
333
- # @see Lithic::Models::CardListResponse#state
335
+ # @see Lithic::Models::NonPCICard#state
334
336
  module State
335
337
  extend Lithic::Internal::Type::Enum
336
338
 
@@ -355,7 +357,7 @@ module Lithic
355
357
  # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
356
358
  # VIRTUAL instead.
357
359
  #
358
- # @see Lithic::Models::CardListResponse#type
360
+ # @see Lithic::Models::NonPCICard#type
359
361
  module Type
360
362
  extend Lithic::Internal::Type::Enum
361
363
 
@@ -10,6 +10,8 @@ module Lithic
10
10
  required :created, Time
11
11
 
12
12
  # @!attribute currency
13
+ # @deprecated
14
+ #
13
15
  # 3-character alphabetic ISO 4217 code. (This field is deprecated and will be
14
16
  # removed in a future version of the API.)
15
17
  #
@@ -22,6 +24,8 @@ module Lithic
22
24
  required :details, -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::SettlementSummaryDetails] }
23
25
 
24
26
  # @!attribute disputes_gross_amount
27
+ # @deprecated
28
+ #
25
29
  # The total gross amount of disputes settlements. (This field is deprecated and
26
30
  # will be removed in a future version of the API. To compute total amounts, Lithic
27
31
  # recommends that customers sum the relevant settlement amounts found within
@@ -31,6 +35,8 @@ module Lithic
31
35
  required :disputes_gross_amount, Integer
32
36
 
33
37
  # @!attribute interchange_gross_amount
38
+ # @deprecated
39
+ #
34
40
  # The total amount of interchange. (This field is deprecated and will be removed
35
41
  # in a future version of the API. To compute total amounts, Lithic recommends that
36
42
  # customers sum the relevant settlement amounts found within `details`.)
@@ -45,6 +51,8 @@ module Lithic
45
51
  required :is_complete, Lithic::Internal::Type::Boolean
46
52
 
47
53
  # @!attribute other_fees_gross_amount
54
+ # @deprecated
55
+ #
48
56
  # Total amount of gross other fees outside of interchange. (This field is
49
57
  # deprecated and will be removed in a future version of the API. To compute total
50
58
  # amounts, Lithic recommends that customers sum the relevant settlement amounts
@@ -60,6 +68,8 @@ module Lithic
60
68
  required :report_date, String
61
69
 
62
70
  # @!attribute settled_net_amount
71
+ # @deprecated
72
+ #
63
73
  # The total net amount of cash moved. (net value of settled_gross_amount,
64
74
  # interchange, fees). (This field is deprecated and will be removed in a future
65
75
  # version of the API. To compute total amounts, Lithic recommends that customers
@@ -69,6 +79,8 @@ module Lithic
69
79
  required :settled_net_amount, Integer
70
80
 
71
81
  # @!attribute transactions_gross_amount
82
+ # @deprecated
83
+ #
72
84
  # The total amount of settlement impacting transactions (excluding interchange,
73
85
  # fees, and disputes). (This field is deprecated and will be removed in a future
74
86
  # version of the API. To compute total amounts, Lithic recommends that customers
@@ -25,6 +25,8 @@ module Lithic
25
25
  required :acquirer_fee, Integer, nil?: true
26
26
 
27
27
  # @!attribute acquirer_reference_number
28
+ # @deprecated
29
+ #
28
30
  # Unique identifier assigned to a transaction by the acquirer that can be used in
29
31
  # dispute and chargeback filing.
30
32
  #
@@ -32,6 +34,8 @@ module Lithic
32
34
  required :acquirer_reference_number, String, nil?: true
33
35
 
34
36
  # @!attribute amount
37
+ # @deprecated
38
+ #
35
39
  # When the transaction is pending, this represents the authorization amount of the
36
40
  # transaction in the anticipated settlement currency. Once the transaction has
37
41
  # settled, this field represents the settled amount in the settlement currency.
@@ -45,6 +49,8 @@ module Lithic
45
49
  required :amounts, -> { Lithic::Models::Transaction::Amounts }
46
50
 
47
51
  # @!attribute authorization_amount
52
+ # @deprecated
53
+ #
48
54
  # The authorization amount of the transaction in the anticipated settlement
49
55
  # currency.
50
56
  #
@@ -88,18 +94,24 @@ module Lithic
88
94
  required :merchant, -> { Lithic::Models::Transaction::Merchant }
89
95
 
90
96
  # @!attribute merchant_amount
97
+ # @deprecated
98
+ #
91
99
  # Analogous to the 'amount', but in the merchant currency.
92
100
  #
93
101
  # @return [Integer, nil]
94
102
  required :merchant_amount, Integer, nil?: true
95
103
 
96
104
  # @!attribute merchant_authorization_amount
105
+ # @deprecated
106
+ #
97
107
  # Analogous to the 'authorization_amount', but in the merchant currency.
98
108
  #
99
109
  # @return [Integer, nil]
100
110
  required :merchant_authorization_amount, Integer, nil?: true
101
111
 
102
112
  # @!attribute merchant_currency
113
+ # @deprecated
114
+ #
103
115
  # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
104
116
  #
105
117
  # @return [String]
@@ -134,6 +146,8 @@ module Lithic
134
146
  required :result, enum: -> { Lithic::Models::Transaction::Result }
135
147
 
136
148
  # @!attribute settled_amount
149
+ # @deprecated
150
+ #
137
151
  # The settled amount of the transaction in the settlement currency.
138
152
  #
139
153
  # @return [Integer]
@@ -921,6 +935,8 @@ module Lithic
921
935
  required :token, String
922
936
 
923
937
  # @!attribute amount
938
+ # @deprecated
939
+ #
924
940
  # Amount of the event in the settlement currency.
925
941
  #
926
942
  # @return [Integer]
@@ -36,7 +36,7 @@ module Lithic
36
36
  # @param state [Symbol, Lithic::Models::CardCreateParams::State]
37
37
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
38
38
  #
39
- # @return [Lithic::Models::CardCreateResponse]
39
+ # @return [Lithic::Models::Card]
40
40
  #
41
41
  # @see Lithic::Models::CardCreateParams
42
42
  def create(params)
@@ -45,7 +45,7 @@ module Lithic
45
45
  method: :post,
46
46
  path: "v1/cards",
47
47
  body: parsed,
48
- model: Lithic::Models::CardCreateResponse,
48
+ model: Lithic::Models::Card,
49
49
  options: options
50
50
  )
51
51
  end
@@ -57,14 +57,14 @@ module Lithic
57
57
  # @param card_token [String]
58
58
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
59
59
  #
60
- # @return [Lithic::Models::CardRetrieveResponse]
60
+ # @return [Lithic::Models::Card]
61
61
  #
62
62
  # @see Lithic::Models::CardRetrieveParams
63
63
  def retrieve(card_token, params = {})
64
64
  @client.request(
65
65
  method: :get,
66
66
  path: ["v1/cards/%1$s", card_token],
67
- model: Lithic::Models::CardRetrieveResponse,
67
+ model: Lithic::Models::Card,
68
68
  options: params[:request_options]
69
69
  )
70
70
  end
@@ -87,7 +87,7 @@ module Lithic
87
87
  # @param state [Symbol, Lithic::Models::CardUpdateParams::State]
88
88
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
89
89
  #
90
- # @return [Lithic::Models::CardUpdateResponse]
90
+ # @return [Lithic::Models::Card]
91
91
  #
92
92
  # @see Lithic::Models::CardUpdateParams
93
93
  def update(card_token, params = {})
@@ -96,7 +96,7 @@ module Lithic
96
96
  method: :patch,
97
97
  path: ["v1/cards/%1$s", card_token],
98
98
  body: parsed,
99
- model: Lithic::Models::CardUpdateResponse,
99
+ model: Lithic::Models::Card,
100
100
  options: options
101
101
  )
102
102
  end
@@ -114,7 +114,7 @@ module Lithic
114
114
  # @param state [Symbol, Lithic::Models::CardListParams::State]
115
115
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
116
116
  #
117
- # @return [Lithic::Internal::CursorPage<Lithic::Models::CardListResponse>]
117
+ # @return [Lithic::Internal::CursorPage<Lithic::Models::NonPCICard>]
118
118
  #
119
119
  # @see Lithic::Models::CardListParams
120
120
  def list(params = {})
@@ -124,7 +124,7 @@ module Lithic
124
124
  path: "v1/cards",
125
125
  query: parsed.transform_keys(begin_: "begin", end_: "end"),
126
126
  page: Lithic::Internal::CursorPage,
127
- model: Lithic::Models::CardListResponse,
127
+ model: Lithic::Models::NonPCICard,
128
128
  options: options
129
129
  )
130
130
  end
@@ -149,7 +149,7 @@ module Lithic
149
149
  # @param shipping_method [Symbol, Lithic::Models::CardConvertPhysicalParams::ShippingMethod]
150
150
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
151
151
  #
152
- # @return [Lithic::Models::CardConvertPhysicalResponse]
152
+ # @return [Lithic::Models::Card]
153
153
  #
154
154
  # @see Lithic::Models::CardConvertPhysicalParams
155
155
  def convert_physical(card_token, params)
@@ -158,7 +158,7 @@ module Lithic
158
158
  method: :post,
159
159
  path: ["v1/cards/%1$s/convert_physical", card_token],
160
160
  body: parsed,
161
- model: Lithic::Models::CardConvertPhysicalResponse,
161
+ model: Lithic::Models::Card,
162
162
  options: options
163
163
  )
164
164
  end
@@ -259,7 +259,7 @@ module Lithic
259
259
  # @param shipping_method [Symbol, Lithic::Models::CardReissueParams::ShippingMethod]
260
260
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
261
261
  #
262
- # @return [Lithic::Models::CardReissueResponse]
262
+ # @return [Lithic::Models::Card]
263
263
  #
264
264
  # @see Lithic::Models::CardReissueParams
265
265
  def reissue(card_token, params = {})
@@ -268,7 +268,7 @@ module Lithic
268
268
  method: :post,
269
269
  path: ["v1/cards/%1$s/reissue", card_token],
270
270
  body: parsed,
271
- model: Lithic::Models::CardReissueResponse,
271
+ model: Lithic::Models::Card,
272
272
  options: options
273
273
  )
274
274
  end
@@ -294,7 +294,7 @@ module Lithic
294
294
  # @param shipping_method [Symbol, Lithic::Models::CardRenewParams::ShippingMethod]
295
295
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
296
296
  #
297
- # @return [Lithic::Models::CardRenewResponse]
297
+ # @return [Lithic::Models::Card]
298
298
  #
299
299
  # @see Lithic::Models::CardRenewParams
300
300
  def renew(card_token, params)
@@ -303,7 +303,7 @@ module Lithic
303
303
  method: :post,
304
304
  path: ["v1/cards/%1$s/renew", card_token],
305
305
  body: parsed,
306
- model: Lithic::Models::CardRenewResponse,
306
+ model: Lithic::Models::Card,
307
307
  options: options
308
308
  )
309
309
  end
@@ -341,7 +341,7 @@ module Lithic
341
341
  # @param pan [String]
342
342
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
343
343
  #
344
- # @return [Lithic::Models::CardSearchByPanResponse]
344
+ # @return [Lithic::Models::Card]
345
345
  #
346
346
  # @see Lithic::Models::CardSearchByPanParams
347
347
  def search_by_pan(params)
@@ -350,7 +350,7 @@ module Lithic
350
350
  method: :post,
351
351
  path: "v1/cards/search_by_pan",
352
352
  body: parsed,
353
- model: Lithic::Models::CardSearchByPanResponse,
353
+ model: Lithic::Models::Card,
354
354
  options: options
355
355
  )
356
356
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lithic
4
- VERSION = "0.1.0.pre.alpha.15"
4
+ VERSION = "0.1.0.pre.alpha.17"
5
5
  end
data/lib/lithic.rb CHANGED
@@ -19,15 +19,6 @@ require "uri"
19
19
  # We already ship the preferred sorbet manifests in the package itself.
20
20
  # `tapioca` currently does not offer us a way to opt out of unnecessary compilation.
21
21
  if Object.const_defined?(:Tapioca) && caller.chain([$PROGRAM_NAME]).chain(ARGV).grep(/tapioca/)
22
- Warning.warn(
23
- <<~WARN
24
- \n
25
- ⚠️ skipped loading of "lithic" gem under `tapioca`.
26
-
27
- This message is normal and expected if you are running a `tapioca` command, and does not impact `.rbi` generation.
28
- \n
29
- WARN
30
- )
31
22
  return
32
23
  end
33
24
 
@@ -56,6 +47,7 @@ require_relative "lithic/internal/transport/pooled_net_requester"
56
47
  require_relative "lithic/client"
57
48
  require_relative "lithic/internal/cursor_page"
58
49
  require_relative "lithic/internal/single_page"
50
+ require_relative "lithic/models/non_pci_card"
59
51
  require_relative "lithic/models/payment"
60
52
  require_relative "lithic/models/three_ds/challenge_response"
61
53
  require_relative "lithic/models/account"
@@ -121,24 +113,19 @@ require_relative "lithic/models/book_transfer_list_params"
121
113
  require_relative "lithic/models/book_transfer_response"
122
114
  require_relative "lithic/models/book_transfer_retrieve_params"
123
115
  require_relative "lithic/models/book_transfer_reverse_params"
116
+ require_relative "lithic/models/card"
124
117
  require_relative "lithic/models/card_convert_physical_params"
125
- require_relative "lithic/models/card_convert_physical_response"
126
118
  require_relative "lithic/models/card_create_params"
127
- require_relative "lithic/models/card_create_response"
128
119
  require_relative "lithic/models/card_embed_params"
129
120
  require_relative "lithic/models/card_list_params"
130
- require_relative "lithic/models/card_list_response"
131
121
  require_relative "lithic/models/card_program"
132
122
  require_relative "lithic/models/card_program_list_params"
133
123
  require_relative "lithic/models/card_program_retrieve_params"
134
124
  require_relative "lithic/models/card_provision_params"
135
125
  require_relative "lithic/models/card_provision_response"
136
126
  require_relative "lithic/models/card_reissue_params"
137
- require_relative "lithic/models/card_reissue_response"
138
127
  require_relative "lithic/models/card_renew_params"
139
- require_relative "lithic/models/card_renew_response"
140
128
  require_relative "lithic/models/card_retrieve_params"
141
- require_relative "lithic/models/card_retrieve_response"
142
129
  require_relative "lithic/models/card_retrieve_spend_limits_params"
143
130
  require_relative "lithic/models/cards/aggregate_balance_list_params"
144
131
  require_relative "lithic/models/cards/aggregate_balance_list_response"
@@ -147,10 +134,8 @@ require_relative "lithic/models/cards/balance_list_response"
147
134
  require_relative "lithic/models/cards/financial_transaction_list_params"
148
135
  require_relative "lithic/models/cards/financial_transaction_retrieve_params"
149
136
  require_relative "lithic/models/card_search_by_pan_params"
150
- require_relative "lithic/models/card_search_by_pan_response"
151
137
  require_relative "lithic/models/card_spend_limits"
152
138
  require_relative "lithic/models/card_update_params"
153
- require_relative "lithic/models/card_update_response"
154
139
  require_relative "lithic/models/carrier"
155
140
  require_relative "lithic/models/client_api_status_params"
156
141
  require_relative "lithic/models/credit_products/extended_credit"
@@ -132,10 +132,10 @@ module Lithic
132
132
  # `"https://api.example.com/v2/"`. Defaults to `ENV["LITHIC_BASE_URL"]`
133
133
  base_url: ENV["LITHIC_BASE_URL"],
134
134
  # Max number of retries to attempt after a failed retryable request.
135
- max_retries: DEFAULT_MAX_RETRIES,
136
- timeout: DEFAULT_TIMEOUT_IN_SECONDS,
137
- initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
138
- max_retry_delay: DEFAULT_MAX_RETRY_DELAY
135
+ max_retries: Lithic::Client::DEFAULT_MAX_RETRIES,
136
+ timeout: Lithic::Client::DEFAULT_TIMEOUT_IN_SECONDS,
137
+ initial_retry_delay: Lithic::Client::DEFAULT_INITIAL_RETRY_DELAY,
138
+ max_retry_delay: Lithic::Client::DEFAULT_MAX_RETRY_DELAY
139
139
  ); end
140
140
  end
141
141
  end
@@ -32,6 +32,9 @@ module Lithic
32
32
  sig { params(other: T.anything).returns(T::Boolean) }
33
33
  def ==(other); end
34
34
 
35
+ sig { returns(Integer) }
36
+ def hash; end
37
+
35
38
  # @api private
36
39
  sig do
37
40
  override
@@ -111,11 +111,17 @@ module Lithic
111
111
 
112
112
  sig { params(other: T.anything).returns(T::Boolean) }
113
113
  def ==(other); end
114
+
115
+ sig { returns(Integer) }
116
+ def hash; end
114
117
  end
115
118
 
116
119
  sig { params(other: T.anything).returns(T::Boolean) }
117
120
  def ==(other); end
118
121
 
122
+ sig { returns(Integer) }
123
+ def hash; end
124
+
119
125
  class << self
120
126
  # @api private
121
127
  sig do
@@ -197,7 +203,6 @@ module Lithic
197
203
  def inspect(depth: 0); end
198
204
  end
199
205
 
200
- # @api private
201
206
  sig { returns(String) }
202
207
  def to_s; end
203
208
 
@@ -3,6 +3,8 @@
3
3
  module Lithic
4
4
  module Internal
5
5
  module Type
6
+ # @api private
7
+ #
6
8
  # This module provides a base implementation for paginated responses in the SDK.
7
9
  module BasePage
8
10
  Elem = type_member(:out)
@@ -28,6 +28,9 @@ module Lithic
28
28
  sig { params(other: T.anything).returns(T::Boolean) }
29
29
  def ==(other); end
30
30
 
31
+ sig { returns(Integer) }
32
+ def hash; end
33
+
31
34
  # @api private
32
35
  #
33
36
  # Unlike with primitives, `Enum` additionally validates that the value is a member
@@ -32,6 +32,9 @@ module Lithic
32
32
  sig { params(other: T.anything).returns(T::Boolean) }
33
33
  def ==(other); end
34
34
 
35
+ sig { returns(Integer) }
36
+ def hash; end
37
+
35
38
  # @api private
36
39
  sig do
37
40
  override
@@ -47,6 +47,9 @@ module Lithic
47
47
  sig { params(other: T.anything).returns(T::Boolean) }
48
48
  def ==(other); end
49
49
 
50
+ sig { returns(Integer) }
51
+ def hash; end
52
+
50
53
  # @api private
51
54
  sig do
52
55
  override
@@ -1,7 +1,6 @@
1
1
  # typed: strong
2
2
 
3
3
  module Lithic
4
- # @api private
5
4
  module Internal
6
5
  # Due to the current WIP status of Shapes support in Sorbet, types referencing
7
6
  # this alias might be refined in the future.
@@ -0,0 +1,30 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class Card < Lithic::Models::NonPCICard
6
+ # Three digit cvv printed on the back of the card.
7
+ sig { returns(T.nilable(String)) }
8
+ attr_reader :cvv
9
+
10
+ sig { params(cvv: String).void }
11
+ attr_writer :cvv
12
+
13
+ # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI
14
+ # compliant to have PAN returned as a field in production. Please contact
15
+ # support@lithic.com for questions.
16
+ sig { returns(T.nilable(String)) }
17
+ attr_reader :pan
18
+
19
+ sig { params(pan: String).void }
20
+ attr_writer :pan
21
+
22
+ # Card details with potentially PCI sensitive information for Enterprise customers
23
+ sig { params(cvv: String, pan: String).returns(T.attached_class) }
24
+ def self.new(cvv: nil, pan: nil); end
25
+
26
+ sig { override.returns({cvv: String, pan: String}) }
27
+ def to_hash; end
28
+ end
29
+ end
30
+ end