lithic 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +78 -0
  3. data/README.md +1 -1
  4. data/lib/lithic/client.rb +5 -10
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +12 -10
  6. data/lib/lithic/internal/util.rb +7 -2
  7. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +5 -0
  8. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +21 -21
  9. data/lib/lithic/models/book_transfer_retry_params.rb +26 -0
  10. data/lib/lithic/models/{asa_request_webhook_event.rb → card_authorization_approval_request_webhook_event.rb} +151 -129
  11. data/lib/lithic/models/card_create_params.rb +12 -5
  12. data/lib/lithic/models/card_updated_webhook_event.rb +40 -0
  13. data/lib/lithic/models/card_web_provision_response.rb +5 -5
  14. data/lib/lithic/models/event.rb +3 -0
  15. data/lib/lithic/models/event_list_params.rb +2 -0
  16. data/lib/lithic/models/event_subscription.rb +2 -0
  17. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  18. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  19. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  20. data/lib/lithic/models/external_payment_create_params.rb +15 -1
  21. data/lib/lithic/models/financial_account.rb +33 -25
  22. data/lib/lithic/models/financial_account_update_status_params.rb +9 -1
  23. data/lib/lithic/models/financial_accounts/loan_tape.rb +52 -3
  24. data/lib/lithic/models/financial_transaction.rb +4 -2
  25. data/lib/lithic/models/management_operation_create_params.rb +6 -1
  26. data/lib/lithic/models/non_pci_card.rb +8 -10
  27. data/lib/lithic/models/parsed_webhook_event.rb +5 -4
  28. data/lib/lithic/models/payment.rb +10 -1
  29. data/lib/lithic/models/payment_create_params.rb +1 -1
  30. data/lib/lithic/models/three_ds_authentication_approval_request_webhook_event.rb +17 -0
  31. data/lib/lithic/models/transaction.rb +12 -1
  32. data/lib/lithic/models/transaction_simulate_authorization_params.rb +25 -1
  33. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +25 -1
  34. data/lib/lithic/models/transfer_limit_list_params.rb +22 -0
  35. data/lib/lithic/models/transfer_limits_response.rb +274 -0
  36. data/lib/lithic/models.rb +14 -6
  37. data/lib/lithic/resources/book_transfers.rb +27 -0
  38. data/lib/lithic/resources/cards.rb +33 -27
  39. data/lib/lithic/resources/external_payments.rb +13 -1
  40. data/lib/lithic/resources/financial_accounts.rb +8 -6
  41. data/lib/lithic/resources/management_operations.rb +4 -1
  42. data/lib/lithic/resources/transactions.rb +14 -2
  43. data/lib/lithic/resources/transfer_limits.rb +37 -0
  44. data/lib/lithic/resources/webhooks.rb +3 -2
  45. data/lib/lithic/version.rb +1 -1
  46. data/lib/lithic.rb +7 -7
  47. data/rbi/lithic/client.rbi +3 -3
  48. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +11 -0
  49. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +47 -45
  50. data/rbi/lithic/models/book_transfer_retry_params.rbi +42 -0
  51. data/rbi/lithic/models/{asa_request_webhook_event.rbi → card_authorization_approval_request_webhook_event.rbi} +394 -256
  52. data/rbi/lithic/models/card_create_params.rbi +15 -6
  53. data/rbi/lithic/models/card_updated_webhook_event.rbi +61 -0
  54. data/rbi/lithic/models/card_web_provision_response.rbi +5 -10
  55. data/rbi/lithic/models/event.rbi +5 -0
  56. data/rbi/lithic/models/event_list_params.rbi +6 -0
  57. data/rbi/lithic/models/event_subscription.rbi +6 -0
  58. data/rbi/lithic/models/events/subscription_create_params.rbi +6 -0
  59. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  60. data/rbi/lithic/models/events/subscription_update_params.rbi +6 -0
  61. data/rbi/lithic/models/external_payment_create_params.rbi +4 -0
  62. data/rbi/lithic/models/financial_account.rbi +62 -54
  63. data/rbi/lithic/models/financial_account_update_status_params.rbi +11 -0
  64. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +93 -4
  65. data/rbi/lithic/models/financial_transaction.rbi +8 -4
  66. data/rbi/lithic/models/management_operation_create_params.rbi +4 -0
  67. data/rbi/lithic/models/non_pci_card.rbi +12 -15
  68. data/rbi/lithic/models/parsed_webhook_event.rbi +3 -2
  69. data/rbi/lithic/models/payment.rbi +16 -3
  70. data/rbi/lithic/models/three_ds_authentication_approval_request_webhook_event.rbi +27 -0
  71. data/rbi/lithic/models/transaction.rbi +20 -0
  72. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +33 -0
  73. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +33 -0
  74. data/rbi/lithic/models/transfer_limit_list_params.rbi +43 -0
  75. data/rbi/lithic/models/transfer_limits_response.rbi +604 -0
  76. data/rbi/lithic/models.rbi +14 -6
  77. data/rbi/lithic/resources/book_transfers.rbi +18 -0
  78. data/rbi/lithic/resources/cards.rbi +52 -49
  79. data/rbi/lithic/resources/external_payments.rbi +2 -0
  80. data/rbi/lithic/resources/financial_accounts.rbi +8 -5
  81. data/rbi/lithic/resources/management_operations.rbi +2 -0
  82. data/rbi/lithic/resources/transactions.rbi +18 -0
  83. data/rbi/lithic/resources/transfer_limits.rbi +28 -0
  84. data/rbi/lithic/resources/webhooks.rbi +4 -65
  85. data/sig/lithic/client.rbs +2 -2
  86. data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +2 -0
  87. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +20 -16
  88. data/sig/lithic/models/book_transfer_retry_params.rbs +23 -0
  89. data/sig/lithic/models/{asa_request_webhook_event.rbs → card_authorization_approval_request_webhook_event.rbs} +161 -156
  90. data/sig/lithic/models/card_create_params.rbs +8 -1
  91. data/sig/lithic/models/card_updated_webhook_event.rbs +35 -0
  92. data/sig/lithic/models/card_web_provision_response.rbs +4 -10
  93. data/sig/lithic/models/event.rbs +2 -0
  94. data/sig/lithic/models/event_list_params.rbs +2 -0
  95. data/sig/lithic/models/event_subscription.rbs +2 -0
  96. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  97. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  98. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  99. data/sig/lithic/models/financial_account.rbs +32 -27
  100. data/sig/lithic/models/financial_account_update_status_params.rbs +8 -1
  101. data/sig/lithic/models/financial_accounts/loan_tape.rbs +46 -4
  102. data/sig/lithic/models/parsed_webhook_event.rbs +3 -2
  103. data/sig/lithic/models/payment.rbs +10 -3
  104. data/sig/lithic/models/three_ds_authentication_approval_request_webhook_event.rbs +22 -0
  105. data/sig/lithic/models/transaction.rbs +9 -0
  106. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +21 -0
  107. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +22 -1
  108. data/sig/lithic/models/transfer_limit_list_params.rbs +22 -0
  109. data/sig/lithic/models/transfer_limits_response.rbs +232 -0
  110. data/sig/lithic/models.rbs +12 -6
  111. data/sig/lithic/resources/book_transfers.rbs +6 -0
  112. data/sig/lithic/resources/cards.rbs +1 -2
  113. data/sig/lithic/resources/financial_accounts.rbs +1 -0
  114. data/sig/lithic/resources/transactions.rbs +6 -0
  115. data/sig/lithic/resources/transfer_limits.rbs +12 -0
  116. data/sig/lithic/resources/webhooks.rbs +4 -61
  117. metadata +37 -23
  118. data/lib/lithic/models/aggregate_balance.rb +0 -113
  119. data/lib/lithic/models/aggregate_balance_list_params.rb +0 -35
  120. data/lib/lithic/models/cards/aggregate_balance_list_params.rb +0 -32
  121. data/lib/lithic/models/cards/aggregate_balance_list_response.rb +0 -92
  122. data/lib/lithic/resources/aggregate_balances.rb +0 -38
  123. data/lib/lithic/resources/cards/aggregate_balances.rb +0 -41
  124. data/rbi/lithic/models/aggregate_balance.rbi +0 -164
  125. data/rbi/lithic/models/aggregate_balance_list_params.rbi +0 -104
  126. data/rbi/lithic/models/cards/aggregate_balance_list_params.rbi +0 -62
  127. data/rbi/lithic/models/cards/aggregate_balance_list_response.rbi +0 -115
  128. data/rbi/lithic/resources/aggregate_balances.rbi +0 -28
  129. data/rbi/lithic/resources/cards/aggregate_balances.rbi +0 -35
  130. data/sig/lithic/models/aggregate_balance.rbs +0 -78
  131. data/sig/lithic/models/aggregate_balance_list_params.rbs +0 -43
  132. data/sig/lithic/models/cards/aggregate_balance_list_params.rbs +0 -34
  133. data/sig/lithic/models/cards/aggregate_balance_list_response.rbs +0 -62
  134. data/sig/lithic/resources/aggregate_balances.rbs +0 -12
  135. data/sig/lithic/resources/cards/aggregate_balances.rbs +0 -15
@@ -162,6 +162,13 @@ module Lithic
162
162
  # @return [Symbol, Lithic::Models::Transaction::Status]
163
163
  required :status, enum: -> { Lithic::Transaction::Status }
164
164
 
165
+ # @!attribute tags
166
+ # Key-value pairs for tagging resources. Tags allow you to associate arbitrary
167
+ # metadata with a resource for your own purposes.
168
+ #
169
+ # @return [Hash{Symbol=>String}]
170
+ required :tags, Lithic::Internal::Type::HashOf[String]
171
+
165
172
  # @!attribute token_info
166
173
  #
167
174
  # @return [Lithic::Models::TokenInfo, nil]
@@ -178,7 +185,7 @@ module Lithic
178
185
  # @return [Array<Lithic::Models::Transaction::Event>, nil]
179
186
  optional :events, -> { Lithic::Internal::Type::ArrayOf[Lithic::Transaction::Event] }
180
187
 
181
- # @!method initialize(token:, account_token:, acquirer_fee:, acquirer_reference_number:, amount:, amounts:, authorization_amount:, authorization_code:, avs:, card_token:, cardholder_authentication:, created:, financial_account_token:, merchant:, merchant_amount:, merchant_authorization_amount:, merchant_currency:, network:, network_risk_score:, pos:, result:, settled_amount:, status:, token_info:, updated:, events: nil)
188
+ # @!method initialize(token:, account_token:, acquirer_fee:, acquirer_reference_number:, amount:, amounts:, authorization_amount:, authorization_code:, avs:, card_token:, cardholder_authentication:, created:, financial_account_token:, merchant:, merchant_amount:, merchant_authorization_amount:, merchant_currency:, network:, network_risk_score:, pos:, result:, settled_amount:, status:, tags:, token_info:, updated:, events: nil)
182
189
  # Some parameter documentations has been truncated, see
183
190
  # {Lithic::Models::Transaction} for more details.
184
191
  #
@@ -228,6 +235,8 @@ module Lithic
228
235
  #
229
236
  # @param status [Symbol, Lithic::Models::Transaction::Status] Status of the transaction.
230
237
  #
238
+ # @param tags [Hash{Symbol=>String}] Key-value pairs for tagging resources. Tags allow you to associate arbitrary met
239
+ #
231
240
  # @param token_info [Lithic::Models::TokenInfo, nil]
232
241
  #
233
242
  # @param updated [Time] Date and time when the transaction last updated. UTC time zone.
@@ -929,6 +938,7 @@ module Lithic
929
938
  AUTH_RULE_ALLOWED_MCC = :AUTH_RULE_ALLOWED_MCC
930
939
  AUTH_RULE_BLOCKED_COUNTRY = :AUTH_RULE_BLOCKED_COUNTRY
931
940
  AUTH_RULE_BLOCKED_MCC = :AUTH_RULE_BLOCKED_MCC
941
+ AUTH_RULE = :AUTH_RULE
932
942
  CARD_CLOSED = :CARD_CLOSED
933
943
  CARD_CRYPTOGRAM_VALIDATION_FAILURE = :CARD_CRYPTOGRAM_VALIDATION_FAILURE
934
944
  CARD_EXPIRED = :CARD_EXPIRED
@@ -1258,6 +1268,7 @@ module Lithic
1258
1268
  AUTH_RULE_ALLOWED_MCC = :AUTH_RULE_ALLOWED_MCC
1259
1269
  AUTH_RULE_BLOCKED_COUNTRY = :AUTH_RULE_BLOCKED_COUNTRY
1260
1270
  AUTH_RULE_BLOCKED_MCC = :AUTH_RULE_BLOCKED_MCC
1271
+ AUTH_RULE = :AUTH_RULE
1261
1272
  CARD_CLOSED = :CARD_CLOSED
1262
1273
  CARD_CRYPTOGRAM_VALIDATION_FAILURE = :CARD_CRYPTOGRAM_VALIDATION_FAILURE
1263
1274
  CARD_EXPIRED = :CARD_EXPIRED
@@ -37,12 +37,30 @@ module Lithic
37
37
  # @return [String, nil]
38
38
  optional :mcc, String
39
39
 
40
+ # @!attribute merchant_acceptor_city
41
+ # Merchant acceptor city
42
+ #
43
+ # @return [String, nil]
44
+ optional :merchant_acceptor_city, String
45
+
46
+ # @!attribute merchant_acceptor_country
47
+ # Merchant acceptor country code (ISO 3166-1 alpha-3)
48
+ #
49
+ # @return [String, nil]
50
+ optional :merchant_acceptor_country, String
51
+
40
52
  # @!attribute merchant_acceptor_id
41
53
  # Unique identifier to identify the payment card acceptor.
42
54
  #
43
55
  # @return [String, nil]
44
56
  optional :merchant_acceptor_id, String
45
57
 
58
+ # @!attribute merchant_acceptor_state
59
+ # Merchant acceptor state/province (ISO 3166-2 subdivision code)
60
+ #
61
+ # @return [String, nil]
62
+ optional :merchant_acceptor_state, String
63
+
46
64
  # @!attribute merchant_amount
47
65
  # Amount of the transaction to be simulated in currency specified in
48
66
  # merchant_currency, including any acquirer fees.
@@ -92,7 +110,7 @@ module Lithic
92
110
  # @return [Symbol, Lithic::Models::TransactionSimulateAuthorizationParams::Status, nil]
93
111
  optional :status, enum: -> { Lithic::TransactionSimulateAuthorizationParams::Status }
94
112
 
95
- # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, merchant_amount: nil, merchant_currency: nil, partial_approval_capable: nil, pin: nil, status: nil, request_options: {})
113
+ # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_city: nil, merchant_acceptor_country: nil, merchant_acceptor_id: nil, merchant_acceptor_state: nil, merchant_amount: nil, merchant_currency: nil, partial_approval_capable: nil, pin: nil, status: nil, request_options: {})
96
114
  # Some parameter documentations has been truncated, see
97
115
  # {Lithic::Models::TransactionSimulateAuthorizationParams} for more details.
98
116
  #
@@ -104,8 +122,14 @@ module Lithic
104
122
  #
105
123
  # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
106
124
  #
125
+ # @param merchant_acceptor_city [String] Merchant acceptor city
126
+ #
127
+ # @param merchant_acceptor_country [String] Merchant acceptor country code (ISO 3166-1 alpha-3)
128
+ #
107
129
  # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
108
130
  #
131
+ # @param merchant_acceptor_state [String] Merchant acceptor state/province (ISO 3166-2 subdivision code)
132
+ #
109
133
  # @param merchant_amount [Integer] Amount of the transaction to be simulated in currency specified in merchant_curr
110
134
  #
111
135
  # @param merchant_currency [String] 3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD,
@@ -35,13 +35,31 @@ module Lithic
35
35
  # @return [String, nil]
36
36
  optional :mcc, String
37
37
 
38
+ # @!attribute merchant_acceptor_city
39
+ # Merchant acceptor city
40
+ #
41
+ # @return [String, nil]
42
+ optional :merchant_acceptor_city, String
43
+
44
+ # @!attribute merchant_acceptor_country
45
+ # Merchant acceptor country code (ISO 3166-1 alpha-3)
46
+ #
47
+ # @return [String, nil]
48
+ optional :merchant_acceptor_country, String
49
+
38
50
  # @!attribute merchant_acceptor_id
39
51
  # Unique identifier to identify the payment card acceptor.
40
52
  #
41
53
  # @return [String, nil]
42
54
  optional :merchant_acceptor_id, String
43
55
 
44
- # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
56
+ # @!attribute merchant_acceptor_state
57
+ # Merchant acceptor state/province (ISO 3166-2 subdivision code)
58
+ #
59
+ # @return [String, nil]
60
+ optional :merchant_acceptor_state, String
61
+
62
+ # @!method initialize(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_city: nil, merchant_acceptor_country: nil, merchant_acceptor_id: nil, merchant_acceptor_state: nil, request_options: {})
45
63
  # Some parameter documentations has been truncated, see
46
64
  # {Lithic::Models::TransactionSimulateCreditAuthorizationAdviceParams} for more
47
65
  # details.
@@ -54,8 +72,14 @@ module Lithic
54
72
  #
55
73
  # @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
56
74
  #
75
+ # @param merchant_acceptor_city [String] Merchant acceptor city
76
+ #
77
+ # @param merchant_acceptor_country [String] Merchant acceptor country code (ISO 3166-1 alpha-3)
78
+ #
57
79
  # @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
58
80
  #
81
+ # @param merchant_acceptor_state [String] Merchant acceptor state/province (ISO 3166-2 subdivision code)
82
+ #
59
83
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
60
84
  end
61
85
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::TransferLimits#list
6
+ class TransferLimitListParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute date
11
+ # Date for which to retrieve transfer limits (ISO 8601 format)
12
+ #
13
+ # @return [Date, nil]
14
+ optional :date, Date
15
+
16
+ # @!method initialize(date: nil, request_options: {})
17
+ # @param date [Date] Date for which to retrieve transfer limits (ISO 8601 format)
18
+ #
19
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,274 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class TransferLimitsResponse < Lithic::Internal::Type::BaseModel
6
+ # @!attribute data
7
+ # List of transfer limits
8
+ #
9
+ # @return [Array<Lithic::Models::TransferLimitsResponse::Data>]
10
+ required :data, -> { Lithic::Internal::Type::ArrayOf[Lithic::TransferLimitsResponse::Data] }
11
+
12
+ # @!attribute has_more
13
+ # Whether there are more transfer limits
14
+ #
15
+ # @return [Boolean]
16
+ required :has_more, Lithic::Internal::Type::Boolean
17
+
18
+ # @!method initialize(data:, has_more:)
19
+ # @param data [Array<Lithic::Models::TransferLimitsResponse::Data>] List of transfer limits
20
+ #
21
+ # @param has_more [Boolean] Whether there are more transfer limits
22
+
23
+ class Data < Lithic::Internal::Type::BaseModel
24
+ # @!attribute company_id
25
+ # Company ID
26
+ #
27
+ # @return [String]
28
+ required :company_id, String
29
+
30
+ # @!attribute daily_limit
31
+ # Daily limits with progress
32
+ #
33
+ # @return [Lithic::Models::TransferLimitsResponse::Data::DailyLimit]
34
+ required :daily_limit, -> { Lithic::TransferLimitsResponse::Data::DailyLimit }
35
+
36
+ # @!attribute date
37
+ # The date for the limit view (ISO format)
38
+ #
39
+ # @return [Date]
40
+ required :date, Date
41
+
42
+ # @!attribute is_fbo
43
+ # Whether the company is a FBO; based on the company ID prefix
44
+ #
45
+ # @return [Boolean]
46
+ required :is_fbo, Lithic::Internal::Type::Boolean
47
+
48
+ # @!attribute monthly_limit
49
+ # Monthly limits with progress
50
+ #
51
+ # @return [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit]
52
+ required :monthly_limit, -> { Lithic::TransferLimitsResponse::Data::MonthlyLimit }
53
+
54
+ # @!attribute program_limit_per_transaction
55
+ # Program transaction limits
56
+ #
57
+ # @return [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction]
58
+ required :program_limit_per_transaction,
59
+ -> { Lithic::TransferLimitsResponse::Data::ProgramLimitPerTransaction }
60
+
61
+ # @!method initialize(company_id:, daily_limit:, date:, is_fbo:, monthly_limit:, program_limit_per_transaction:)
62
+ # @param company_id [String] Company ID
63
+ #
64
+ # @param daily_limit [Lithic::Models::TransferLimitsResponse::Data::DailyLimit] Daily limits with progress
65
+ #
66
+ # @param date [Date] The date for the limit view (ISO format)
67
+ #
68
+ # @param is_fbo [Boolean] Whether the company is a FBO; based on the company ID prefix
69
+ #
70
+ # @param monthly_limit [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit] Monthly limits with progress
71
+ #
72
+ # @param program_limit_per_transaction [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction] Program transaction limits
73
+
74
+ # @see Lithic::Models::TransferLimitsResponse::Data#daily_limit
75
+ class DailyLimit < Lithic::Internal::Type::BaseModel
76
+ # @!attribute credit
77
+ # Credit limits
78
+ #
79
+ # @return [Lithic::Models::TransferLimitsResponse::Data::DailyLimit::Credit]
80
+ required :credit, -> { Lithic::TransferLimitsResponse::Data::DailyLimit::Credit }
81
+
82
+ # @!attribute debit
83
+ # Debit limits
84
+ #
85
+ # @return [Lithic::Models::TransferLimitsResponse::Data::DailyLimit::Debit]
86
+ required :debit, -> { Lithic::TransferLimitsResponse::Data::DailyLimit::Debit }
87
+
88
+ # @!method initialize(credit:, debit:)
89
+ # Daily limits with progress
90
+ #
91
+ # @param credit [Lithic::Models::TransferLimitsResponse::Data::DailyLimit::Credit] Credit limits
92
+ #
93
+ # @param debit [Lithic::Models::TransferLimitsResponse::Data::DailyLimit::Debit] Debit limits
94
+
95
+ # @see Lithic::Models::TransferLimitsResponse::Data::DailyLimit#credit
96
+ class Credit < Lithic::Internal::Type::BaseModel
97
+ # @!attribute limit
98
+ # The limit amount
99
+ #
100
+ # @return [Integer]
101
+ required :limit, Integer
102
+
103
+ # @!attribute amount_originated
104
+ # Amount originated towards limit
105
+ #
106
+ # @return [Integer, nil]
107
+ optional :amount_originated, Integer
108
+
109
+ # @!method initialize(limit:, amount_originated: nil)
110
+ # Credit limits
111
+ #
112
+ # @param limit [Integer] The limit amount
113
+ #
114
+ # @param amount_originated [Integer] Amount originated towards limit
115
+ end
116
+
117
+ # @see Lithic::Models::TransferLimitsResponse::Data::DailyLimit#debit
118
+ class Debit < Lithic::Internal::Type::BaseModel
119
+ # @!attribute limit
120
+ # The limit amount
121
+ #
122
+ # @return [Integer]
123
+ required :limit, Integer
124
+
125
+ # @!attribute amount_originated
126
+ # Amount originated towards limit
127
+ #
128
+ # @return [Integer, nil]
129
+ optional :amount_originated, Integer
130
+
131
+ # @!method initialize(limit:, amount_originated: nil)
132
+ # Debit limits
133
+ #
134
+ # @param limit [Integer] The limit amount
135
+ #
136
+ # @param amount_originated [Integer] Amount originated towards limit
137
+ end
138
+ end
139
+
140
+ # @see Lithic::Models::TransferLimitsResponse::Data#monthly_limit
141
+ class MonthlyLimit < Lithic::Internal::Type::BaseModel
142
+ # @!attribute credit
143
+ # Credit limits
144
+ #
145
+ # @return [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit::Credit]
146
+ required :credit, -> { Lithic::TransferLimitsResponse::Data::MonthlyLimit::Credit }
147
+
148
+ # @!attribute debit
149
+ # Debit limits
150
+ #
151
+ # @return [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit::Debit]
152
+ required :debit, -> { Lithic::TransferLimitsResponse::Data::MonthlyLimit::Debit }
153
+
154
+ # @!method initialize(credit:, debit:)
155
+ # Monthly limits with progress
156
+ #
157
+ # @param credit [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit::Credit] Credit limits
158
+ #
159
+ # @param debit [Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit::Debit] Debit limits
160
+
161
+ # @see Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit#credit
162
+ class Credit < Lithic::Internal::Type::BaseModel
163
+ # @!attribute limit
164
+ # The limit amount
165
+ #
166
+ # @return [Integer]
167
+ required :limit, Integer
168
+
169
+ # @!attribute amount_originated
170
+ # Amount originated towards limit
171
+ #
172
+ # @return [Integer, nil]
173
+ optional :amount_originated, Integer
174
+
175
+ # @!method initialize(limit:, amount_originated: nil)
176
+ # Credit limits
177
+ #
178
+ # @param limit [Integer] The limit amount
179
+ #
180
+ # @param amount_originated [Integer] Amount originated towards limit
181
+ end
182
+
183
+ # @see Lithic::Models::TransferLimitsResponse::Data::MonthlyLimit#debit
184
+ class Debit < Lithic::Internal::Type::BaseModel
185
+ # @!attribute limit
186
+ # The limit amount
187
+ #
188
+ # @return [Integer]
189
+ required :limit, Integer
190
+
191
+ # @!attribute amount_originated
192
+ # Amount originated towards limit
193
+ #
194
+ # @return [Integer, nil]
195
+ optional :amount_originated, Integer
196
+
197
+ # @!method initialize(limit:, amount_originated: nil)
198
+ # Debit limits
199
+ #
200
+ # @param limit [Integer] The limit amount
201
+ #
202
+ # @param amount_originated [Integer] Amount originated towards limit
203
+ end
204
+ end
205
+
206
+ # @see Lithic::Models::TransferLimitsResponse::Data#program_limit_per_transaction
207
+ class ProgramLimitPerTransaction < Lithic::Internal::Type::BaseModel
208
+ # @!attribute credit
209
+ # Credit limits
210
+ #
211
+ # @return [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Credit]
212
+ required :credit, -> { Lithic::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Credit }
213
+
214
+ # @!attribute debit
215
+ # Debit limits
216
+ #
217
+ # @return [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Debit]
218
+ required :debit, -> { Lithic::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Debit }
219
+
220
+ # @!method initialize(credit:, debit:)
221
+ # Program transaction limits
222
+ #
223
+ # @param credit [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Credit] Credit limits
224
+ #
225
+ # @param debit [Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction::Debit] Debit limits
226
+
227
+ # @see Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction#credit
228
+ class Credit < Lithic::Internal::Type::BaseModel
229
+ # @!attribute limit
230
+ # The limit amount
231
+ #
232
+ # @return [Integer]
233
+ required :limit, Integer
234
+
235
+ # @!attribute amount_originated
236
+ # Amount originated towards limit
237
+ #
238
+ # @return [Integer, nil]
239
+ optional :amount_originated, Integer
240
+
241
+ # @!method initialize(limit:, amount_originated: nil)
242
+ # Credit limits
243
+ #
244
+ # @param limit [Integer] The limit amount
245
+ #
246
+ # @param amount_originated [Integer] Amount originated towards limit
247
+ end
248
+
249
+ # @see Lithic::Models::TransferLimitsResponse::Data::ProgramLimitPerTransaction#debit
250
+ class Debit < Lithic::Internal::Type::BaseModel
251
+ # @!attribute limit
252
+ # The limit amount
253
+ #
254
+ # @return [Integer]
255
+ required :limit, Integer
256
+
257
+ # @!attribute amount_originated
258
+ # Amount originated towards limit
259
+ #
260
+ # @return [Integer, nil]
261
+ optional :amount_originated, Integer
262
+
263
+ # @!method initialize(limit:, amount_originated: nil)
264
+ # Debit limits
265
+ #
266
+ # @param limit [Integer] The limit amount
267
+ #
268
+ # @param amount_originated [Integer] Amount originated towards limit
269
+ end
270
+ end
271
+ end
272
+ end
273
+ end
274
+ end
data/lib/lithic/models.rb CHANGED
@@ -90,14 +90,8 @@ module Lithic
90
90
 
91
91
  AddressUpdate = Lithic::Models::AddressUpdate
92
92
 
93
- AggregateBalance = Lithic::Models::AggregateBalance
94
-
95
- AggregateBalanceListParams = Lithic::Models::AggregateBalanceListParams
96
-
97
93
  APIStatus = Lithic::Models::APIStatus
98
94
 
99
- AsaRequestWebhookEvent = Lithic::Models::AsaRequestWebhookEvent
100
-
101
95
  AuthRules = Lithic::Models::AuthRules
102
96
 
103
97
  AuthRulesBacktestReportCreatedWebhookEvent = Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent
@@ -122,6 +116,8 @@ module Lithic
122
116
 
123
117
  BookTransferRetrieveParams = Lithic::Models::BookTransferRetrieveParams
124
118
 
119
+ BookTransferRetryParams = Lithic::Models::BookTransferRetryParams
120
+
125
121
  BookTransferReverseParams = Lithic::Models::BookTransferReverseParams
126
122
 
127
123
  BookTransferTransactionCreatedWebhookEvent = Lithic::Models::BookTransferTransactionCreatedWebhookEvent
@@ -130,6 +126,9 @@ module Lithic
130
126
 
131
127
  Card = Lithic::Models::Card
132
128
 
129
+ CardAuthorizationApprovalRequestWebhookEvent =
130
+ Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent
131
+
133
132
  CardBulkOrder = Lithic::Models::CardBulkOrder
134
133
 
135
134
  CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams
@@ -190,6 +189,8 @@ module Lithic
190
189
 
191
190
  CardTransactionUpdatedWebhookEvent = Lithic::Models::CardTransactionUpdatedWebhookEvent
192
191
 
192
+ CardUpdatedWebhookEvent = Lithic::Models::CardUpdatedWebhookEvent
193
+
193
194
  CardUpdateParams = Lithic::Models::CardUpdateParams
194
195
 
195
196
  CardWebProvisionParams = Lithic::Models::CardWebProvisionParams
@@ -478,6 +479,9 @@ module Lithic
478
479
 
479
480
  ThreeDSAuthentication = Lithic::Models::ThreeDSAuthentication
480
481
 
482
+ ThreeDSAuthenticationApprovalRequestWebhookEvent =
483
+ Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent
484
+
481
485
  ThreeDSAuthenticationChallengeWebhookEvent = Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent
482
486
 
483
487
  ThreeDSAuthenticationCreatedWebhookEvent = Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent
@@ -562,6 +566,10 @@ module Lithic
562
566
 
563
567
  TransferCreateParams = Lithic::Models::TransferCreateParams
564
568
 
569
+ TransferLimitListParams = Lithic::Models::TransferLimitListParams
570
+
571
+ TransferLimitsResponse = Lithic::Models::TransferLimitsResponse
572
+
565
573
  VerificationMethod = Lithic::Models::VerificationMethod
566
574
 
567
575
  WalletDecisioningInfo = Lithic::Models::WalletDecisioningInfo
@@ -113,6 +113,33 @@ module Lithic
113
113
  )
114
114
  end
115
115
 
116
+ # Some parameter documentations has been truncated, see
117
+ # {Lithic::Models::BookTransferRetryParams} for more details.
118
+ #
119
+ # Retry a book transfer that has been declined
120
+ #
121
+ # @overload retry_(book_transfer_token, retry_token:, request_options: {})
122
+ #
123
+ # @param book_transfer_token [String] Token of the book transfer to retry
124
+ #
125
+ # @param retry_token [String] Customer-provided token that will serve as an idempotency token. This token will
126
+ #
127
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
128
+ #
129
+ # @return [Lithic::Models::BookTransferResponse]
130
+ #
131
+ # @see Lithic::Models::BookTransferRetryParams
132
+ def retry_(book_transfer_token, params)
133
+ parsed, options = Lithic::BookTransferRetryParams.dump_request(params)
134
+ @client.request(
135
+ method: :post,
136
+ path: ["v1/book_transfers/%1$s/retry", book_transfer_token],
137
+ body: parsed,
138
+ model: Lithic::BookTransferResponse,
139
+ options: options
140
+ )
141
+ end
142
+
116
143
  # Reverse a book transfer
117
144
  #
118
145
  # @overload reverse(book_transfer_token, memo: nil, request_options: {})
@@ -3,9 +3,6 @@
3
3
  module Lithic
4
4
  module Resources
5
5
  class Cards
6
- # @return [Lithic::Resources::Cards::AggregateBalances]
7
- attr_reader :aggregate_balances
8
-
9
6
  # @return [Lithic::Resources::Cards::Balances]
10
7
  attr_reader :balances
11
8
 
@@ -18,47 +15,49 @@ module Lithic
18
15
  # Create a new virtual or physical card. Parameters `shipping_address` and
19
16
  # `product_id` only apply to physical cards.
20
17
  #
21
- # @overload create(type:, account_token: nil, bulk_order_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_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
18
+ # @overload create(type:, account_token: nil, bulk_order_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_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {})
22
19
  #
23
- # @param type [Symbol, Lithic::Models::CardCreateParams::Type] Card types:
20
+ # @param type [Symbol, Lithic::Models::CardCreateParams::Type] Body param: Card types:
24
21
  #
25
- # @param account_token [String] Globally unique identifier for the account that the card will be associated with
22
+ # @param account_token [String] Body param: Globally unique identifier for the account that the card will be ass
26
23
  #
27
- # @param bulk_order_token [String] Globally unique identifier for an existing bulk order to associate this card wit
24
+ # @param bulk_order_token [String] Body param: Globally unique identifier for an existing bulk order to associate t
28
25
  #
29
- # @param card_program_token [String] For card programs with more than one BIN range. This must be configured with Lit
26
+ # @param card_program_token [String] Body param: For card programs with more than one BIN range. This must be configu
30
27
  #
31
- # @param carrier [Lithic::Models::Carrier]
28
+ # @param carrier [Lithic::Models::Carrier] Body param
32
29
  #
33
- # @param digital_card_art_token [String] Specifies the digital card art to be displayed in the user’s digital wallet afte
30
+ # @param digital_card_art_token [String] Body param: Specifies the digital card art to be displayed in the user’s digital
34
31
  #
35
- # @param exp_month [String] Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` is provided,
32
+ # @param exp_month [String] Body param: Two digit (MM) expiry month. If neither `exp_month` nor `exp_year` i
36
33
  #
37
- # @param exp_year [String] Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year` is provided
34
+ # @param exp_year [String] Body param: Four digit (yyyy) expiry year. If neither `exp_month` nor `exp_year`
38
35
  #
39
- # @param memo [String] Friendly name to identify the card.
36
+ # @param memo [String] Body param: Friendly name to identify the card.
40
37
  #
41
- # @param pin [String] Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL` and `VIRTUA
38
+ # @param pin [String] Body param: Encrypted PIN block (in base64). Applies to cards of type `PHYSICAL`
42
39
  #
43
- # @param product_id [String] Only applicable to cards of type `PHYSICAL`. This must be configured with Lithic
40
+ # @param product_id [String] Body param: Only applicable to cards of type `PHYSICAL`. This must be configured
44
41
  #
45
- # @param replacement_account_token [String] Restricted field limited to select use cases. Lithic will reach out directly if
42
+ # @param replacement_account_token [String] Body param: Restricted field limited to select use cases. Lithic will reach out
46
43
  #
47
- # @param replacement_comment [String] Additional context or information related to the card that this card will replac
44
+ # @param replacement_comment [String] Body param: Additional context or information related to the card that this card
48
45
  #
49
- # @param replacement_for [String] Globally unique identifier for the card that this card will replace. If the card
46
+ # @param replacement_for [String] Body param: Globally unique identifier for the card that this card will replace.
50
47
  #
51
- # @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Card state substatus values for the card that this card will replace:
48
+ # @param replacement_substatus [Symbol, Lithic::Models::CardCreateParams::ReplacementSubstatus] Body param: Card state substatus values for the card that this card will replace
52
49
  #
53
- # @param shipping_address [Lithic::Models::ShippingAddress]
50
+ # @param shipping_address [Lithic::Models::ShippingAddress] Body param
54
51
  #
55
- # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Shipping method for the card. Only applies to cards of type PHYSICAL.
52
+ # @param shipping_method [Symbol, Lithic::Models::CardCreateParams::ShippingMethod] Body param: Shipping method for the card. Only applies to cards of type PHYSICAL
56
53
  #
57
- # @param spend_limit [Integer] Amount (in cents) to limit approved authorizations (e.g. 100000 would be a $1,00
54
+ # @param spend_limit [Integer] Body param: Amount (in cents) to limit approved authorizations (e.g. 100000 woul
58
55
  #
59
- # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Spend limit duration values:
56
+ # @param spend_limit_duration [Symbol, Lithic::Models::SpendLimitDuration] Body param: Spend limit duration values:
60
57
  #
61
- # @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values:
58
+ # @param state [Symbol, Lithic::Models::CardCreateParams::State] Body param: Card state values:
59
+ #
60
+ # @param idempotency_key [String] Header param: Idempotency key for the request
62
61
  #
63
62
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
64
63
  #
@@ -67,7 +66,15 @@ module Lithic
67
66
  # @see Lithic::Models::CardCreateParams
68
67
  def create(params)
69
68
  parsed, options = Lithic::CardCreateParams.dump_request(params)
70
- @client.request(method: :post, path: "v1/cards", body: parsed, model: Lithic::Card, options: options)
69
+ header_params = {idempotency_key: "idempotency-key"}
70
+ @client.request(
71
+ method: :post,
72
+ path: "v1/cards",
73
+ headers: parsed.slice(*header_params.keys).transform_keys(header_params),
74
+ body: parsed.except(*header_params.keys),
75
+ model: Lithic::Card,
76
+ options: options
77
+ )
71
78
  end
72
79
 
73
80
  # Get card configuration such as spend limit and state.
@@ -447,7 +454,7 @@ module Lithic
447
454
  # {Lithic::Models::CardWebProvisionParams} for more details.
448
455
  #
449
456
  # Allow your cardholders to directly add payment cards to the device's digital
450
- # wallet from a browser on the web. Currently only suported for Apple Pay.
457
+ # wallet from a browser on the web.
451
458
  #
452
459
  # This requires some additional setup and configuration. Please
453
460
  # [Contact Us](https://lithic.com/contact) or your Customer Success representative
@@ -486,7 +493,6 @@ module Lithic
486
493
  # @param client [Lithic::Client]
487
494
  def initialize(client:)
488
495
  @client = client
489
- @aggregate_balances = Lithic::Resources::Cards::AggregateBalances.new(client: client)
490
496
  @balances = Lithic::Resources::Cards::Balances.new(client: client)
491
497
  @financial_transactions = Lithic::Resources::Cards::FinancialTransactions.new(client: client)
492
498
  end