lithic 0.1.0.pre.alpha.25 → 0.1.0.pre.alpha.27

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 (96) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -0
  3. data/README.md +94 -54
  4. data/lib/lithic/client.rb +8 -4
  5. data/lib/lithic/internal/transport/pooled_net_requester.rb +3 -1
  6. data/lib/lithic/internal/type/array_of.rb +8 -0
  7. data/lib/lithic/internal/type/base_model.rb +15 -0
  8. data/lib/lithic/internal/type/boolean.rb +8 -0
  9. data/lib/lithic/internal/type/enum.rb +12 -0
  10. data/lib/lithic/internal/type/file_input.rb +7 -0
  11. data/lib/lithic/internal/type/hash_of.rb +8 -0
  12. data/lib/lithic/internal/type/union.rb +12 -0
  13. data/lib/lithic/internal/type/unknown.rb +8 -0
  14. data/lib/lithic/internal/util.rb +45 -0
  15. data/lib/lithic/internal.rb +3 -0
  16. data/lib/lithic/models/account_holder_update_response.rb +0 -9
  17. data/lib/lithic/models/auth_rules/auth_rule_condition.rb +0 -4
  18. data/lib/lithic/models/auth_rules/v2_apply_response.rb +0 -20
  19. data/lib/lithic/models/auth_rules/v2_create_params.rb +0 -10
  20. data/lib/lithic/models/auth_rules/v2_create_response.rb +0 -20
  21. data/lib/lithic/models/auth_rules/v2_draft_params.rb +0 -10
  22. data/lib/lithic/models/auth_rules/v2_draft_response.rb +0 -20
  23. data/lib/lithic/models/auth_rules/v2_list_response.rb +0 -20
  24. data/lib/lithic/models/auth_rules/v2_promote_response.rb +0 -20
  25. data/lib/lithic/models/auth_rules/v2_retrieve_response.rb +0 -20
  26. data/lib/lithic/models/auth_rules/v2_update_response.rb +0 -20
  27. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +0 -4
  28. data/lib/lithic/models/card_web_provision_params.rb +32 -0
  29. data/lib/lithic/models/card_web_provision_response.rb +83 -0
  30. data/lib/lithic/models/funding_event_list_params.rb +43 -0
  31. data/lib/lithic/models/funding_event_list_response.rb +104 -0
  32. data/lib/lithic/models/funding_event_retrieve_details_params.rb +14 -0
  33. data/lib/lithic/models/funding_event_retrieve_details_response.rb +33 -0
  34. data/lib/lithic/models/funding_event_retrieve_params.rb +14 -0
  35. data/lib/lithic/models/funding_event_retrieve_response.rb +104 -0
  36. data/lib/lithic/models.rb +38 -19
  37. data/lib/lithic/resources/cards.rb +29 -0
  38. data/lib/lithic/resources/funding_events.rb +84 -0
  39. data/lib/lithic/version.rb +1 -1
  40. data/lib/lithic.rb +9 -0
  41. data/rbi/lithic/client.rbi +3 -0
  42. data/rbi/lithic/internal/transport/pooled_net_requester.rbi +5 -1
  43. data/rbi/lithic/internal/type/array_of.rbi +6 -0
  44. data/rbi/lithic/internal/type/base_model.rbi +5 -0
  45. data/rbi/lithic/internal/type/boolean.rbi +6 -0
  46. data/rbi/lithic/internal/type/enum.rbi +5 -0
  47. data/rbi/lithic/internal/type/file_input.rbi +5 -0
  48. data/rbi/lithic/internal/type/hash_of.rbi +6 -0
  49. data/rbi/lithic/internal/type/union.rbi +5 -0
  50. data/rbi/lithic/internal/type/unknown.rbi +6 -0
  51. data/rbi/lithic/internal/util.rbi +31 -0
  52. data/rbi/lithic/internal.rbi +3 -0
  53. data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +12 -4
  54. data/rbi/lithic/models/auth_rules/v2_apply_response.rbi +4 -20
  55. data/rbi/lithic/models/auth_rules/v2_create_response.rbi +4 -20
  56. data/rbi/lithic/models/auth_rules/v2_draft_response.rbi +4 -20
  57. data/rbi/lithic/models/auth_rules/v2_list_response.rbi +4 -20
  58. data/rbi/lithic/models/auth_rules/v2_promote_response.rbi +4 -20
  59. data/rbi/lithic/models/auth_rules/v2_retrieve_response.rbi +4 -20
  60. data/rbi/lithic/models/auth_rules/v2_update_response.rbi +4 -20
  61. data/rbi/lithic/models/card_web_provision_params.rbi +84 -0
  62. data/rbi/lithic/models/card_web_provision_response.rbi +169 -0
  63. data/rbi/lithic/models/funding_event_list_params.rbi +72 -0
  64. data/rbi/lithic/models/funding_event_list_response.rbi +177 -0
  65. data/rbi/lithic/models/funding_event_retrieve_details_params.rbi +30 -0
  66. data/rbi/lithic/models/funding_event_retrieve_details_response.rbi +56 -0
  67. data/rbi/lithic/models/funding_event_retrieve_params.rbi +27 -0
  68. data/rbi/lithic/models/funding_event_retrieve_response.rbi +177 -0
  69. data/rbi/lithic/models.rbi +9 -0
  70. data/rbi/lithic/resources/account_holders.rbi +1 -6
  71. data/rbi/lithic/resources/cards.rbi +23 -0
  72. data/rbi/lithic/resources/funding_events.rbi +64 -0
  73. data/sig/lithic/client.rbs +2 -0
  74. data/sig/lithic/internal/transport/pooled_net_requester.rbs +2 -0
  75. data/sig/lithic/internal/type/array_of.rbs +3 -0
  76. data/sig/lithic/internal/type/base_model.rbs +2 -0
  77. data/sig/lithic/internal/type/boolean.rbs +3 -0
  78. data/sig/lithic/internal/type/enum.rbs +2 -0
  79. data/sig/lithic/internal/type/file_input.rbs +2 -0
  80. data/sig/lithic/internal/type/hash_of.rbs +3 -0
  81. data/sig/lithic/internal/type/union.rbs +2 -0
  82. data/sig/lithic/internal/type/unknown.rbs +3 -0
  83. data/sig/lithic/internal/util.rbs +12 -0
  84. data/sig/lithic/internal.rbs +2 -0
  85. data/sig/lithic/models/card_web_provision_params.rbs +33 -0
  86. data/sig/lithic/models/card_web_provision_response.rbs +68 -0
  87. data/sig/lithic/models/funding_event_list_params.rbs +31 -0
  88. data/sig/lithic/models/funding_event_list_response.rbs +65 -0
  89. data/sig/lithic/models/funding_event_retrieve_details_params.rbs +13 -0
  90. data/sig/lithic/models/funding_event_retrieve_details_response.rbs +24 -0
  91. data/sig/lithic/models/funding_event_retrieve_params.rbs +13 -0
  92. data/sig/lithic/models/funding_event_retrieve_response.rbs +65 -0
  93. data/sig/lithic/models.rbs +8 -0
  94. data/sig/lithic/resources/cards.rbs +6 -0
  95. data/sig/lithic/resources/funding_events.rbs +24 -0
  96. metadata +29 -2
@@ -181,16 +181,6 @@ module Lithic
181
181
 
182
182
  # @!method self.variants
183
183
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters)]
184
-
185
- define_sorbet_constant!(:Variants) do
186
- T.type_alias do
187
- T.any(
188
- Lithic::AuthRules::ConditionalBlockParameters,
189
- Lithic::AuthRules::VelocityLimitParams,
190
- Lithic::Models::AuthRules::V2CreateResponse::CurrentVersion::Parameters::MerchantLockParameters
191
- )
192
- end
193
- end
194
184
  end
195
185
  end
196
186
 
@@ -290,16 +280,6 @@ module Lithic
290
280
 
291
281
  # @!method self.variants
292
282
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters)]
293
-
294
- define_sorbet_constant!(:Variants) do
295
- T.type_alias do
296
- T.any(
297
- Lithic::AuthRules::ConditionalBlockParameters,
298
- Lithic::AuthRules::VelocityLimitParams,
299
- Lithic::Models::AuthRules::V2CreateResponse::DraftVersion::Parameters::MerchantLockParameters
300
- )
301
- end
302
- end
303
283
  end
304
284
  end
305
285
 
@@ -90,16 +90,6 @@ module Lithic
90
90
 
91
91
  # @!method self.variants
92
92
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::AuthRules::V2DraftParams::Parameters::MerchantLockParameters)]
93
-
94
- define_sorbet_constant!(:Variants) do
95
- T.type_alias do
96
- T.any(
97
- Lithic::AuthRules::ConditionalBlockParameters,
98
- Lithic::AuthRules::VelocityLimitParams,
99
- Lithic::AuthRules::V2DraftParams::Parameters::MerchantLockParameters
100
- )
101
- end
102
- end
103
93
  end
104
94
  end
105
95
  end
@@ -180,16 +180,6 @@ module Lithic
180
180
 
181
181
  # @!method self.variants
182
182
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::MerchantLockParameters)]
183
-
184
- define_sorbet_constant!(:Variants) do
185
- T.type_alias do
186
- T.any(
187
- Lithic::AuthRules::ConditionalBlockParameters,
188
- Lithic::AuthRules::VelocityLimitParams,
189
- Lithic::Models::AuthRules::V2DraftResponse::CurrentVersion::Parameters::MerchantLockParameters
190
- )
191
- end
192
- end
193
183
  end
194
184
  end
195
185
 
@@ -289,16 +279,6 @@ module Lithic
289
279
 
290
280
  # @!method self.variants
291
281
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::MerchantLockParameters)]
292
-
293
- define_sorbet_constant!(:Variants) do
294
- T.type_alias do
295
- T.any(
296
- Lithic::AuthRules::ConditionalBlockParameters,
297
- Lithic::AuthRules::VelocityLimitParams,
298
- Lithic::Models::AuthRules::V2DraftResponse::DraftVersion::Parameters::MerchantLockParameters
299
- )
300
- end
301
- end
302
282
  end
303
283
  end
304
284
 
@@ -180,16 +180,6 @@ module Lithic
180
180
 
181
181
  # @!method self.variants
182
182
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2ListResponse::CurrentVersion::Parameters::MerchantLockParameters)]
183
-
184
- define_sorbet_constant!(:Variants) do
185
- T.type_alias do
186
- T.any(
187
- Lithic::AuthRules::ConditionalBlockParameters,
188
- Lithic::AuthRules::VelocityLimitParams,
189
- Lithic::Models::AuthRules::V2ListResponse::CurrentVersion::Parameters::MerchantLockParameters
190
- )
191
- end
192
- end
193
183
  end
194
184
  end
195
185
 
@@ -289,16 +279,6 @@ module Lithic
289
279
 
290
280
  # @!method self.variants
291
281
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2ListResponse::DraftVersion::Parameters::MerchantLockParameters)]
292
-
293
- define_sorbet_constant!(:Variants) do
294
- T.type_alias do
295
- T.any(
296
- Lithic::AuthRules::ConditionalBlockParameters,
297
- Lithic::AuthRules::VelocityLimitParams,
298
- Lithic::Models::AuthRules::V2ListResponse::DraftVersion::Parameters::MerchantLockParameters
299
- )
300
- end
301
- end
302
282
  end
303
283
  end
304
284
 
@@ -181,16 +181,6 @@ module Lithic
181
181
 
182
182
  # @!method self.variants
183
183
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2PromoteResponse::CurrentVersion::Parameters::MerchantLockParameters)]
184
-
185
- define_sorbet_constant!(:Variants) do
186
- T.type_alias do
187
- T.any(
188
- Lithic::AuthRules::ConditionalBlockParameters,
189
- Lithic::AuthRules::VelocityLimitParams,
190
- Lithic::Models::AuthRules::V2PromoteResponse::CurrentVersion::Parameters::MerchantLockParameters
191
- )
192
- end
193
- end
194
184
  end
195
185
  end
196
186
 
@@ -290,16 +280,6 @@ module Lithic
290
280
 
291
281
  # @!method self.variants
292
282
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2PromoteResponse::DraftVersion::Parameters::MerchantLockParameters)]
293
-
294
- define_sorbet_constant!(:Variants) do
295
- T.type_alias do
296
- T.any(
297
- Lithic::AuthRules::ConditionalBlockParameters,
298
- Lithic::AuthRules::VelocityLimitParams,
299
- Lithic::Models::AuthRules::V2PromoteResponse::DraftVersion::Parameters::MerchantLockParameters
300
- )
301
- end
302
- end
303
283
  end
304
284
  end
305
285
 
@@ -188,16 +188,6 @@ module Lithic
188
188
 
189
189
  # @!method self.variants
190
190
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2RetrieveResponse::CurrentVersion::Parameters::MerchantLockParameters)]
191
-
192
- define_sorbet_constant!(:Variants) do
193
- T.type_alias do
194
- T.any(
195
- Lithic::AuthRules::ConditionalBlockParameters,
196
- Lithic::AuthRules::VelocityLimitParams,
197
- Lithic::Models::AuthRules::V2RetrieveResponse::CurrentVersion::Parameters::MerchantLockParameters
198
- )
199
- end
200
- end
201
191
  end
202
192
  end
203
193
 
@@ -298,16 +288,6 @@ module Lithic
298
288
 
299
289
  # @!method self.variants
300
290
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2RetrieveResponse::DraftVersion::Parameters::MerchantLockParameters)]
301
-
302
- define_sorbet_constant!(:Variants) do
303
- T.type_alias do
304
- T.any(
305
- Lithic::AuthRules::ConditionalBlockParameters,
306
- Lithic::AuthRules::VelocityLimitParams,
307
- Lithic::Models::AuthRules::V2RetrieveResponse::DraftVersion::Parameters::MerchantLockParameters
308
- )
309
- end
310
- end
311
291
  end
312
292
  end
313
293
 
@@ -181,16 +181,6 @@ module Lithic
181
181
 
182
182
  # @!method self.variants
183
183
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2UpdateResponse::CurrentVersion::Parameters::MerchantLockParameters)]
184
-
185
- define_sorbet_constant!(:Variants) do
186
- T.type_alias do
187
- T.any(
188
- Lithic::AuthRules::ConditionalBlockParameters,
189
- Lithic::AuthRules::VelocityLimitParams,
190
- Lithic::Models::AuthRules::V2UpdateResponse::CurrentVersion::Parameters::MerchantLockParameters
191
- )
192
- end
193
- end
194
184
  end
195
185
  end
196
186
 
@@ -290,16 +280,6 @@ module Lithic
290
280
 
291
281
  # @!method self.variants
292
282
  # @return [Array(Lithic::AuthRules::ConditionalBlockParameters, Lithic::AuthRules::VelocityLimitParams, Lithic::Models::AuthRules::V2UpdateResponse::DraftVersion::Parameters::MerchantLockParameters)]
293
-
294
- define_sorbet_constant!(:Variants) do
295
- T.type_alias do
296
- T.any(
297
- Lithic::AuthRules::ConditionalBlockParameters,
298
- Lithic::AuthRules::VelocityLimitParams,
299
- Lithic::Models::AuthRules::V2UpdateResponse::DraftVersion::Parameters::MerchantLockParameters
300
- )
301
- end
302
- end
303
283
  end
304
284
  end
305
285
 
@@ -117,10 +117,6 @@ module Lithic
117
117
 
118
118
  # @!method self.variants
119
119
  # @return [Array(Integer, Symbol, Lithic::AuthRules::VelocityLimitParamsPeriodWindow)]
120
-
121
- define_sorbet_constant!(:Variants) do
122
- T.type_alias { T.any(Integer, Lithic::AuthRules::VelocityLimitParamsPeriodWindow::TaggedSymbol) }
123
- end
124
120
  end
125
121
 
126
122
  # @see Lithic::AuthRules::VelocityLimitParams#scope
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Cards#web_provision
6
+ class CardWebProvisionParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute digital_wallet
11
+ # Name of digital wallet provider.
12
+ #
13
+ # @return [Symbol, Lithic::CardWebProvisionParams::DigitalWallet, nil]
14
+ optional :digital_wallet, enum: -> { Lithic::CardWebProvisionParams::DigitalWallet }
15
+
16
+ # @!method initialize(digital_wallet: nil, request_options: {})
17
+ # @param digital_wallet [Symbol, Lithic::CardWebProvisionParams::DigitalWallet] Name of digital wallet provider.
18
+ #
19
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
20
+
21
+ # Name of digital wallet provider.
22
+ module DigitalWallet
23
+ extend Lithic::Internal::Type::Enum
24
+
25
+ APPLE_PAY = :APPLE_PAY
26
+
27
+ # @!method self.values
28
+ # @return [Array<Symbol>]
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,83 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::Cards#web_provision
6
+ class CardWebProvisionResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute jws
8
+ # JWS object required for handoff to Apple's script.
9
+ #
10
+ # @return [Lithic::Models::CardWebProvisionResponse::Jws, nil]
11
+ optional :jws, -> { Lithic::Models::CardWebProvisionResponse::Jws }
12
+
13
+ # @!attribute state
14
+ # A unique identifier for the JWS object.
15
+ #
16
+ # @return [String, nil]
17
+ optional :state, String
18
+
19
+ # @!method initialize(jws: nil, state: nil)
20
+ # @param jws [Lithic::Models::CardWebProvisionResponse::Jws] JWS object required for handoff to Apple's script.
21
+ #
22
+ # @param state [String] A unique identifier for the JWS object.
23
+
24
+ # @see Lithic::Models::CardWebProvisionResponse#jws
25
+ class Jws < Lithic::Internal::Type::BaseModel
26
+ # @!attribute header
27
+ # JWS unprotected headers containing header parameters that aren't
28
+ # integrity-protected by the JWS signature.
29
+ #
30
+ # @return [Lithic::Models::CardWebProvisionResponse::Jws::Header, nil]
31
+ optional :header, -> { Lithic::Models::CardWebProvisionResponse::Jws::Header }
32
+
33
+ # @!attribute payload
34
+ # Base64url encoded JSON object containing the provisioning payload.
35
+ #
36
+ # @return [String, nil]
37
+ optional :payload, String
38
+
39
+ # @!attribute protected
40
+ # Base64url encoded JWS protected headers containing the header parameters that
41
+ # are integrity-protected by the JWS signature.
42
+ #
43
+ # @return [String, nil]
44
+ optional :protected, String
45
+
46
+ # @!attribute signature
47
+ # Base64url encoded signature of the JWS object.
48
+ #
49
+ # @return [String, nil]
50
+ optional :signature, String
51
+
52
+ # @!method initialize(header: nil, payload: nil, protected: nil, signature: nil)
53
+ # Some parameter documentations has been truncated, see
54
+ # {Lithic::Models::CardWebProvisionResponse::Jws} for more details.
55
+ #
56
+ # JWS object required for handoff to Apple's script.
57
+ #
58
+ # @param header [Lithic::Models::CardWebProvisionResponse::Jws::Header] JWS unprotected headers containing header parameters that aren't integrity-prote
59
+ #
60
+ # @param payload [String] Base64url encoded JSON object containing the provisioning payload.
61
+ #
62
+ # @param protected [String] Base64url encoded JWS protected headers containing the header parameters that ar
63
+ #
64
+ # @param signature [String] Base64url encoded signature of the JWS object.
65
+
66
+ # @see Lithic::Models::CardWebProvisionResponse::Jws#header
67
+ class Header < Lithic::Internal::Type::BaseModel
68
+ # @!attribute kid
69
+ # The ID for the JWS Public Key of the key pair used to generate the signature.
70
+ #
71
+ # @return [String, nil]
72
+ optional :kid, String
73
+
74
+ # @!method initialize(kid: nil)
75
+ # JWS unprotected headers containing header parameters that aren't
76
+ # integrity-protected by the JWS signature.
77
+ #
78
+ # @param kid [String] The ID for the JWS Public Key of the key pair used to generate the signature.
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,43 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#list
6
+ class FundingEventListParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!attribute ending_before
11
+ # A cursor representing an item's token before which a page of results should end.
12
+ # Used to retrieve the previous page of results before this item.
13
+ #
14
+ # @return [String, nil]
15
+ optional :ending_before, String
16
+
17
+ # @!attribute page_size
18
+ # Page size (for pagination).
19
+ #
20
+ # @return [Integer, nil]
21
+ optional :page_size, Integer
22
+
23
+ # @!attribute starting_after
24
+ # A cursor representing an item's token after which a page of results should
25
+ # begin. Used to retrieve the next page of results after this item.
26
+ #
27
+ # @return [String, nil]
28
+ optional :starting_after, String
29
+
30
+ # @!method initialize(ending_before: nil, page_size: nil, starting_after: nil, request_options: {})
31
+ # Some parameter documentations has been truncated, see
32
+ # {Lithic::Models::FundingEventListParams} for more details.
33
+ #
34
+ # @param ending_before [String] A cursor representing an item's token before which a page of results should end.
35
+ #
36
+ # @param page_size [Integer] Page size (for pagination).
37
+ #
38
+ # @param starting_after [String] A cursor representing an item's token after which a page of results should begin
39
+ #
40
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#list
6
+ class FundingEventListResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # Unique token ID
9
+ #
10
+ # @return [String]
11
+ required :token, String
12
+
13
+ # @!attribute collection_resource_type
14
+ # Collection resource type
15
+ #
16
+ # @return [Symbol, Lithic::Models::FundingEventListResponse::CollectionResourceType]
17
+ required :collection_resource_type,
18
+ enum: -> { Lithic::Models::FundingEventListResponse::CollectionResourceType }
19
+
20
+ # @!attribute collection_tokens
21
+ # IDs of collections
22
+ #
23
+ # @return [Array<String>]
24
+ required :collection_tokens, Lithic::Internal::Type::ArrayOf[String]
25
+
26
+ # @!attribute created
27
+ # Time of the creation
28
+ #
29
+ # @return [Time]
30
+ required :created, Time
31
+
32
+ # @!attribute high_watermark
33
+ # Time of the high watermark
34
+ #
35
+ # @return [Time]
36
+ required :high_watermark, Time
37
+
38
+ # @!attribute previous_high_watermark
39
+ # Time of the previous high watermark
40
+ #
41
+ # @return [Time]
42
+ required :previous_high_watermark, Time
43
+
44
+ # @!attribute settlement_breakdowns
45
+ # List of settlements
46
+ #
47
+ # @return [Array<Lithic::Models::FundingEventListResponse::SettlementBreakdown>]
48
+ required :settlement_breakdowns,
49
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::FundingEventListResponse::SettlementBreakdown] }
50
+
51
+ # @!attribute updated
52
+ # Time of the update
53
+ #
54
+ # @return [Time]
55
+ required :updated, Time
56
+
57
+ # @!method initialize(token:, collection_resource_type:, collection_tokens:, created:, high_watermark:, previous_high_watermark:, settlement_breakdowns:, updated:)
58
+ # @param token [String] Unique token ID
59
+ #
60
+ # @param collection_resource_type [Symbol, Lithic::Models::FundingEventListResponse::CollectionResourceType] Collection resource type
61
+ #
62
+ # @param collection_tokens [Array<String>] IDs of collections
63
+ #
64
+ # @param created [Time] Time of the creation
65
+ #
66
+ # @param high_watermark [Time] Time of the high watermark
67
+ #
68
+ # @param previous_high_watermark [Time] Time of the previous high watermark
69
+ #
70
+ # @param settlement_breakdowns [Array<Lithic::Models::FundingEventListResponse::SettlementBreakdown>] List of settlements
71
+ #
72
+ # @param updated [Time] Time of the update
73
+
74
+ # Collection resource type
75
+ #
76
+ # @see Lithic::Models::FundingEventListResponse#collection_resource_type
77
+ module CollectionResourceType
78
+ extend Lithic::Internal::Type::Enum
79
+
80
+ BOOK_TRANSFER = :BOOK_TRANSFER
81
+ PAYMENT = :PAYMENT
82
+
83
+ # @!method self.values
84
+ # @return [Array<Symbol>]
85
+ end
86
+
87
+ class SettlementBreakdown < Lithic::Internal::Type::BaseModel
88
+ # @!attribute amount
89
+ #
90
+ # @return [Integer]
91
+ required :amount, Integer
92
+
93
+ # @!attribute settlement_date
94
+ #
95
+ # @return [Date]
96
+ required :settlement_date, Date
97
+
98
+ # @!method initialize(amount:, settlement_date:)
99
+ # @param amount [Integer]
100
+ # @param settlement_date [Date]
101
+ end
102
+ end
103
+ end
104
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#retrieve_details
6
+ class FundingEventRetrieveDetailsParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,33 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#retrieve_details
6
+ class FundingEventRetrieveDetailsResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # Unique token ID
9
+ #
10
+ # @return [String]
11
+ required :token, String
12
+
13
+ # @!attribute settlement_details_url
14
+ # URL of the settlement details
15
+ #
16
+ # @return [String]
17
+ required :settlement_details_url, String
18
+
19
+ # @!attribute settlement_summary_url
20
+ # URL of the settlement summary
21
+ #
22
+ # @return [String]
23
+ required :settlement_summary_url, String
24
+
25
+ # @!method initialize(token:, settlement_details_url:, settlement_summary_url:)
26
+ # @param token [String] Unique token ID
27
+ #
28
+ # @param settlement_details_url [String] URL of the settlement details
29
+ #
30
+ # @param settlement_summary_url [String] URL of the settlement summary
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#retrieve
6
+ class FundingEventRetrieveParams < Lithic::Internal::Type::BaseModel
7
+ extend Lithic::Internal::Type::RequestParameters::Converter
8
+ include Lithic::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,104 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ # @see Lithic::Resources::FundingEvents#retrieve
6
+ class FundingEventRetrieveResponse < Lithic::Internal::Type::BaseModel
7
+ # @!attribute token
8
+ # Unique token ID
9
+ #
10
+ # @return [String]
11
+ required :token, String
12
+
13
+ # @!attribute collection_resource_type
14
+ # Collection resource type
15
+ #
16
+ # @return [Symbol, Lithic::Models::FundingEventRetrieveResponse::CollectionResourceType]
17
+ required :collection_resource_type,
18
+ enum: -> { Lithic::Models::FundingEventRetrieveResponse::CollectionResourceType }
19
+
20
+ # @!attribute collection_tokens
21
+ # IDs of collections
22
+ #
23
+ # @return [Array<String>]
24
+ required :collection_tokens, Lithic::Internal::Type::ArrayOf[String]
25
+
26
+ # @!attribute created
27
+ # Time of the creation
28
+ #
29
+ # @return [Time]
30
+ required :created, Time
31
+
32
+ # @!attribute high_watermark
33
+ # Time of the high watermark
34
+ #
35
+ # @return [Time]
36
+ required :high_watermark, Time
37
+
38
+ # @!attribute previous_high_watermark
39
+ # Time of the previous high watermark
40
+ #
41
+ # @return [Time]
42
+ required :previous_high_watermark, Time
43
+
44
+ # @!attribute settlement_breakdowns
45
+ # List of settlements
46
+ #
47
+ # @return [Array<Lithic::Models::FundingEventRetrieveResponse::SettlementBreakdown>]
48
+ required :settlement_breakdowns,
49
+ -> { Lithic::Internal::Type::ArrayOf[Lithic::Models::FundingEventRetrieveResponse::SettlementBreakdown] }
50
+
51
+ # @!attribute updated
52
+ # Time of the update
53
+ #
54
+ # @return [Time]
55
+ required :updated, Time
56
+
57
+ # @!method initialize(token:, collection_resource_type:, collection_tokens:, created:, high_watermark:, previous_high_watermark:, settlement_breakdowns:, updated:)
58
+ # @param token [String] Unique token ID
59
+ #
60
+ # @param collection_resource_type [Symbol, Lithic::Models::FundingEventRetrieveResponse::CollectionResourceType] Collection resource type
61
+ #
62
+ # @param collection_tokens [Array<String>] IDs of collections
63
+ #
64
+ # @param created [Time] Time of the creation
65
+ #
66
+ # @param high_watermark [Time] Time of the high watermark
67
+ #
68
+ # @param previous_high_watermark [Time] Time of the previous high watermark
69
+ #
70
+ # @param settlement_breakdowns [Array<Lithic::Models::FundingEventRetrieveResponse::SettlementBreakdown>] List of settlements
71
+ #
72
+ # @param updated [Time] Time of the update
73
+
74
+ # Collection resource type
75
+ #
76
+ # @see Lithic::Models::FundingEventRetrieveResponse#collection_resource_type
77
+ module CollectionResourceType
78
+ extend Lithic::Internal::Type::Enum
79
+
80
+ BOOK_TRANSFER = :BOOK_TRANSFER
81
+ PAYMENT = :PAYMENT
82
+
83
+ # @!method self.values
84
+ # @return [Array<Symbol>]
85
+ end
86
+
87
+ class SettlementBreakdown < Lithic::Internal::Type::BaseModel
88
+ # @!attribute amount
89
+ #
90
+ # @return [Integer]
91
+ required :amount, Integer
92
+
93
+ # @!attribute settlement_date
94
+ #
95
+ # @return [Date]
96
+ required :settlement_date, Date
97
+
98
+ # @!method initialize(amount:, settlement_date:)
99
+ # @param amount [Integer]
100
+ # @param settlement_date [Date]
101
+ end
102
+ end
103
+ end
104
+ end