lithic 0.1.0.pre.alpha.2 → 0.1.0.pre.alpha.4

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 (494) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +4 -4
  3. data/lib/lithic/client.rb +8 -6
  4. data/lib/lithic/errors.rb +195 -158
  5. data/lib/lithic/models/account.rb +7 -0
  6. data/lib/lithic/models/account_holder.rb +13 -0
  7. data/lib/lithic/models/account_holder_create_params.rb +1 -0
  8. data/lib/lithic/models/account_holder_create_response.rb +3 -0
  9. data/lib/lithic/models/account_holder_list_documents_params.rb +1 -0
  10. data/lib/lithic/models/account_holder_list_documents_response.rb +1 -0
  11. data/lib/lithic/models/account_holder_list_params.rb +1 -0
  12. data/lib/lithic/models/account_holder_retrieve_document_params.rb +1 -0
  13. data/lib/lithic/models/account_holder_retrieve_params.rb +1 -0
  14. data/lib/lithic/models/account_holder_simulate_enrollment_document_review_params.rb +1 -0
  15. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
  16. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +15 -0
  17. data/lib/lithic/models/account_holder_update_params.rb +1 -0
  18. data/lib/lithic/models/account_holder_update_response.rb +16 -0
  19. data/lib/lithic/models/account_holder_upload_document_params.rb +1 -0
  20. data/lib/lithic/models/account_list_params.rb +1 -0
  21. data/lib/lithic/models/account_retrieve_params.rb +1 -0
  22. data/lib/lithic/models/account_retrieve_spend_limits_params.rb +1 -0
  23. data/lib/lithic/models/account_spend_limits.rb +4 -0
  24. data/lib/lithic/models/account_update_params.rb +1 -0
  25. data/lib/lithic/models/aggregate_balance.rb +3 -0
  26. data/lib/lithic/models/aggregate_balance_list_params.rb +1 -0
  27. data/lib/lithic/models/api_status.rb +1 -0
  28. data/lib/lithic/models/auth_rules/auth_rule.rb +2 -0
  29. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +4 -0
  30. data/lib/lithic/models/auth_rules/v2/backtest_create_params.rb +1 -0
  31. data/lib/lithic/models/auth_rules/v2/backtest_create_response.rb +1 -0
  32. data/lib/lithic/models/auth_rules/v2/backtest_results.rb +5 -0
  33. data/lib/lithic/models/auth_rules/v2/backtest_retrieve_params.rb +1 -0
  34. data/lib/lithic/models/auth_rules/v2_apply_params.rb +1 -0
  35. data/lib/lithic/models/auth_rules/v2_apply_response.rb +11 -0
  36. data/lib/lithic/models/auth_rules/v2_create_params.rb +1 -0
  37. data/lib/lithic/models/auth_rules/v2_create_response.rb +11 -0
  38. data/lib/lithic/models/auth_rules/v2_delete_params.rb +1 -0
  39. data/lib/lithic/models/auth_rules/v2_draft_params.rb +1 -0
  40. data/lib/lithic/models/auth_rules/v2_draft_response.rb +11 -0
  41. data/lib/lithic/models/auth_rules/v2_list_params.rb +1 -0
  42. data/lib/lithic/models/auth_rules/v2_list_response.rb +11 -0
  43. data/lib/lithic/models/auth_rules/v2_promote_params.rb +1 -0
  44. data/lib/lithic/models/auth_rules/v2_promote_response.rb +11 -0
  45. data/lib/lithic/models/auth_rules/v2_report_params.rb +1 -0
  46. data/lib/lithic/models/auth_rules/v2_report_response.rb +1 -0
  47. data/lib/lithic/models/auth_rules/v2_retrieve_params.rb +1 -0
  48. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +11 -0
  49. data/lib/lithic/models/auth_rules/v2_update_params.rb +1 -0
  50. data/lib/lithic/models/auth_rules/v2_update_response.rb +11 -0
  51. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +4 -0
  52. data/lib/lithic/models/auth_stream_enrollment_retrieve_secret_params.rb +1 -0
  53. data/lib/lithic/models/auth_stream_enrollment_rotate_secret_params.rb +1 -0
  54. data/lib/lithic/models/auth_stream_secret.rb +1 -0
  55. data/lib/lithic/models/balance.rb +3 -0
  56. data/lib/lithic/models/balance_list_params.rb +1 -0
  57. data/lib/lithic/models/book_transfer_create_params.rb +1 -0
  58. data/lib/lithic/models/book_transfer_list_params.rb +1 -0
  59. data/lib/lithic/models/book_transfer_response.rb +9 -0
  60. data/lib/lithic/models/book_transfer_retrieve_params.rb +1 -0
  61. data/lib/lithic/models/book_transfer_reverse_params.rb +1 -0
  62. data/lib/lithic/models/card.rb +12 -0
  63. data/lib/lithic/models/card_convert_physical_params.rb +2 -1
  64. data/lib/lithic/models/card_create_params.rb +2 -1
  65. data/lib/lithic/models/card_embed_params.rb +1 -0
  66. data/lib/lithic/models/card_list_params.rb +1 -0
  67. data/lib/lithic/models/card_program.rb +1 -0
  68. data/lib/lithic/models/card_program_list_params.rb +1 -0
  69. data/lib/lithic/models/card_program_retrieve_params.rb +1 -0
  70. data/lib/lithic/models/card_provision_params.rb +1 -0
  71. data/lib/lithic/models/card_provision_response.rb +1 -0
  72. data/lib/lithic/models/card_reissue_params.rb +2 -1
  73. data/lib/lithic/models/card_renew_params.rb +2 -1
  74. data/lib/lithic/models/card_retrieve_params.rb +1 -0
  75. data/lib/lithic/models/card_retrieve_spend_limits_params.rb +1 -0
  76. data/lib/lithic/models/card_search_by_pan_params.rb +1 -0
  77. data/lib/lithic/models/card_spend_limits.rb +4 -0
  78. data/lib/lithic/models/card_update_params.rb +1 -0
  79. data/lib/lithic/models/cards/aggregate_balance_list_params.rb +1 -0
  80. data/lib/lithic/models/cards/aggregate_balance_list_response.rb +1 -0
  81. data/lib/lithic/models/cards/balance_list_params.rb +1 -0
  82. data/lib/lithic/models/cards/balance_list_response.rb +3 -0
  83. data/lib/lithic/models/cards/financial_transaction_list_params.rb +1 -0
  84. data/lib/lithic/models/cards/financial_transaction_retrieve_params.rb +1 -0
  85. data/lib/lithic/models/client_api_status_params.rb +1 -0
  86. data/lib/lithic/models/credit_products/extended_credit.rb +1 -0
  87. data/lib/lithic/models/credit_products/extended_credit_retrieve_params.rb +1 -0
  88. data/lib/lithic/models/credit_products/prime_rate_create_params.rb +1 -0
  89. data/lib/lithic/models/credit_products/prime_rate_retrieve_params.rb +1 -0
  90. data/lib/lithic/models/credit_products/prime_rate_retrieve_response.rb +1 -0
  91. data/lib/lithic/models/digital_card_art.rb +3 -0
  92. data/lib/lithic/models/digital_card_art_list_params.rb +1 -0
  93. data/lib/lithic/models/digital_card_art_retrieve_params.rb +1 -0
  94. data/lib/lithic/models/dispute.rb +7 -0
  95. data/lib/lithic/models/dispute_create_params.rb +1 -0
  96. data/lib/lithic/models/dispute_delete_evidence_params.rb +1 -0
  97. data/lib/lithic/models/dispute_delete_params.rb +1 -0
  98. data/lib/lithic/models/dispute_evidence.rb +3 -0
  99. data/lib/lithic/models/dispute_initiate_evidence_upload_params.rb +1 -0
  100. data/lib/lithic/models/dispute_list_evidences_params.rb +1 -0
  101. data/lib/lithic/models/dispute_list_params.rb +1 -0
  102. data/lib/lithic/models/dispute_retrieve_evidence_params.rb +1 -0
  103. data/lib/lithic/models/dispute_retrieve_params.rb +1 -0
  104. data/lib/lithic/models/dispute_update_params.rb +1 -0
  105. data/lib/lithic/models/document.rb +6 -0
  106. data/lib/lithic/models/event.rb +3 -0
  107. data/lib/lithic/models/event_list_attempts_params.rb +1 -0
  108. data/lib/lithic/models/event_list_params.rb +1 -0
  109. data/lib/lithic/models/event_retrieve_params.rb +1 -0
  110. data/lib/lithic/models/events/subscription_create_params.rb +1 -0
  111. data/lib/lithic/models/events/subscription_delete_params.rb +1 -0
  112. data/lib/lithic/models/events/subscription_list_attempts_params.rb +1 -0
  113. data/lib/lithic/models/events/subscription_list_params.rb +1 -0
  114. data/lib/lithic/models/events/subscription_recover_params.rb +1 -0
  115. data/lib/lithic/models/events/subscription_replay_missing_params.rb +1 -0
  116. data/lib/lithic/models/events/subscription_retrieve_params.rb +1 -0
  117. data/lib/lithic/models/events/subscription_retrieve_secret_params.rb +1 -0
  118. data/lib/lithic/models/events/subscription_retrieve_secret_response.rb +1 -0
  119. data/lib/lithic/models/events/subscription_rotate_secret_params.rb +1 -0
  120. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  121. data/lib/lithic/models/events/subscription_update_params.rb +1 -0
  122. data/lib/lithic/models/external_bank_account_create_params.rb +1 -0
  123. data/lib/lithic/models/external_bank_account_create_response.rb +11 -0
  124. data/lib/lithic/models/external_bank_account_list_params.rb +1 -0
  125. data/lib/lithic/models/external_bank_account_list_response.rb +11 -0
  126. data/lib/lithic/models/external_bank_account_retrieve_params.rb +1 -0
  127. data/lib/lithic/models/external_bank_account_retrieve_response.rb +11 -0
  128. data/lib/lithic/models/external_bank_account_retry_micro_deposits_params.rb +1 -0
  129. data/lib/lithic/models/external_bank_account_retry_micro_deposits_response.rb +11 -0
  130. data/lib/lithic/models/external_bank_account_retry_prenote_params.rb +1 -0
  131. data/lib/lithic/models/external_bank_account_retry_prenote_response.rb +7 -0
  132. data/lib/lithic/models/external_bank_account_update_params.rb +1 -0
  133. data/lib/lithic/models/external_bank_account_update_response.rb +11 -0
  134. data/lib/lithic/models/external_bank_accounts/micro_deposit_create_params.rb +1 -0
  135. data/lib/lithic/models/external_bank_accounts/micro_deposit_create_response.rb +11 -0
  136. data/lib/lithic/models/external_payment.rb +7 -0
  137. data/lib/lithic/models/external_payment_cancel_params.rb +1 -0
  138. data/lib/lithic/models/external_payment_create_params.rb +1 -0
  139. data/lib/lithic/models/external_payment_list_params.rb +1 -0
  140. data/lib/lithic/models/external_payment_release_params.rb +1 -0
  141. data/lib/lithic/models/external_payment_retrieve_params.rb +1 -0
  142. data/lib/lithic/models/external_payment_reverse_params.rb +1 -0
  143. data/lib/lithic/models/external_payment_settle_params.rb +1 -0
  144. data/lib/lithic/models/financial_account.rb +11 -0
  145. data/lib/lithic/models/financial_account_create_params.rb +1 -0
  146. data/lib/lithic/models/financial_account_list_params.rb +1 -0
  147. data/lib/lithic/models/financial_account_retrieve_params.rb +1 -0
  148. data/lib/lithic/models/financial_account_update_params.rb +1 -0
  149. data/lib/lithic/models/financial_account_update_status_params.rb +1 -0
  150. data/lib/lithic/models/financial_accounts/balance_list_params.rb +1 -0
  151. data/lib/lithic/models/financial_accounts/balance_list_response.rb +3 -0
  152. data/lib/lithic/models/financial_accounts/credit_configuration_retrieve_params.rb +1 -0
  153. data/lib/lithic/models/financial_accounts/credit_configuration_update_params.rb +1 -0
  154. data/lib/lithic/models/financial_accounts/financial_account_credit_config.rb +5 -0
  155. data/lib/lithic/models/financial_accounts/financial_transaction_list_params.rb +1 -0
  156. data/lib/lithic/models/financial_accounts/financial_transaction_retrieve_params.rb +1 -0
  157. data/lib/lithic/models/financial_accounts/loan_tape.rb +24 -0
  158. data/lib/lithic/models/financial_accounts/loan_tape_list_params.rb +1 -0
  159. data/lib/lithic/models/financial_accounts/loan_tape_retrieve_params.rb +1 -0
  160. data/lib/lithic/models/financial_accounts/statement.rb +17 -0
  161. data/lib/lithic/models/financial_accounts/statement_list_params.rb +1 -0
  162. data/lib/lithic/models/financial_accounts/statement_retrieve_params.rb +1 -0
  163. data/lib/lithic/models/financial_accounts/statements/line_item_list_params.rb +1 -0
  164. data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +2 -0
  165. data/lib/lithic/models/financial_transaction.rb +9 -0
  166. data/lib/lithic/models/kyb.rb +4 -0
  167. data/lib/lithic/models/kyb_business_entity.rb +1 -0
  168. data/lib/lithic/models/kyc.rb +3 -0
  169. data/lib/lithic/models/kyc_exempt.rb +4 -0
  170. data/lib/lithic/models/management_operation_create_params.rb +1 -0
  171. data/lib/lithic/models/management_operation_list_params.rb +1 -0
  172. data/lib/lithic/models/management_operation_retrieve_params.rb +1 -0
  173. data/lib/lithic/models/management_operation_reverse_params.rb +1 -0
  174. data/lib/lithic/models/management_operation_transaction.rb +7 -0
  175. data/lib/lithic/models/message_attempt.rb +3 -0
  176. data/lib/lithic/models/payment.rb +16 -0
  177. data/lib/lithic/models/payment_create_params.rb +2 -0
  178. data/lib/lithic/models/payment_create_response.rb +1 -0
  179. data/lib/lithic/models/payment_list_params.rb +1 -0
  180. data/lib/lithic/models/payment_retrieve_params.rb +1 -0
  181. data/lib/lithic/models/payment_retry_params.rb +1 -0
  182. data/lib/lithic/models/payment_retry_response.rb +1 -0
  183. data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
  184. data/lib/lithic/models/payment_simulate_action_response.rb +3 -0
  185. data/lib/lithic/models/payment_simulate_receipt_params.rb +1 -0
  186. data/lib/lithic/models/payment_simulate_receipt_response.rb +3 -0
  187. data/lib/lithic/models/payment_simulate_release_params.rb +1 -0
  188. data/lib/lithic/models/payment_simulate_release_response.rb +3 -0
  189. data/lib/lithic/models/payment_simulate_return_params.rb +1 -0
  190. data/lib/lithic/models/payment_simulate_return_response.rb +3 -0
  191. data/lib/lithic/models/reports/settlement/network_total_list_params.rb +1 -0
  192. data/lib/lithic/models/reports/settlement/network_total_list_response.rb +4 -0
  193. data/lib/lithic/models/reports/settlement/network_total_retrieve_params.rb +1 -0
  194. data/lib/lithic/models/reports/settlement/network_total_retrieve_response.rb +4 -0
  195. data/lib/lithic/models/reports/settlement_list_details_params.rb +1 -0
  196. data/lib/lithic/models/reports/settlement_summary_params.rb +1 -0
  197. data/lib/lithic/models/responder_endpoint_check_status_params.rb +1 -0
  198. data/lib/lithic/models/responder_endpoint_create_params.rb +1 -0
  199. data/lib/lithic/models/responder_endpoint_create_response.rb +1 -0
  200. data/lib/lithic/models/responder_endpoint_delete_params.rb +1 -0
  201. data/lib/lithic/models/responder_endpoint_status.rb +1 -0
  202. data/lib/lithic/models/settlement_detail.rb +5 -0
  203. data/lib/lithic/models/settlement_summary_details.rb +2 -0
  204. data/lib/lithic/models/three_ds/authentication_retrieve_params.rb +1 -0
  205. data/lib/lithic/models/three_ds/authentication_retrieve_response.rb +45 -0
  206. data/lib/lithic/models/three_ds/authentication_simulate_otp_entry_params.rb +1 -0
  207. data/lib/lithic/models/three_ds/authentication_simulate_params.rb +1 -0
  208. data/lib/lithic/models/three_ds/authentication_simulate_response.rb +1 -0
  209. data/lib/lithic/models/three_ds/decisioning_challenge_response_params.rb +1 -0
  210. data/lib/lithic/models/three_ds/decisioning_retrieve_secret_params.rb +1 -0
  211. data/lib/lithic/models/three_ds/decisioning_retrieve_secret_response.rb +1 -0
  212. data/lib/lithic/models/three_ds/decisioning_rotate_secret_params.rb +1 -0
  213. data/lib/lithic/models/tokenization.rb +11 -0
  214. data/lib/lithic/models/tokenization_activate_params.rb +1 -0
  215. data/lib/lithic/models/tokenization_deactivate_params.rb +1 -0
  216. data/lib/lithic/models/tokenization_decisioning_retrieve_secret_params.rb +1 -0
  217. data/lib/lithic/models/tokenization_decisioning_rotate_secret_params.rb +1 -0
  218. data/lib/lithic/models/tokenization_decisioning_rotate_secret_response.rb +1 -0
  219. data/lib/lithic/models/tokenization_list_params.rb +1 -0
  220. data/lib/lithic/models/tokenization_pause_params.rb +1 -0
  221. data/lib/lithic/models/tokenization_resend_activation_code_params.rb +1 -0
  222. data/lib/lithic/models/tokenization_retrieve_params.rb +1 -0
  223. data/lib/lithic/models/tokenization_retrieve_response.rb +1 -0
  224. data/lib/lithic/models/tokenization_secret.rb +1 -0
  225. data/lib/lithic/models/tokenization_simulate_params.rb +1 -0
  226. data/lib/lithic/models/tokenization_simulate_response.rb +1 -0
  227. data/lib/lithic/models/tokenization_unpause_params.rb +1 -0
  228. data/lib/lithic/models/tokenization_update_digital_card_art_params.rb +1 -0
  229. data/lib/lithic/models/tokenization_update_digital_card_art_response.rb +1 -0
  230. data/lib/lithic/models/transaction.rb +60 -1
  231. data/lib/lithic/models/transaction_expire_authorization_params.rb +1 -0
  232. data/lib/lithic/models/transaction_list_params.rb +1 -0
  233. data/lib/lithic/models/transaction_retrieve_params.rb +1 -0
  234. data/lib/lithic/models/transaction_simulate_authorization_advice_params.rb +1 -0
  235. data/lib/lithic/models/transaction_simulate_authorization_advice_response.rb +1 -0
  236. data/lib/lithic/models/transaction_simulate_authorization_params.rb +1 -0
  237. data/lib/lithic/models/transaction_simulate_authorization_response.rb +1 -0
  238. data/lib/lithic/models/transaction_simulate_clearing_params.rb +1 -0
  239. data/lib/lithic/models/transaction_simulate_clearing_response.rb +1 -0
  240. data/lib/lithic/models/transaction_simulate_credit_authorization_params.rb +1 -0
  241. data/lib/lithic/models/transaction_simulate_credit_authorization_response.rb +1 -0
  242. data/lib/lithic/models/transaction_simulate_return_params.rb +1 -0
  243. data/lib/lithic/models/transaction_simulate_return_response.rb +1 -0
  244. data/lib/lithic/models/transaction_simulate_return_reversal_params.rb +1 -0
  245. data/lib/lithic/models/transaction_simulate_return_reversal_response.rb +1 -0
  246. data/lib/lithic/models/transaction_simulate_void_params.rb +1 -0
  247. data/lib/lithic/models/transaction_simulate_void_response.rb +1 -0
  248. data/lib/lithic/models/transactions/enhanced_commercial_data_retrieve_params.rb +1 -0
  249. data/lib/lithic/models/transactions/enhanced_commercial_data_retrieve_response.rb +1 -0
  250. data/lib/lithic/models/transactions/events/enhanced_commercial_data_retrieve_params.rb +1 -0
  251. data/lib/lithic/models/transactions/events/enhanced_data.rb +13 -0
  252. data/lib/lithic/models/transfer.rb +10 -0
  253. data/lib/lithic/models/transfer_create_params.rb +1 -0
  254. data/lib/lithic/resources/account_holders.rb +106 -218
  255. data/lib/lithic/resources/accounts.rb +34 -52
  256. data/lib/lithic/resources/aggregate_balances.rb +7 -4
  257. data/lib/lithic/resources/auth_rules/v2/backtests.rb +17 -16
  258. data/lib/lithic/resources/auth_rules/v2.rb +75 -91
  259. data/lib/lithic/resources/auth_rules.rb +2 -0
  260. data/lib/lithic/resources/auth_stream_enrollment.rb +10 -4
  261. data/lib/lithic/resources/balances.rb +10 -11
  262. data/lib/lithic/resources/book_transfers.rb +44 -65
  263. data/lib/lithic/resources/card_programs.rb +15 -15
  264. data/lib/lithic/resources/cards/aggregate_balances.rb +8 -6
  265. data/lib/lithic/resources/cards/balances.rb +10 -11
  266. data/lib/lithic/resources/cards/financial_transactions.rb +22 -30
  267. data/lib/lithic/resources/cards.rb +115 -305
  268. data/lib/lithic/resources/credit_products/extended_credit.rb +8 -5
  269. data/lib/lithic/resources/credit_products/prime_rates.rb +18 -18
  270. data/lib/lithic/resources/credit_products.rb +2 -0
  271. data/lib/lithic/resources/digital_card_art.rb +15 -18
  272. data/lib/lithic/resources/disputes.rb +76 -95
  273. data/lib/lithic/resources/events/subscriptions.rb +86 -105
  274. data/lib/lithic/resources/events.rb +31 -46
  275. data/lib/lithic/resources/external_bank_accounts/micro_deposits.rb +9 -7
  276. data/lib/lithic/resources/external_bank_accounts.rb +73 -108
  277. data/lib/lithic/resources/external_payments.rb +69 -91
  278. data/lib/lithic/resources/financial_accounts/balances.rb +10 -11
  279. data/lib/lithic/resources/financial_accounts/credit_configuration.rb +18 -18
  280. data/lib/lithic/resources/financial_accounts/financial_transactions.rb +22 -30
  281. data/lib/lithic/resources/financial_accounts/loan_tapes.rb +20 -26
  282. data/lib/lithic/resources/financial_accounts/statements/line_items.rb +12 -16
  283. data/lib/lithic/resources/financial_accounts/statements.rb +21 -28
  284. data/lib/lithic/resources/financial_accounts.rb +39 -41
  285. data/lib/lithic/resources/management_operations.rb +44 -62
  286. data/lib/lithic/resources/payments.rb +73 -94
  287. data/lib/lithic/resources/reports/settlement/network_totals.rb +24 -35
  288. data/lib/lithic/resources/reports/settlement.rb +17 -18
  289. data/lib/lithic/resources/reports.rb +2 -0
  290. data/lib/lithic/resources/responder_endpoints.rb +18 -14
  291. data/lib/lithic/resources/three_ds/authentication.rb +22 -23
  292. data/lib/lithic/resources/three_ds/decisioning.rb +16 -13
  293. data/lib/lithic/resources/three_ds.rb +2 -0
  294. data/lib/lithic/resources/tokenization_decisioning.rb +10 -4
  295. data/lib/lithic/resources/tokenizations.rb +70 -86
  296. data/lib/lithic/resources/transactions/enhanced_commercial_data.rb +8 -5
  297. data/lib/lithic/resources/transactions/events/enhanced_commercial_data.rb +8 -5
  298. data/lib/lithic/resources/transactions/events.rb +2 -0
  299. data/lib/lithic/resources/transactions.rb +81 -144
  300. data/lib/lithic/resources/transfers.rb +11 -16
  301. data/lib/lithic/transport/base_client.rb +9 -9
  302. data/lib/lithic/transport/pooled_net_requester.rb +1 -1
  303. data/lib/lithic/type/base_model.rb +10 -0
  304. data/lib/lithic/type/base_page.rb +1 -1
  305. data/lib/lithic/util.rb +8 -12
  306. data/lib/lithic/version.rb +1 -1
  307. data/rbi/lib/lithic/client.rbi +3 -3
  308. data/rbi/lib/lithic/errors.rbi +145 -115
  309. data/rbi/lib/lithic/models/account.rbi +1 -1
  310. data/rbi/lib/lithic/models/account_financial_account_type.rbi +2 -1
  311. data/rbi/lib/lithic/models/account_holder.rbi +8 -6
  312. data/rbi/lib/lithic/models/account_holder_create_params.rbi +2 -2
  313. data/rbi/lib/lithic/models/account_holder_create_response.rbi +2 -2
  314. data/rbi/lib/lithic/models/account_holder_simulate_enrollment_document_review_params.rbi +8 -1
  315. data/rbi/lib/lithic/models/account_holder_simulate_enrollment_review_params.rbi +8 -2
  316. data/rbi/lib/lithic/models/account_holder_simulate_enrollment_review_response.rbi +24 -4
  317. data/rbi/lib/lithic/models/account_holder_update_response.rbi +18 -2
  318. data/rbi/lib/lithic/models/account_holder_upload_document_params.rbi +1 -1
  319. data/rbi/lib/lithic/models/account_update_params.rbi +2 -1
  320. data/rbi/lib/lithic/models/aggregate_balance.rbi +1 -1
  321. data/rbi/lib/lithic/models/aggregate_balance_list_params.rbi +1 -1
  322. data/rbi/lib/lithic/models/auth_rules/auth_rule.rbi +2 -1
  323. data/rbi/lib/lithic/models/auth_rules/auth_rule_condition.rbi +1 -1
  324. data/rbi/lib/lithic/models/auth_rules/conditional_attribute.rbi +2 -1
  325. data/rbi/lib/lithic/models/auth_rules/v2_apply_response.rbi +3 -2
  326. data/rbi/lib/lithic/models/auth_rules/v2_create_params.rbi +2 -1
  327. data/rbi/lib/lithic/models/auth_rules/v2_create_response.rbi +2 -2
  328. data/rbi/lib/lithic/models/auth_rules/v2_draft_response.rbi +3 -2
  329. data/rbi/lib/lithic/models/auth_rules/v2_list_response.rbi +4 -2
  330. data/rbi/lib/lithic/models/auth_rules/v2_promote_response.rbi +2 -2
  331. data/rbi/lib/lithic/models/auth_rules/v2_retrieve_response.rbi +2 -2
  332. data/rbi/lib/lithic/models/auth_rules/v2_update_params.rbi +2 -1
  333. data/rbi/lib/lithic/models/auth_rules/v2_update_response.rbi +2 -2
  334. data/rbi/lib/lithic/models/auth_rules/velocity_limit_params.rbi +1 -1
  335. data/rbi/lib/lithic/models/auth_rules/velocity_limit_params_period_window.rbi +1 -1
  336. data/rbi/lib/lithic/models/balance.rbi +2 -1
  337. data/rbi/lib/lithic/models/balance_list_params.rbi +1 -1
  338. data/rbi/lib/lithic/models/book_transfer_create_params.rbi +3 -2
  339. data/rbi/lib/lithic/models/book_transfer_list_params.rbi +6 -3
  340. data/rbi/lib/lithic/models/book_transfer_response.rbi +8 -5
  341. data/rbi/lib/lithic/models/card.rbi +5 -5
  342. data/rbi/lib/lithic/models/card_convert_physical_params.rbi +3 -2
  343. data/rbi/lib/lithic/models/card_create_params.rbi +5 -4
  344. data/rbi/lib/lithic/models/card_list_params.rbi +1 -1
  345. data/rbi/lib/lithic/models/card_provision_params.rbi +1 -1
  346. data/rbi/lib/lithic/models/card_reissue_params.rbi +2 -2
  347. data/rbi/lib/lithic/models/card_renew_params.rbi +3 -2
  348. data/rbi/lib/lithic/models/card_update_params.rbi +3 -2
  349. data/rbi/lib/lithic/models/cards/balance_list_response.rbi +2 -1
  350. data/rbi/lib/lithic/models/cards/financial_transaction_list_params.rbi +3 -3
  351. data/rbi/lib/lithic/models/digital_card_art.rbi +2 -1
  352. data/rbi/lib/lithic/models/dispute.rbi +4 -3
  353. data/rbi/lib/lithic/models/dispute_create_params.rbi +2 -1
  354. data/rbi/lib/lithic/models/dispute_evidence.rbi +2 -1
  355. data/rbi/lib/lithic/models/dispute_list_params.rbi +2 -1
  356. data/rbi/lib/lithic/models/dispute_update_params.rbi +2 -1
  357. data/rbi/lib/lithic/models/document.rbi +4 -4
  358. data/rbi/lib/lithic/models/event.rbi +1 -1
  359. data/rbi/lib/lithic/models/event_list_attempts_params.rbi +2 -1
  360. data/rbi/lib/lithic/models/event_list_params.rbi +2 -1
  361. data/rbi/lib/lithic/models/event_subscription.rbi +2 -1
  362. data/rbi/lib/lithic/models/events/subscription_create_params.rbi +1 -1
  363. data/rbi/lib/lithic/models/events/subscription_list_attempts_params.rbi +1 -1
  364. data/rbi/lib/lithic/models/events/subscription_send_simulated_example_params.rbi +7 -1
  365. data/rbi/lib/lithic/models/events/subscription_update_params.rbi +1 -1
  366. data/rbi/lib/lithic/models/external_bank_account_create_params.rbi +2 -2
  367. data/rbi/lib/lithic/models/external_bank_account_create_response.rbi +5 -5
  368. data/rbi/lib/lithic/models/external_bank_account_list_params.rbi +3 -3
  369. data/rbi/lib/lithic/models/external_bank_account_list_response.rbi +5 -5
  370. data/rbi/lib/lithic/models/external_bank_account_retrieve_response.rbi +17 -5
  371. data/rbi/lib/lithic/models/external_bank_account_retry_micro_deposits_response.rbi +11 -3
  372. data/rbi/lib/lithic/models/external_bank_account_retry_prenote_response.rbi +9 -3
  373. data/rbi/lib/lithic/models/external_bank_account_update_params.rbi +1 -1
  374. data/rbi/lib/lithic/models/external_bank_account_update_response.rbi +5 -5
  375. data/rbi/lib/lithic/models/external_bank_accounts/micro_deposit_create_response.rbi +23 -3
  376. data/rbi/lib/lithic/models/external_payment.rbi +11 -7
  377. data/rbi/lib/lithic/models/external_payment_create_params.rbi +3 -3
  378. data/rbi/lib/lithic/models/external_payment_list_params.rbi +3 -3
  379. data/rbi/lib/lithic/models/external_payment_settle_params.rbi +1 -1
  380. data/rbi/lib/lithic/models/financial_account.rbi +17 -5
  381. data/rbi/lib/lithic/models/financial_account_create_params.rbi +1 -1
  382. data/rbi/lib/lithic/models/financial_account_list_params.rbi +2 -1
  383. data/rbi/lib/lithic/models/financial_account_update_status_params.rbi +8 -2
  384. data/rbi/lib/lithic/models/financial_accounts/balance_list_response.rbi +1 -1
  385. data/rbi/lib/lithic/models/financial_accounts/financial_account_credit_config.rbi +2 -0
  386. data/rbi/lib/lithic/models/financial_accounts/financial_transaction_list_params.rbi +21 -3
  387. data/rbi/lib/lithic/models/financial_accounts/loan_tape.rbi +10 -1
  388. data/rbi/lib/lithic/models/financial_accounts/statement.rbi +11 -2
  389. data/rbi/lib/lithic/models/financial_accounts/statements/statement_line_items.rbi +2 -0
  390. data/rbi/lib/lithic/models/financial_transaction.rbi +8 -5
  391. data/rbi/lib/lithic/models/instance_financial_account_type.rbi +2 -1
  392. data/rbi/lib/lithic/models/kyb.rbi +1 -1
  393. data/rbi/lib/lithic/models/kyc.rbi +1 -1
  394. data/rbi/lib/lithic/models/kyc_exempt.rbi +3 -2
  395. data/rbi/lib/lithic/models/management_operation_create_params.rbi +3 -3
  396. data/rbi/lib/lithic/models/management_operation_list_params.rbi +2 -2
  397. data/rbi/lib/lithic/models/management_operation_transaction.rbi +7 -7
  398. data/rbi/lib/lithic/models/message_attempt.rbi +1 -1
  399. data/rbi/lib/lithic/models/owner_type.rbi +1 -1
  400. data/rbi/lib/lithic/models/payment.rbi +11 -10
  401. data/rbi/lib/lithic/models/payment_create_params.rbi +5 -3
  402. data/rbi/lib/lithic/models/payment_list_params.rbi +6 -3
  403. data/rbi/lib/lithic/models/payment_simulate_action_params.rbi +2 -2
  404. data/rbi/lib/lithic/models/payment_simulate_action_response.rbi +1 -1
  405. data/rbi/lib/lithic/models/payment_simulate_receipt_params.rbi +1 -1
  406. data/rbi/lib/lithic/models/payment_simulate_receipt_response.rbi +1 -1
  407. data/rbi/lib/lithic/models/payment_simulate_release_response.rbi +1 -1
  408. data/rbi/lib/lithic/models/payment_simulate_return_response.rbi +1 -1
  409. data/rbi/lib/lithic/models/reports/settlement/network_total_list_params.rbi +1 -1
  410. data/rbi/lib/lithic/models/reports/settlement/network_total_list_response.rbi +7 -1
  411. data/rbi/lib/lithic/models/reports/settlement/network_total_retrieve_response.rbi +7 -1
  412. data/rbi/lib/lithic/models/responder_endpoint_check_status_params.rbi +1 -1
  413. data/rbi/lib/lithic/models/responder_endpoint_create_params.rbi +1 -1
  414. data/rbi/lib/lithic/models/responder_endpoint_delete_params.rbi +1 -1
  415. data/rbi/lib/lithic/models/settlement_detail.rbi +3 -2
  416. data/rbi/lib/lithic/models/settlement_summary_details.rbi +1 -1
  417. data/rbi/lib/lithic/models/spend_limit_duration.rbi +1 -1
  418. data/rbi/lib/lithic/models/three_ds/authentication_retrieve_response.rbi +53 -8
  419. data/rbi/lib/lithic/models/three_ds/authentication_simulate_params.rbi +7 -1
  420. data/rbi/lib/lithic/models/three_ds/challenge_result.rbi +1 -1
  421. data/rbi/lib/lithic/models/tokenization.rbi +8 -5
  422. data/rbi/lib/lithic/models/tokenization_list_params.rbi +1 -1
  423. data/rbi/lib/lithic/models/tokenization_resend_activation_code_params.rbi +7 -1
  424. data/rbi/lib/lithic/models/tokenization_simulate_params.rbi +2 -2
  425. data/rbi/lib/lithic/models/transaction.rbi +49 -22
  426. data/rbi/lib/lithic/models/transaction_list_params.rbi +4 -2
  427. data/rbi/lib/lithic/models/transaction_simulate_authorization_params.rbi +1 -1
  428. data/rbi/lib/lithic/models/transaction_simulate_void_params.rbi +1 -1
  429. data/rbi/lib/lithic/models/transactions/events/enhanced_data.rbi +16 -3
  430. data/rbi/lib/lithic/models/transfer.rbi +5 -5
  431. data/rbi/lib/lithic/models/verification_method.rbi +1 -1
  432. data/rbi/lib/lithic/resources/account_holders.rbi +1 -0
  433. data/rbi/lib/lithic/resources/accounts.rbi +1 -0
  434. data/rbi/lib/lithic/resources/aggregate_balances.rbi +1 -0
  435. data/rbi/lib/lithic/resources/auth_rules/v2/backtests.rbi +1 -0
  436. data/rbi/lib/lithic/resources/auth_rules/v2.rbi +1 -0
  437. data/rbi/lib/lithic/resources/auth_rules.rbi +1 -0
  438. data/rbi/lib/lithic/resources/auth_stream_enrollment.rbi +1 -0
  439. data/rbi/lib/lithic/resources/balances.rbi +1 -0
  440. data/rbi/lib/lithic/resources/book_transfers.rbi +1 -0
  441. data/rbi/lib/lithic/resources/card_programs.rbi +1 -0
  442. data/rbi/lib/lithic/resources/cards/aggregate_balances.rbi +1 -0
  443. data/rbi/lib/lithic/resources/cards/balances.rbi +1 -0
  444. data/rbi/lib/lithic/resources/cards/financial_transactions.rbi +1 -0
  445. data/rbi/lib/lithic/resources/cards.rbi +1 -0
  446. data/rbi/lib/lithic/resources/credit_products/extended_credit.rbi +1 -0
  447. data/rbi/lib/lithic/resources/credit_products/prime_rates.rbi +1 -0
  448. data/rbi/lib/lithic/resources/credit_products.rbi +1 -0
  449. data/rbi/lib/lithic/resources/digital_card_art.rbi +1 -0
  450. data/rbi/lib/lithic/resources/disputes.rbi +1 -0
  451. data/rbi/lib/lithic/resources/events/subscriptions.rbi +1 -0
  452. data/rbi/lib/lithic/resources/events.rbi +1 -0
  453. data/rbi/lib/lithic/resources/external_bank_accounts/micro_deposits.rbi +1 -0
  454. data/rbi/lib/lithic/resources/external_bank_accounts.rbi +1 -0
  455. data/rbi/lib/lithic/resources/external_payments.rbi +1 -0
  456. data/rbi/lib/lithic/resources/financial_accounts/balances.rbi +1 -0
  457. data/rbi/lib/lithic/resources/financial_accounts/credit_configuration.rbi +1 -0
  458. data/rbi/lib/lithic/resources/financial_accounts/financial_transactions.rbi +1 -0
  459. data/rbi/lib/lithic/resources/financial_accounts/loan_tapes.rbi +1 -0
  460. data/rbi/lib/lithic/resources/financial_accounts/statements/line_items.rbi +1 -0
  461. data/rbi/lib/lithic/resources/financial_accounts/statements.rbi +1 -0
  462. data/rbi/lib/lithic/resources/financial_accounts.rbi +1 -0
  463. data/rbi/lib/lithic/resources/management_operations.rbi +1 -0
  464. data/rbi/lib/lithic/resources/payments.rbi +1 -0
  465. data/rbi/lib/lithic/resources/reports/settlement/network_totals.rbi +1 -0
  466. data/rbi/lib/lithic/resources/reports/settlement.rbi +1 -0
  467. data/rbi/lib/lithic/resources/reports.rbi +1 -0
  468. data/rbi/lib/lithic/resources/responder_endpoints.rbi +1 -0
  469. data/rbi/lib/lithic/resources/three_ds/authentication.rbi +1 -0
  470. data/rbi/lib/lithic/resources/three_ds/decisioning.rbi +1 -0
  471. data/rbi/lib/lithic/resources/three_ds.rbi +1 -0
  472. data/rbi/lib/lithic/resources/tokenization_decisioning.rbi +1 -0
  473. data/rbi/lib/lithic/resources/tokenizations.rbi +1 -0
  474. data/rbi/lib/lithic/resources/transactions/enhanced_commercial_data.rbi +1 -0
  475. data/rbi/lib/lithic/resources/transactions/events/enhanced_commercial_data.rbi +1 -0
  476. data/rbi/lib/lithic/resources/transactions/events.rbi +1 -0
  477. data/rbi/lib/lithic/resources/transactions.rbi +1 -0
  478. data/rbi/lib/lithic/resources/transfers.rbi +1 -0
  479. data/rbi/lib/lithic/transport/base_client.rbi +3 -2
  480. data/rbi/lib/lithic/type/base_model.rbi +8 -0
  481. data/rbi/lib/lithic/util.rbi +2 -2
  482. data/rbi/lib/lithic/version.rbi +1 -1
  483. data/sig/lithic/client.rbs +1 -1
  484. data/sig/lithic/errors.rbs +112 -82
  485. data/sig/lithic/models/card_convert_physical_params.rbs +1 -1
  486. data/sig/lithic/models/card_create_params.rbs +1 -1
  487. data/sig/lithic/models/card_reissue_params.rbs +1 -1
  488. data/sig/lithic/models/card_renew_params.rbs +1 -1
  489. data/sig/lithic/models/transaction.rbs +1 -1
  490. data/sig/lithic/transport/base_client.rbs +1 -1
  491. data/sig/lithic/type/base_model.rbs +4 -0
  492. data/sig/lithic/util.rbs +2 -2
  493. data/sig/lithic/version.rbs +1 -1
  494. metadata +2 -2
@@ -15,114 +15,30 @@ module Lithic
15
15
  # Create a new virtual or physical card. Parameters `shipping_address` and
16
16
  # `product_id` only apply to physical cards.
17
17
  #
18
- # @param params [Lithic::Models::CardCreateParams, Hash{Symbol=>Object}] .
19
- #
20
- # @option params [Symbol, Lithic::Models::CardCreateParams::Type] :type Card types:
21
- #
22
- # - `VIRTUAL` - Card will authorize at any merchant and can be added to a digital
23
- # wallet like Apple Pay or Google Pay (if the card program is digital
24
- # wallet-enabled).
25
- # - `PHYSICAL` - Manufactured and sent to the cardholder. We offer white label
26
- # branding, credit, ATM, PIN debit, chip/EMV, NFC and magstripe functionality.
27
- # Reach out at [lithic.com/contact](https://lithic.com/contact) for more
28
- # information.
29
- # - `SINGLE_USE` - Card is closed upon first successful authorization.
30
- # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that
31
- # successfully authorizes the card.
32
- # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
33
- # VIRTUAL instead.
34
- # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please
35
- # use VIRTUAL instead.
36
- #
37
- # @option params [String] :account_token Globally unique identifier for the account that the card will be associated
38
- # with. Required for programs enrolling users using the
39
- # [/account_holders endpoint](https://docs.lithic.com/docs/account-holders-kyc).
40
- # See [Managing Your Program](doc:managing-your-program) for more information.
41
- #
42
- # @option params [String] :card_program_token For card programs with more than one BIN range. This must be configured with
43
- # Lithic before use. Identifies the card program/BIN range under which to create
44
- # the card. If omitted, will utilize the program's default `card_program_token`.
45
- # In Sandbox, use 00000000-0000-0000-1000-000000000000 and
46
- # 00000000-0000-0000-2000-000000000000 to test creating cards on specific card
47
- # programs.
48
- #
49
- # @option params [Lithic::Models::Carrier] :carrier
50
- #
51
- # @option params [String] :digital_card_art_token Specifies the digital card art to be displayed in the user’s digital wallet
52
- # after tokenization. This artwork must be approved by Mastercard and configured
53
- # by Lithic to use. See
54
- # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
55
- #
56
- # @option params [String] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
57
- # an expiration date will be generated.
58
- #
59
- # @option params [String] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
60
- # provided, an expiration date will be generated.
61
- #
62
- # @option params [String] :memo Friendly name to identify the card.
63
- #
64
- # @option params [String] :pin Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and
65
- # `VIRTUAL`. See
66
- # [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).
67
- #
68
- # @option params [String] :product_id Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic
69
- # before use. Specifies the configuration (i.e., physical card art) that the card
70
- # should be manufactured with.
71
- #
72
- # @option params [String] :replacement_account_token Restricted field limited to select use cases. Lithic will reach out directly if
73
- # this field should be used. Globally unique identifier for the replacement card's
74
- # account. If this field is specified, `replacement_for` must also be specified.
75
- # If `replacement_for` is specified and this field is omitted, the replacement
76
- # card's account will be inferred from the card being replaced.
77
- #
78
- # @option params [String] :replacement_for Globally unique identifier for the card that this card will replace. If the card
79
- # type is `PHYSICAL` it will be replaced by a `PHYSICAL` card. If the card type is
80
- # `VIRTUAL` it will be replaced by a `VIRTUAL` card.
81
- #
82
- # @option params [Lithic::Models::ShippingAddress] :shipping_address
83
- #
84
- # @option params [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] :shipping_method Shipping method for the card. Only applies to cards of type PHYSICAL. Use of
85
- # options besides `STANDARD` require additional permissions.
86
- #
87
- # - `STANDARD` - USPS regular mail or similar international option, with no
88
- # tracking
89
- # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
90
- # with tracking
91
- # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
92
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
93
- # - `2_DAY` - FedEx 2-day shipping, with tracking
94
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
95
- # tracking
96
- #
97
- # @option params [Integer] :spend_limit Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
98
- # $1,000 limit). Transaction requests above the spend limit will be declined. Note
99
- # that a spend limit of 0 is effectively no limit, and should only be used to
100
- # reset or remove a prior limit. Only a limit of 1 or above will result in
101
- # declined transactions due to checks against the card limit.
102
- #
103
- # @option params [Symbol, Lithic::Models::SpendLimitDuration] :spend_limit_duration Spend limit duration values:
104
- #
105
- # - `ANNUALLY` - Card will authorize transactions up to spend limit for the
106
- # trailing year.
107
- # - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
108
- # of the card.
109
- # - `MONTHLY` - Card will authorize transactions up to spend limit for the
110
- # trailing month. To support recurring monthly payments, which can occur on
111
- # different day every month, the time window we consider for monthly velocity
112
- # starts 6 days after the current calendar date one month prior.
113
- # - `TRANSACTION` - Card will authorize multiple transactions if each individual
114
- # transaction is under the spend limit.
115
- #
116
- # @option params [Symbol, Lithic::Models::CardCreateParams::State] :state Card state values:
117
- #
118
- # - `OPEN` - Card will approve authorizations (if they match card and account
119
- # parameters).
120
- # - `PAUSED` - Card will decline authorizations, but can be resumed at a later
121
- # time.
122
- #
123
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
18
+ # @overload create(type:, account_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_for: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
19
+ #
20
+ # @param type [Symbol, Lithic::Models::CardCreateParams::Type]
21
+ # @param account_token [String]
22
+ # @param card_program_token [String]
23
+ # @param carrier [Lithic::Models::Carrier]
24
+ # @param digital_card_art_token [String]
25
+ # @param exp_month [String]
26
+ # @param exp_year [String]
27
+ # @param memo [String]
28
+ # @param pin [String]
29
+ # @param product_id [String]
30
+ # @param replacement_account_token [String]
31
+ # @param replacement_for [String]
32
+ # @param shipping_address [Lithic::Models::ShippingAddress]
33
+ # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod]
34
+ # @param spend_limit [Integer]
35
+ # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration]
36
+ # @param state [Symbol, Lithic::Models::CardCreateParams::State]
37
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
124
38
  #
125
39
  # @return [Lithic::Models::Card]
40
+ #
41
+ # @see Lithic::Models::CardCreateParams
126
42
  def create(params)
127
43
  parsed, options = Lithic::Models::CardCreateParams.dump_request(params)
128
44
  @client.request(
@@ -136,17 +52,18 @@ module Lithic
136
52
 
137
53
  # Get card configuration such as spend limit and state.
138
54
  #
139
- # @param card_token [String]
140
- #
141
- # @param params [Lithic::Models::CardRetrieveParams, Hash{Symbol=>Object}] .
55
+ # @overload retrieve(card_token, request_options: {})
142
56
  #
143
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
57
+ # @param card_token [String]
58
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
144
59
  #
145
60
  # @return [Lithic::Models::Card]
61
+ #
62
+ # @see Lithic::Models::CardRetrieveParams
146
63
  def retrieve(card_token, params = {})
147
64
  @client.request(
148
65
  method: :get,
149
- path: ["v1/cards/%0s", card_token],
66
+ path: ["v1/cards/%1$s", card_token],
150
67
  model: Lithic::Models::Card,
151
68
  options: params[:request_options]
152
69
  )
@@ -158,60 +75,26 @@ module Lithic
158
75
  # _Note: setting a card to a `CLOSED` state is a final action that cannot be
159
76
  # undone._
160
77
  #
161
- # @param card_token [String]
162
- #
163
- # @param params [Lithic::Models::CardUpdateParams, Hash{Symbol=>Object}] .
164
- #
165
- # @option params [String] :digital_card_art_token Specifies the digital card art to be displayed in the user’s digital wallet
166
- # after tokenization. This artwork must be approved by Mastercard and configured
167
- # by Lithic to use. See
168
- # [Flexible Card Art Guide](https://docs.lithic.com/docs/about-digital-wallets#flexible-card-art).
169
- #
170
- # @option params [String] :memo Friendly name to identify the card.
171
- #
172
- # @option params [String] :pin Encrypted PIN block (in base64). Only applies to cards of type `PHYSICAL` and
173
- # `VIRTUAL`. Changing PIN also resets PIN status to `OK`. See
174
- # [Encrypted PIN Block](https://docs.lithic.com/docs/cards#encrypted-pin-block).
78
+ # @overload update(card_token, digital_card_art_token: nil, memo: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
175
79
  #
176
- # @option params [Symbol, Lithic::Models::CardUpdateParams::PinStatus] :pin_status Indicates if a card is blocked due a PIN status issue (e.g. excessive incorrect
177
- # attempts). Can only be set to `OK` to unblock a card.
178
- #
179
- # @option params [Integer] :spend_limit Amount (in cents) to limit approved authorizations (e.g. 100000 would be a
180
- # $1,000 limit). Transaction requests above the spend limit will be declined. Note
181
- # that a spend limit of 0 is effectively no limit, and should only be used to
182
- # reset or remove a prior limit. Only a limit of 1 or above will result in
183
- # declined transactions due to checks against the card limit.
184
- #
185
- # @option params [Symbol, Lithic::Models::SpendLimitDuration] :spend_limit_duration Spend limit duration values:
186
- #
187
- # - `ANNUALLY` - Card will authorize transactions up to spend limit for the
188
- # trailing year.
189
- # - `FOREVER` - Card will authorize only up to spend limit for the entire lifetime
190
- # of the card.
191
- # - `MONTHLY` - Card will authorize transactions up to spend limit for the
192
- # trailing month. To support recurring monthly payments, which can occur on
193
- # different day every month, the time window we consider for monthly velocity
194
- # starts 6 days after the current calendar date one month prior.
195
- # - `TRANSACTION` - Card will authorize multiple transactions if each individual
196
- # transaction is under the spend limit.
197
- #
198
- # @option params [Symbol, Lithic::Models::CardUpdateParams::State] :state Card state values:
199
- #
200
- # - `CLOSED` - Card will no longer approve authorizations. Closing a card cannot
201
- # be undone.
202
- # - `OPEN` - Card will approve authorizations (if they match card and account
203
- # parameters).
204
- # - `PAUSED` - Card will decline authorizations, but can be resumed at a later
205
- # time.
206
- #
207
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
80
+ # @param card_token [String]
81
+ # @param digital_card_art_token [String]
82
+ # @param memo [String]
83
+ # @param pin [String]
84
+ # @param pin_status [Symbol, Lithic::Models::CardUpdateParams::PinStatus]
85
+ # @param spend_limit [Integer]
86
+ # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration]
87
+ # @param state [Symbol, Lithic::Models::CardUpdateParams::State]
88
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
208
89
  #
209
90
  # @return [Lithic::Models::Card]
91
+ #
92
+ # @see Lithic::Models::CardUpdateParams
210
93
  def update(card_token, params = {})
211
94
  parsed, options = Lithic::Models::CardUpdateParams.dump_request(params)
212
95
  @client.request(
213
96
  method: :patch,
214
- path: ["v1/cards/%0s", card_token],
97
+ path: ["v1/cards/%1$s", card_token],
215
98
  body: parsed,
216
99
  model: Lithic::Models::Card,
217
100
  options: options
@@ -220,29 +103,20 @@ module Lithic
220
103
 
221
104
  # List cards.
222
105
  #
223
- # @param params [Lithic::Models::CardListParams, Hash{Symbol=>Object}] .
224
- #
225
- # @option params [String] :account_token Returns cards associated with the specified account.
106
+ # @overload list(account_token: nil, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, state: nil, request_options: {})
226
107
  #
227
- # @option params [Time] :begin_ Date string in RFC 3339 format. Only entries created after the specified time
228
- # will be included. UTC time zone.
229
- #
230
- # @option params [Time] :end_ Date string in RFC 3339 format. Only entries created before the specified time
231
- # will be included. UTC time zone.
232
- #
233
- # @option params [String] :ending_before A cursor representing an item's token before which a page of results should end.
234
- # Used to retrieve the previous page of results before this item.
235
- #
236
- # @option params [Integer] :page_size Page size (for pagination).
237
- #
238
- # @option params [String] :starting_after A cursor representing an item's token after which a page of results should
239
- # begin. Used to retrieve the next page of results after this item.
240
- #
241
- # @option params [Symbol, Lithic::Models::CardListParams::State] :state Returns cards with the specified state.
242
- #
243
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
108
+ # @param account_token [String]
109
+ # @param begin_ [Time]
110
+ # @param end_ [Time]
111
+ # @param ending_before [String]
112
+ # @param page_size [Integer]
113
+ # @param starting_after [String]
114
+ # @param state [Symbol, Lithic::Models::CardListParams::State]
115
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
244
116
  #
245
117
  # @return [Lithic::CursorPage<Lithic::Models::Card>]
118
+ #
119
+ # @see Lithic::Models::CardListParams
246
120
  def list(params = {})
247
121
  parsed, options = Lithic::Models::CardListParams.dump_request(params)
248
122
  @client.request(
@@ -266,39 +140,23 @@ module Lithic
266
140
  # `VIRTUAL` (or existing cards with deprecated types of `DIGITAL_WALLET` and
267
141
  # `UNLOCKED`).
268
142
  #
269
- # @param card_token [String]
270
- #
271
- # @param params [Lithic::Models::CardConvertPhysicalParams, Hash{Symbol=>Object}] .
143
+ # @overload convert_physical(card_token, shipping_address:, carrier: nil, product_id: nil, shipping_method: nil, request_options: {})
272
144
  #
273
- # @option params [Lithic::Models::ShippingAddress] :shipping_address The shipping address this card will be sent to.
274
- #
275
- # @option params [Lithic::Models::Carrier] :carrier If omitted, the previous carrier will be used.
276
- #
277
- # @option params [String] :product_id Specifies the configuration (e.g. physical card art) that the card should be
278
- # manufactured with, and only applies to cards of type `PHYSICAL`. This must be
279
- # configured with Lithic before use.
280
- #
281
- # @option params [Symbol, Lithic::Models::CardConvertPhysicalParams::ShippingMethod] :shipping_method Shipping method for the card. Use of options besides `STANDARD` require
282
- # additional permissions.
283
- #
284
- # - `STANDARD` - USPS regular mail or similar international option, with no
285
- # tracking
286
- # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
287
- # with tracking
288
- # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
289
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
290
- # - `2_DAY` - FedEx 2-day shipping, with tracking
291
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
292
- # tracking
293
- #
294
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
145
+ # @param card_token [String]
146
+ # @param shipping_address [Lithic::Models::ShippingAddress]
147
+ # @param carrier [Lithic::Models::Carrier]
148
+ # @param product_id [String]
149
+ # @param shipping_method [Symbol, Lithic::Models::CardConvertPhysicalParams::ShippingMethod]
150
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
295
151
  #
296
152
  # @return [Lithic::Models::Card]
153
+ #
154
+ # @see Lithic::Models::CardConvertPhysicalParams
297
155
  def convert_physical(card_token, params)
298
156
  parsed, options = Lithic::Models::CardConvertPhysicalParams.dump_request(params)
299
157
  @client.request(
300
158
  method: :post,
301
- path: ["v1/cards/%0s/convert_physical", card_token],
159
+ path: ["v1/cards/%1$s/convert_physical", card_token],
302
160
  body: parsed,
303
161
  model: Lithic::Models::Card,
304
162
  options: options
@@ -333,15 +191,15 @@ module Lithic
333
191
  # but **do not ever embed your API key into front end code, as doing so introduces
334
192
  # a serious security vulnerability**.
335
193
  #
336
- # @param params [Lithic::Models::CardEmbedParams, Hash{Symbol=>Object}] .
337
- #
338
- # @option params [String] :embed_request A base64 encoded JSON string of an EmbedRequest to specify which card to load.
339
- #
340
- # @option params [String] :hmac SHA256 HMAC of the embed_request JSON string with base64 digest.
194
+ # @overload embed(embed_request:, hmac:, request_options: {})
341
195
  #
342
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
196
+ # @param embed_request [String]
197
+ # @param hmac [String]
198
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
343
199
  #
344
200
  # @return [String]
201
+ #
202
+ # @see Lithic::Models::CardEmbedParams
345
203
  def embed(params)
346
204
  parsed, options = Lithic::Models::CardEmbedParams.dump_request(params)
347
205
  @client.request(
@@ -361,41 +219,25 @@ module Lithic
361
219
  # [Contact Us](https://lithic.com/contact) or your Customer Success representative
362
220
  # for more information.
363
221
  #
364
- # @param card_token [String] The unique token of the card to add to the device's digital wallet.
365
- #
366
- # @param params [Lithic::Models::CardProvisionParams, Hash{Symbol=>Object}] .
367
- #
368
- # @option params [String] :certificate Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only
369
- # `activationData` in the response. Apple's public leaf certificate. Base64
370
- # encoded in PEM format with headers `(-----BEGIN CERTIFICATE-----)` and trailers
371
- # omitted. Provided by the device's wallet.
372
- #
373
- # @option params [String] :client_device_id Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the
374
- # card is on the Visa network. Stable device identification set by the wallet
375
- # provider.
376
- #
377
- # @option params [String] :client_wallet_account_id Only applicable if `digital_wallet` is `GOOGLE_PAY` or `SAMSUNG_PAY` and the
378
- # card is on the Visa network. Consumer ID that identifies the wallet account
379
- # holder entity.
222
+ # @overload provision(card_token, certificate: nil, client_device_id: nil, client_wallet_account_id: nil, digital_wallet: nil, nonce: nil, nonce_signature: nil, request_options: {})
380
223
  #
381
- # @option params [Symbol, Lithic::Models::CardProvisionParams::DigitalWallet] :digital_wallet Name of digital wallet provider.
382
- #
383
- # @option params [String] :nonce Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only
384
- # `activationData` in the response. Base64 cryptographic nonce provided by the
385
- # device's wallet.
386
- #
387
- # @option params [String] :nonce_signature Only applicable if `digital_wallet` is `APPLE_PAY`. Omit to receive only
388
- # `activationData` in the response. Base64 cryptographic nonce provided by the
389
- # device's wallet.
390
- #
391
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
224
+ # @param card_token [String]
225
+ # @param certificate [String]
226
+ # @param client_device_id [String]
227
+ # @param client_wallet_account_id [String]
228
+ # @param digital_wallet [Symbol, Lithic::Models::CardProvisionParams::DigitalWallet]
229
+ # @param nonce [String]
230
+ # @param nonce_signature [String]
231
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
392
232
  #
393
233
  # @return [Lithic::Models::CardProvisionResponse]
234
+ #
235
+ # @see Lithic::Models::CardProvisionParams
394
236
  def provision(card_token, params = {})
395
237
  parsed, options = Lithic::Models::CardProvisionParams.dump_request(params)
396
238
  @client.request(
397
239
  method: :post,
398
- path: ["v1/cards/%0s/provision", card_token],
240
+ path: ["v1/cards/%1$s/provision", card_token],
399
241
  body: parsed,
400
242
  model: Lithic::Models::CardProvisionResponse,
401
243
  options: options
@@ -408,39 +250,23 @@ module Lithic
408
250
  # applies to cards of type `PHYSICAL`. A card can be replaced or renewed a total
409
251
  # of 8 times.
410
252
  #
411
- # @param card_token [String]
412
- #
413
- # @param params [Lithic::Models::CardReissueParams, Hash{Symbol=>Object}] .
414
- #
415
- # @option params [Lithic::Models::Carrier] :carrier If omitted, the previous carrier will be used.
416
- #
417
- # @option params [String] :product_id Specifies the configuration (e.g. physical card art) that the card should be
418
- # manufactured with, and only applies to cards of type `PHYSICAL`. This must be
419
- # configured with Lithic before use.
420
- #
421
- # @option params [Lithic::Models::ShippingAddress] :shipping_address If omitted, the previous shipping address will be used.
253
+ # @overload reissue(card_token, carrier: nil, product_id: nil, shipping_address: nil, shipping_method: nil, request_options: {})
422
254
  #
423
- # @option params [Symbol, Lithic::Models::CardReissueParams::ShippingMethod] :shipping_method Shipping method for the card. Use of options besides `STANDARD` require
424
- # additional permissions.
425
- #
426
- # - `STANDARD` - USPS regular mail or similar international option, with no
427
- # tracking
428
- # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
429
- # with tracking
430
- # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
431
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
432
- # - `2_DAY` - FedEx 2-day shipping, with tracking
433
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
434
- # tracking
435
- #
436
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
255
+ # @param card_token [String]
256
+ # @param carrier [Lithic::Models::Carrier]
257
+ # @param product_id [String]
258
+ # @param shipping_address [Lithic::Models::ShippingAddress]
259
+ # @param shipping_method [Symbol, Lithic::Models::CardReissueParams::ShippingMethod]
260
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
437
261
  #
438
262
  # @return [Lithic::Models::Card]
263
+ #
264
+ # @see Lithic::Models::CardReissueParams
439
265
  def reissue(card_token, params = {})
440
266
  parsed, options = Lithic::Models::CardReissueParams.dump_request(params)
441
267
  @client.request(
442
268
  method: :post,
443
- path: ["v1/cards/%0s/reissue", card_token],
269
+ path: ["v1/cards/%1$s/reissue", card_token],
444
270
  body: parsed,
445
271
  model: Lithic::Models::Card,
446
272
  options: options
@@ -454,45 +280,25 @@ module Lithic
454
280
  # Applies to card types `PHYSICAL` and `VIRTUAL`. A card can be replaced or
455
281
  # renewed a total of 8 times.
456
282
  #
457
- # @param card_token [String]
458
- #
459
- # @param params [Lithic::Models::CardRenewParams, Hash{Symbol=>Object}] .
460
- #
461
- # @option params [Lithic::Models::ShippingAddress] :shipping_address The shipping address this card will be sent to.
462
- #
463
- # @option params [Lithic::Models::Carrier] :carrier If omitted, the previous carrier will be used.
464
- #
465
- # @option params [String] :exp_month Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
466
- # an expiration date six years in the future will be generated.
467
- #
468
- # @option params [String] :exp_year Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is
469
- # provided, an expiration date six years in the future will be generated.
470
- #
471
- # @option params [String] :product_id Specifies the configuration (e.g. physical card art) that the card should be
472
- # manufactured with, and only applies to cards of type `PHYSICAL`. This must be
473
- # configured with Lithic before use.
474
- #
475
- # @option params [Symbol, Lithic::Models::CardRenewParams::ShippingMethod] :shipping_method Shipping method for the card. Use of options besides `STANDARD` require
476
- # additional permissions.
477
- #
478
- # - `STANDARD` - USPS regular mail or similar international option, with no
479
- # tracking
480
- # - `STANDARD_WITH_TRACKING` - USPS regular mail or similar international option,
481
- # with tracking
482
- # - `PRIORITY` - USPS Priority, 1-3 day shipping, with tracking
483
- # - `EXPRESS` - FedEx Express, 3-day shipping, with tracking
484
- # - `2_DAY` - FedEx 2-day shipping, with tracking
485
- # - `EXPEDITED` - FedEx Standard Overnight or similar international option, with
486
- # tracking
283
+ # @overload renew(card_token, shipping_address:, carrier: nil, exp_month: nil, exp_year: nil, product_id: nil, shipping_method: nil, request_options: {})
487
284
  #
488
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
285
+ # @param card_token [String]
286
+ # @param shipping_address [Lithic::Models::ShippingAddress]
287
+ # @param carrier [Lithic::Models::Carrier]
288
+ # @param exp_month [String]
289
+ # @param exp_year [String]
290
+ # @param product_id [String]
291
+ # @param shipping_method [Symbol, Lithic::Models::CardRenewParams::ShippingMethod]
292
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
489
293
  #
490
294
  # @return [Lithic::Models::Card]
295
+ #
296
+ # @see Lithic::Models::CardRenewParams
491
297
  def renew(card_token, params)
492
298
  parsed, options = Lithic::Models::CardRenewParams.dump_request(params)
493
299
  @client.request(
494
300
  method: :post,
495
- path: ["v1/cards/%0s/renew", card_token],
301
+ path: ["v1/cards/%1$s/renew", card_token],
496
302
  body: parsed,
497
303
  model: Lithic::Models::Card,
498
304
  options: options
@@ -504,17 +310,18 @@ module Lithic
504
310
  # example, if the Card has a monthly spend limit of $1000 configured, and has
505
311
  # spent $600 in the last month, the available spend limit returned would be $400.
506
312
  #
507
- # @param card_token [String]
313
+ # @overload retrieve_spend_limits(card_token, request_options: {})
508
314
  #
509
- # @param params [Lithic::Models::CardRetrieveSpendLimitsParams, Hash{Symbol=>Object}] .
510
- #
511
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
315
+ # @param card_token [String]
316
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
512
317
  #
513
318
  # @return [Lithic::Models::CardSpendLimits]
319
+ #
320
+ # @see Lithic::Models::CardRetrieveSpendLimitsParams
514
321
  def retrieve_spend_limits(card_token, params = {})
515
322
  @client.request(
516
323
  method: :get,
517
- path: ["v1/cards/%0s/spend_limits", card_token],
324
+ path: ["v1/cards/%1$s/spend_limits", card_token],
518
325
  model: Lithic::Models::CardSpendLimits,
519
326
  options: params[:request_options]
520
327
  )
@@ -526,13 +333,14 @@ module Lithic
526
333
  # `POST` endpoint because it is more secure to send sensitive data in a request
527
334
  # body than in a URL._
528
335
  #
529
- # @param params [Lithic::Models::CardSearchByPanParams, Hash{Symbol=>Object}] .
530
- #
531
- # @option params [String] :pan The PAN for the card being retrieved.
336
+ # @overload search_by_pan(pan:, request_options: {})
532
337
  #
533
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
338
+ # @param pan [String]
339
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
534
340
  #
535
341
  # @return [Lithic::Models::Card]
342
+ #
343
+ # @see Lithic::Models::CardSearchByPanParams
536
344
  def search_by_pan(params)
537
345
  parsed, options = Lithic::Models::CardSearchByPanParams.dump_request(params)
538
346
  @client.request(
@@ -544,6 +352,8 @@ module Lithic
544
352
  )
545
353
  end
546
354
 
355
+ # @api private
356
+ #
547
357
  # @param client [Lithic::Client]
548
358
  def initialize(client:)
549
359
  @client = client
@@ -6,22 +6,25 @@ module Lithic
6
6
  class ExtendedCredit
7
7
  # Get the extended credit for a given credit product under a program
8
8
  #
9
- # @param credit_product_token [String] Credit Product Token
9
+ # @overload retrieve(credit_product_token, request_options: {})
10
10
  #
11
- # @param params [Lithic::Models::CreditProducts::ExtendedCreditRetrieveParams, Hash{Symbol=>Object}] .
12
- #
13
- # @option params [Lithic::RequestOptions, Hash{Symbol=>Object}, nil] :request_options
11
+ # @param credit_product_token [String]
12
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
14
13
  #
15
14
  # @return [Lithic::Models::CreditProducts::CreditProductsExtendedCredit]
15
+ #
16
+ # @see Lithic::Models::CreditProducts::ExtendedCreditRetrieveParams
16
17
  def retrieve(credit_product_token, params = {})
17
18
  @client.request(
18
19
  method: :get,
19
- path: ["v1/credit_products/%0s/extended_credit", credit_product_token],
20
+ path: ["v1/credit_products/%1$s/extended_credit", credit_product_token],
20
21
  model: Lithic::Models::CreditProducts::CreditProductsExtendedCredit,
21
22
  options: params[:request_options]
22
23
  )
23
24
  end
24
25
 
26
+ # @api private
27
+ #
25
28
  # @param client [Lithic::Client]
26
29
  def initialize(client:)
27
30
  @client = client