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
@@ -1,390 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Lithic
4
- module Models
5
- # @see Lithic::Resources::Cards#create
6
- class CardCreateResponse < Lithic::Internal::Type::BaseModel
7
- # @!attribute token
8
- # Globally unique identifier.
9
- #
10
- # @return [String]
11
- required :token, String
12
-
13
- # @!attribute account_token
14
- # Globally unique identifier for the account to which the card belongs.
15
- #
16
- # @return [String]
17
- required :account_token, String
18
-
19
- # @!attribute card_program_token
20
- # Globally unique identifier for the card program on which the card exists.
21
- #
22
- # @return [String]
23
- required :card_program_token, String
24
-
25
- # @!attribute created
26
- # An RFC 3339 timestamp for when the card was created. UTC time zone.
27
- #
28
- # @return [Time]
29
- required :created, Time
30
-
31
- # @!attribute funding
32
- # Deprecated: Funding account for the card.
33
- #
34
- # @return [Lithic::Models::CardCreateResponse::Funding]
35
- required :funding, -> { Lithic::Models::CardCreateResponse::Funding }
36
-
37
- # @!attribute last_four
38
- # Last four digits of the card number.
39
- #
40
- # @return [String]
41
- required :last_four, String
42
-
43
- # @!attribute pin_status
44
- # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
45
- # attempts).
46
- #
47
- # @return [Symbol, Lithic::Models::CardCreateResponse::PinStatus]
48
- required :pin_status, enum: -> { Lithic::Models::CardCreateResponse::PinStatus }
49
-
50
- # @!attribute spend_limit
51
- # Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
52
- # $1,000 limit). Transaction requests above the spend limit will be declined.
53
- #
54
- # @return [Integer]
55
- required :spend_limit, Integer
56
-
57
- # @!attribute spend_limit_duration
58
- # Spend limit duration
59
- #
60
- # @return [Symbol, Lithic::Models::CardCreateResponse::SpendLimitDuration]
61
- required :spend_limit_duration, enum: -> { Lithic::Models::CardCreateResponse::SpendLimitDuration }
62
-
63
- # @!attribute state
64
- # Card state values: _ `CLOSED` - Card will no longer approve authorizations.
65
- # Closing a card cannot be undone. _ `OPEN` - Card will approve authorizations (if
66
- # they match card and account parameters). _ `PAUSED` - Card will decline
67
- # authorizations, but can be resumed at a later time. _ `PENDING_FULFILLMENT` -
68
- # The initial state for cards of type `PHYSICAL`. The card is provisioned pending
69
- # manufacturing and fulfillment. Cards in this state can accept authorizations for
70
- # e-commerce purchases, but not for "Card Present" purchases where the physical
71
- # card itself is present. \* `PENDING_ACTIVATION` - At regular intervals, cards of
72
- # type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card production
73
- # warehouse and updated to state `PENDING_ACTIVATION`. Similar to
74
- # `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce
75
- # transactions or can be added to mobile wallets. API clients should update the
76
- # card's state to `OPEN` only after the cardholder confirms receipt of the card.
77
- # In sandbox, the same daily batch fulfillment occurs, but no cards are actually
78
- # manufactured.
79
- #
80
- # @return [Symbol, Lithic::Models::CardCreateResponse::State]
81
- required :state, enum: -> { Lithic::Models::CardCreateResponse::State }
82
-
83
- # @!attribute type
84
- # Card types: _ `VIRTUAL` - Card will authorize at any merchant and can be added
85
- # to a digital wallet like Apple Pay or Google Pay (if the card program is digital
86
- # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We
87
- # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe
88
- # functionality. _ `SINGLE_USE` - Card is closed upon first successful
89
- # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first
90
- # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_
91
- # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _
92
- # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
93
- # VIRTUAL instead.
94
- #
95
- # @return [Symbol, Lithic::Models::CardCreateResponse::Type]
96
- required :type, enum: -> { Lithic::Models::CardCreateResponse::Type }
97
-
98
- # @!attribute auth_rule_tokens
99
- # List of identifiers for the Auth Rule(s) that are applied on the card. This
100
- # field is deprecated and will no longer be populated in the `Card` object. The
101
- # key will be removed from the schema in a future release. Use the `/auth_rules`
102
- # endpoints to fetch Auth Rule information instead.
103
- #
104
- # @return [Array<String>, nil]
105
- optional :auth_rule_tokens, Lithic::Internal::Type::ArrayOf[String]
106
-
107
- # @!attribute cardholder_currency
108
- # 3-character alphabetic ISO 4217 code for the currency of the cardholder.
109
- #
110
- # @return [String, nil]
111
- optional :cardholder_currency, String
112
-
113
- # @!attribute cvv
114
- # Three digit cvv printed on the back of the card.
115
- #
116
- # @return [String, nil]
117
- optional :cvv, String
118
-
119
- # @!attribute digital_card_art_token
120
- # Specifies the digital card art to be displayed in the user's digital wallet
121
- # after tokenization. This artwork must be approved by Mastercard and configured
122
- # by Lithic to use.
123
- #
124
- # @return [String, nil]
125
- optional :digital_card_art_token, String
126
-
127
- # @!attribute exp_month
128
- # Two digit (MM) expiry month.
129
- #
130
- # @return [String, nil]
131
- optional :exp_month, String
132
-
133
- # @!attribute exp_year
134
- # Four digit (yyyy) expiry year.
135
- #
136
- # @return [String, nil]
137
- optional :exp_year, String
138
-
139
- # @!attribute hostname
140
- # Hostname of card's locked merchant (will be empty if not applicable).
141
- #
142
- # @return [String, nil]
143
- optional :hostname, String
144
-
145
- # @!attribute memo
146
- # Friendly name to identify the card.
147
- #
148
- # @return [String, nil]
149
- optional :memo, String
150
-
151
- # @!attribute pan
152
- # Primary Account Number (PAN) (i.e. the card number). Customers must be PCI
153
- # compliant to have PAN returned as a field in production. Please contact
154
- # support@lithic.com for questions.
155
- #
156
- # @return [String, nil]
157
- optional :pan, String
158
-
159
- # @!attribute pending_commands
160
- # Indicates if there are offline PIN changes pending card interaction with an
161
- # offline PIN terminal. Possible commands are: CHANGE_PIN, UNBLOCK_PIN. Applicable
162
- # only to cards issued in markets supporting offline PINs.
163
- #
164
- # @return [Array<String>, nil]
165
- optional :pending_commands, Lithic::Internal::Type::ArrayOf[String]
166
-
167
- # @!attribute product_id
168
- # Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic
169
- # before use. Specifies the configuration (i.e., physical card art) that the card
170
- # should be manufactured with.
171
- #
172
- # @return [String, nil]
173
- optional :product_id, String
174
-
175
- # @!attribute replacement_for
176
- # If the card is a replacement for another card, the globally unique identifier
177
- # for the card that was replaced.
178
- #
179
- # @return [String, nil]
180
- optional :replacement_for, String, nil?: true
181
-
182
- # @!method initialize(token:, account_token:, card_program_token:, created:, funding:, last_four:, pin_status:, spend_limit:, spend_limit_duration:, state:, type:, auth_rule_tokens: nil, cardholder_currency: nil, cvv: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, hostname: nil, memo: nil, pan: nil, pending_commands: nil, product_id: nil, replacement_for: nil)
183
- # Card details with potentially PCI sensitive information for Enterprise customers
184
- #
185
- # @param token [String]
186
- # @param account_token [String]
187
- # @param card_program_token [String]
188
- # @param created [Time]
189
- # @param funding [Lithic::Models::CardCreateResponse::Funding]
190
- # @param last_four [String]
191
- # @param pin_status [Symbol, Lithic::Models::CardCreateResponse::PinStatus]
192
- # @param spend_limit [Integer]
193
- # @param spend_limit_duration [Symbol, Lithic::Models::CardCreateResponse::SpendLimitDuration]
194
- # @param state [Symbol, Lithic::Models::CardCreateResponse::State]
195
- # @param type [Symbol, Lithic::Models::CardCreateResponse::Type]
196
- # @param auth_rule_tokens [Array<String>]
197
- # @param cardholder_currency [String]
198
- # @param cvv [String]
199
- # @param digital_card_art_token [String]
200
- # @param exp_month [String]
201
- # @param exp_year [String]
202
- # @param hostname [String]
203
- # @param memo [String]
204
- # @param pan [String]
205
- # @param pending_commands [Array<String>]
206
- # @param product_id [String]
207
- # @param replacement_for [String, nil]
208
-
209
- # @see Lithic::Models::CardCreateResponse#funding
210
- class Funding < Lithic::Internal::Type::BaseModel
211
- # @!attribute token
212
- # A globally unique identifier for this FundingAccount.
213
- #
214
- # @return [String]
215
- required :token, String
216
-
217
- # @!attribute created
218
- # An RFC 3339 string representing when this funding source was added to the Lithic
219
- # account. This may be `null`. UTC time zone.
220
- #
221
- # @return [Time]
222
- required :created, Time
223
-
224
- # @!attribute last_four
225
- # The last 4 digits of the account (e.g. bank account, debit card) associated with
226
- # this FundingAccount. This may be null.
227
- #
228
- # @return [String]
229
- required :last_four, String
230
-
231
- # @!attribute state
232
- # State of funding source. Funding source states: _ `ENABLED` - The funding
233
- # account is available to use for card creation and transactions. _ `PENDING` -
234
- # The funding account is still being verified e.g. bank micro-deposits
235
- # verification. \* `DELETED` - The founding account has been deleted.
236
- #
237
- # @return [Symbol, Lithic::Models::CardCreateResponse::Funding::State]
238
- required :state, enum: -> { Lithic::Models::CardCreateResponse::Funding::State }
239
-
240
- # @!attribute type
241
- # Types of funding source: _ `DEPOSITORY_CHECKING` - Bank checking account. _
242
- # `DEPOSITORY_SAVINGS` - Bank savings account.
243
- #
244
- # @return [Symbol, Lithic::Models::CardCreateResponse::Funding::Type]
245
- required :type, enum: -> { Lithic::Models::CardCreateResponse::Funding::Type }
246
-
247
- # @!attribute account_name
248
- # Account name identifying the funding source. This may be `null`.
249
- #
250
- # @return [String, nil]
251
- optional :account_name, String
252
-
253
- # @!attribute nickname
254
- # The nickname given to the `FundingAccount` or `null` if it has no nickname.
255
- #
256
- # @return [String, nil]
257
- optional :nickname, String
258
-
259
- # @!method initialize(token:, created:, last_four:, state:, type:, account_name: nil, nickname: nil)
260
- # Deprecated: Funding account for the card.
261
- #
262
- # @param token [String]
263
- # @param created [Time]
264
- # @param last_four [String]
265
- # @param state [Symbol, Lithic::Models::CardCreateResponse::Funding::State]
266
- # @param type [Symbol, Lithic::Models::CardCreateResponse::Funding::Type]
267
- # @param account_name [String]
268
- # @param nickname [String]
269
-
270
- # State of funding source. Funding source states: _ `ENABLED` - The funding
271
- # account is available to use for card creation and transactions. _ `PENDING` -
272
- # The funding account is still being verified e.g. bank micro-deposits
273
- # verification. \* `DELETED` - The founding account has been deleted.
274
- #
275
- # @see Lithic::Models::CardCreateResponse::Funding#state
276
- module State
277
- extend Lithic::Internal::Type::Enum
278
-
279
- DELETED = :DELETED
280
- ENABLED = :ENABLED
281
- PENDING = :PENDING
282
-
283
- # @!method self.values
284
- # @return [Array<Symbol>]
285
- end
286
-
287
- # Types of funding source: _ `DEPOSITORY_CHECKING` - Bank checking account. _
288
- # `DEPOSITORY_SAVINGS` - Bank savings account.
289
- #
290
- # @see Lithic::Models::CardCreateResponse::Funding#type
291
- module Type
292
- extend Lithic::Internal::Type::Enum
293
-
294
- DEPOSITORY_CHECKING = :DEPOSITORY_CHECKING
295
- DEPOSITORY_SAVINGS = :DEPOSITORY_SAVINGS
296
-
297
- # @!method self.values
298
- # @return [Array<Symbol>]
299
- end
300
- end
301
-
302
- # Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
303
- # attempts).
304
- #
305
- # @see Lithic::Models::CardCreateResponse#pin_status
306
- module PinStatus
307
- extend Lithic::Internal::Type::Enum
308
-
309
- OK = :OK
310
- BLOCKED = :BLOCKED
311
- NOT_SET = :NOT_SET
312
-
313
- # @!method self.values
314
- # @return [Array<Symbol>]
315
- end
316
-
317
- # Spend limit duration
318
- #
319
- # @see Lithic::Models::CardCreateResponse#spend_limit_duration
320
- module SpendLimitDuration
321
- extend Lithic::Internal::Type::Enum
322
-
323
- ANNUALLY = :ANNUALLY
324
- FOREVER = :FOREVER
325
- MONTHLY = :MONTHLY
326
- TRANSACTION = :TRANSACTION
327
- DAILY = :DAILY
328
-
329
- # @!method self.values
330
- # @return [Array<Symbol>]
331
- end
332
-
333
- # Card state values: _ `CLOSED` - Card will no longer approve authorizations.
334
- # Closing a card cannot be undone. _ `OPEN` - Card will approve authorizations (if
335
- # they match card and account parameters). _ `PAUSED` - Card will decline
336
- # authorizations, but can be resumed at a later time. _ `PENDING_FULFILLMENT` -
337
- # The initial state for cards of type `PHYSICAL`. The card is provisioned pending
338
- # manufacturing and fulfillment. Cards in this state can accept authorizations for
339
- # e-commerce purchases, but not for "Card Present" purchases where the physical
340
- # card itself is present. \* `PENDING_ACTIVATION` - At regular intervals, cards of
341
- # type `PHYSICAL` in state `PENDING_FULFILLMENT` are sent to the card production
342
- # warehouse and updated to state `PENDING_ACTIVATION`. Similar to
343
- # `PENDING_FULFILLMENT`, cards in this state can be used for e-commerce
344
- # transactions or can be added to mobile wallets. API clients should update the
345
- # card's state to `OPEN` only after the cardholder confirms receipt of the card.
346
- # In sandbox, the same daily batch fulfillment occurs, but no cards are actually
347
- # manufactured.
348
- #
349
- # @see Lithic::Models::CardCreateResponse#state
350
- module State
351
- extend Lithic::Internal::Type::Enum
352
-
353
- CLOSED = :CLOSED
354
- OPEN = :OPEN
355
- PAUSED = :PAUSED
356
- PENDING_ACTIVATION = :PENDING_ACTIVATION
357
- PENDING_FULFILLMENT = :PENDING_FULFILLMENT
358
-
359
- # @!method self.values
360
- # @return [Array<Symbol>]
361
- end
362
-
363
- # Card types: _ `VIRTUAL` - Card will authorize at any merchant and can be added
364
- # to a digital wallet like Apple Pay or Google Pay (if the card program is digital
365
- # wallet-enabled). _ `PHYSICAL` - Manufactured and sent to the cardholder. We
366
- # offer white label branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe
367
- # functionality. _ `SINGLE_USE` - Card is closed upon first successful
368
- # authorization. _ `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first
369
- # merchant that successfully authorizes the card. _ `UNLOCKED` - _[Deprecated]_
370
- # Similar behavior to VIRTUAL cards, please use VIRTUAL instead. _
371
- # `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
372
- # VIRTUAL instead.
373
- #
374
- # @see Lithic::Models::CardCreateResponse#type
375
- module Type
376
- extend Lithic::Internal::Type::Enum
377
-
378
- MERCHANT_LOCKED = :MERCHANT_LOCKED
379
- PHYSICAL = :PHYSICAL
380
- SINGLE_USE = :SINGLE_USE
381
- VIRTUAL = :VIRTUAL
382
- UNLOCKED = :UNLOCKED
383
- DIGITAL_WALLET = :DIGITAL_WALLET
384
-
385
- # @!method self.values
386
- # @return [Array<Symbol>]
387
- end
388
- end
389
- end
390
- end