increase 1.33.0 → 1.35.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 (84) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/increase/client.rb +12 -0
  5. data/lib/increase/models/card_push_transfer.rb +824 -0
  6. data/lib/increase/models/card_push_transfer_approve_params.rb +14 -0
  7. data/lib/increase/models/card_push_transfer_cancel_params.rb +14 -0
  8. data/lib/increase/models/card_push_transfer_create_params.rb +215 -0
  9. data/lib/increase/models/card_push_transfer_list_params.rb +159 -0
  10. data/lib/increase/models/card_push_transfer_retrieve_params.rb +14 -0
  11. data/lib/increase/models/card_token.rb +87 -0
  12. data/lib/increase/models/card_token_capabilities.rb +123 -0
  13. data/lib/increase/models/card_token_capabilities_params.rb +14 -0
  14. data/lib/increase/models/card_token_list_params.rb +83 -0
  15. data/lib/increase/models/card_token_retrieve_params.rb +14 -0
  16. data/lib/increase/models/card_validation.rb +759 -0
  17. data/lib/increase/models/card_validation_create_params.rb +116 -0
  18. data/lib/increase/models/card_validation_list_params.rb +150 -0
  19. data/lib/increase/models/card_validation_retrieve_params.rb +14 -0
  20. data/lib/increase/models/external_account.rb +3 -0
  21. data/lib/increase/models/external_account_create_params.rb +3 -0
  22. data/lib/increase/models/external_account_update_params.rb +3 -0
  23. data/lib/increase/models/simulations/card_token_create_params.rb +140 -0
  24. data/lib/increase/models.rb +30 -0
  25. data/lib/increase/resources/card_push_transfers.rb +167 -0
  26. data/lib/increase/resources/card_tokens.rb +86 -0
  27. data/lib/increase/resources/card_validations.rb +117 -0
  28. data/lib/increase/resources/simulations/card_tokens.rb +46 -0
  29. data/lib/increase/resources/simulations.rb +4 -0
  30. data/lib/increase/version.rb +1 -1
  31. data/lib/increase.rb +20 -0
  32. data/rbi/increase/client.rbi +9 -0
  33. data/rbi/increase/models/card_push_transfer.rbi +1450 -0
  34. data/rbi/increase/models/card_push_transfer_approve_params.rbi +30 -0
  35. data/rbi/increase/models/card_push_transfer_cancel_params.rbi +30 -0
  36. data/rbi/increase/models/card_push_transfer_create_params.rbi +325 -0
  37. data/rbi/increase/models/card_push_transfer_list_params.rbi +329 -0
  38. data/rbi/increase/models/card_push_transfer_retrieve_params.rbi +30 -0
  39. data/rbi/increase/models/card_token.rbi +108 -0
  40. data/rbi/increase/models/card_token_capabilities.rbi +250 -0
  41. data/rbi/increase/models/card_token_capabilities_params.rbi +30 -0
  42. data/rbi/increase/models/card_token_list_params.rbi +146 -0
  43. data/rbi/increase/models/card_token_retrieve_params.rbi +27 -0
  44. data/rbi/increase/models/card_validation.rbi +1438 -0
  45. data/rbi/increase/models/card_validation_create_params.rbi +155 -0
  46. data/rbi/increase/models/card_validation_list_params.rbi +295 -0
  47. data/rbi/increase/models/card_validation_retrieve_params.rbi +30 -0
  48. data/rbi/increase/models/external_account.rbi +7 -0
  49. data/rbi/increase/models/external_account_create_params.rbi +7 -0
  50. data/rbi/increase/models/external_account_update_params.rbi +7 -0
  51. data/rbi/increase/models/simulations/card_token_create_params.rbi +297 -0
  52. data/rbi/increase/models.rbi +32 -0
  53. data/rbi/increase/resources/card_push_transfers.rbi +157 -0
  54. data/rbi/increase/resources/card_tokens.rbi +62 -0
  55. data/rbi/increase/resources/card_validations.rbi +107 -0
  56. data/rbi/increase/resources/simulations/card_tokens.rbi +43 -0
  57. data/rbi/increase/resources/simulations.rbi +3 -0
  58. data/sig/increase/client.rbs +6 -0
  59. data/sig/increase/models/card_push_transfer.rbs +679 -0
  60. data/sig/increase/models/card_push_transfer_approve_params.rbs +15 -0
  61. data/sig/increase/models/card_push_transfer_cancel_params.rbs +15 -0
  62. data/sig/increase/models/card_push_transfer_create_params.rbs +172 -0
  63. data/sig/increase/models/card_push_transfer_list_params.rbs +163 -0
  64. data/sig/increase/models/card_push_transfer_retrieve_params.rbs +15 -0
  65. data/sig/increase/models/card_token.rbs +60 -0
  66. data/sig/increase/models/card_token_capabilities.rbs +104 -0
  67. data/sig/increase/models/card_token_capabilities_params.rbs +15 -0
  68. data/sig/increase/models/card_token_list_params.rbs +79 -0
  69. data/sig/increase/models/card_token_retrieve_params.rbs +15 -0
  70. data/sig/increase/models/card_validation.rbs +634 -0
  71. data/sig/increase/models/card_validation_create_params.rbs +91 -0
  72. data/sig/increase/models/card_validation_list_params.rbs +151 -0
  73. data/sig/increase/models/card_validation_retrieve_params.rbs +15 -0
  74. data/sig/increase/models/external_account.rbs +4 -1
  75. data/sig/increase/models/external_account_create_params.rbs +4 -1
  76. data/sig/increase/models/external_account_update_params.rbs +4 -1
  77. data/sig/increase/models/simulations/card_token_create_params.rbs +129 -0
  78. data/sig/increase/models.rbs +30 -0
  79. data/sig/increase/resources/card_push_transfers.rbs +53 -0
  80. data/sig/increase/resources/card_tokens.rbs +24 -0
  81. data/sig/increase/resources/card_validations.rbs +38 -0
  82. data/sig/increase/resources/simulations/card_tokens.rbs +18 -0
  83. data/sig/increase/resources/simulations.rbs +2 -0
  84. metadata +62 -2
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Models
5
+ # @see Increase::Resources::CardValidations#create
6
+ class CardValidationCreateParams < Increase::Internal::Type::BaseModel
7
+ extend Increase::Internal::Type::RequestParameters::Converter
8
+ include Increase::Internal::Type::RequestParameters
9
+
10
+ # @!attribute account_id
11
+ # The identifier of the Account from which to send the validation.
12
+ #
13
+ # @return [String]
14
+ required :account_id, String
15
+
16
+ # @!attribute card_token_id
17
+ # The Increase identifier for the Card Token that represents the card number
18
+ # you're validating.
19
+ #
20
+ # @return [String]
21
+ required :card_token_id, String
22
+
23
+ # @!attribute merchant_category_code
24
+ # A four-digit code (MCC) identifying the type of business or service provided by
25
+ # the merchant.
26
+ #
27
+ # @return [String]
28
+ required :merchant_category_code, String
29
+
30
+ # @!attribute merchant_city_name
31
+ # The city where the merchant (typically your business) is located.
32
+ #
33
+ # @return [String]
34
+ required :merchant_city_name, String
35
+
36
+ # @!attribute merchant_name
37
+ # The merchant name that will appear in the cardholder’s statement descriptor.
38
+ # Typically your business name.
39
+ #
40
+ # @return [String]
41
+ required :merchant_name, String
42
+
43
+ # @!attribute merchant_postal_code
44
+ # The postal code for the merchant’s (typically your business’s) location.
45
+ #
46
+ # @return [String]
47
+ required :merchant_postal_code, String
48
+
49
+ # @!attribute merchant_state
50
+ # The U.S. state where the merchant (typically your business) is located.
51
+ #
52
+ # @return [String]
53
+ required :merchant_state, String
54
+
55
+ # @!attribute cardholder_first_name
56
+ # The cardholder's first name.
57
+ #
58
+ # @return [String, nil]
59
+ optional :cardholder_first_name, String
60
+
61
+ # @!attribute cardholder_last_name
62
+ # The cardholder's last name.
63
+ #
64
+ # @return [String, nil]
65
+ optional :cardholder_last_name, String
66
+
67
+ # @!attribute cardholder_middle_name
68
+ # The cardholder's middle name.
69
+ #
70
+ # @return [String, nil]
71
+ optional :cardholder_middle_name, String
72
+
73
+ # @!attribute cardholder_postal_code
74
+ # The postal code of the cardholder's address.
75
+ #
76
+ # @return [String, nil]
77
+ optional :cardholder_postal_code, String
78
+
79
+ # @!attribute cardholder_street_address
80
+ # The cardholder's street address.
81
+ #
82
+ # @return [String, nil]
83
+ optional :cardholder_street_address, String
84
+
85
+ # @!method initialize(account_id:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_postal_code:, merchant_state:, cardholder_first_name: nil, cardholder_last_name: nil, cardholder_middle_name: nil, cardholder_postal_code: nil, cardholder_street_address: nil, request_options: {})
86
+ # Some parameter documentations has been truncated, see
87
+ # {Increase::Models::CardValidationCreateParams} for more details.
88
+ #
89
+ # @param account_id [String] The identifier of the Account from which to send the validation.
90
+ #
91
+ # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r
92
+ #
93
+ # @param merchant_category_code [String] A four-digit code (MCC) identifying the type of business or service provided by
94
+ #
95
+ # @param merchant_city_name [String] The city where the merchant (typically your business) is located.
96
+ #
97
+ # @param merchant_name [String] The merchant name that will appear in the cardholder’s statement descriptor. Typ
98
+ #
99
+ # @param merchant_postal_code [String] The postal code for the merchant’s (typically your business’s) location.
100
+ #
101
+ # @param merchant_state [String] The U.S. state where the merchant (typically your business) is located.
102
+ #
103
+ # @param cardholder_first_name [String] The cardholder's first name.
104
+ #
105
+ # @param cardholder_last_name [String] The cardholder's last name.
106
+ #
107
+ # @param cardholder_middle_name [String] The cardholder's middle name.
108
+ #
109
+ # @param cardholder_postal_code [String] The postal code of the cardholder's address.
110
+ #
111
+ # @param cardholder_street_address [String] The cardholder's street address.
112
+ #
113
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,150 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Models
5
+ # @see Increase::Resources::CardValidations#list
6
+ class CardValidationListParams < Increase::Internal::Type::BaseModel
7
+ extend Increase::Internal::Type::RequestParameters::Converter
8
+ include Increase::Internal::Type::RequestParameters
9
+
10
+ # @!attribute account_id
11
+ # Filter Card Validations to ones belonging to the specified Account.
12
+ #
13
+ # @return [String, nil]
14
+ optional :account_id, String
15
+
16
+ # @!attribute created_at
17
+ #
18
+ # @return [Increase::Models::CardValidationListParams::CreatedAt, nil]
19
+ optional :created_at, -> { Increase::CardValidationListParams::CreatedAt }
20
+
21
+ # @!attribute cursor
22
+ # Return the page of entries after this one.
23
+ #
24
+ # @return [String, nil]
25
+ optional :cursor, String
26
+
27
+ # @!attribute idempotency_key
28
+ # Filter records to the one with the specified `idempotency_key` you chose for
29
+ # that object. This value is unique across Increase and is used to ensure that a
30
+ # request is only processed once. Learn more about
31
+ # [idempotency](https://increase.com/documentation/idempotency-keys).
32
+ #
33
+ # @return [String, nil]
34
+ optional :idempotency_key, String
35
+
36
+ # @!attribute limit
37
+ # Limit the size of the list that is returned. The default (and maximum) is 100
38
+ # objects.
39
+ #
40
+ # @return [Integer, nil]
41
+ optional :limit, Integer
42
+
43
+ # @!attribute status
44
+ #
45
+ # @return [Increase::Models::CardValidationListParams::Status, nil]
46
+ optional :status, -> { Increase::CardValidationListParams::Status }
47
+
48
+ # @!method initialize(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
49
+ # Some parameter documentations has been truncated, see
50
+ # {Increase::Models::CardValidationListParams} for more details.
51
+ #
52
+ # @param account_id [String] Filter Card Validations to ones belonging to the specified Account.
53
+ #
54
+ # @param created_at [Increase::Models::CardValidationListParams::CreatedAt]
55
+ #
56
+ # @param cursor [String] Return the page of entries after this one.
57
+ #
58
+ # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
59
+ #
60
+ # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
61
+ #
62
+ # @param status [Increase::Models::CardValidationListParams::Status]
63
+ #
64
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
65
+
66
+ class CreatedAt < Increase::Internal::Type::BaseModel
67
+ # @!attribute after
68
+ # Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
69
+ # timestamp.
70
+ #
71
+ # @return [Time, nil]
72
+ optional :after, Time
73
+
74
+ # @!attribute before
75
+ # Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)
76
+ # timestamp.
77
+ #
78
+ # @return [Time, nil]
79
+ optional :before, Time
80
+
81
+ # @!attribute on_or_after
82
+ # Return results on or after this
83
+ # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
84
+ #
85
+ # @return [Time, nil]
86
+ optional :on_or_after, Time
87
+
88
+ # @!attribute on_or_before
89
+ # Return results on or before this
90
+ # [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
91
+ #
92
+ # @return [Time, nil]
93
+ optional :on_or_before, Time
94
+
95
+ # @!method initialize(after: nil, before: nil, on_or_after: nil, on_or_before: nil)
96
+ # Some parameter documentations has been truncated, see
97
+ # {Increase::Models::CardValidationListParams::CreatedAt} for more details.
98
+ #
99
+ # @param after [Time] Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) tim
100
+ #
101
+ # @param before [Time] Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) ti
102
+ #
103
+ # @param on_or_after [Time] Return results on or after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_860
104
+ #
105
+ # @param on_or_before [Time] Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_86
106
+ end
107
+
108
+ class Status < Increase::Internal::Type::BaseModel
109
+ # @!attribute in_
110
+ # Filter Card Validations by status. For GET requests, this should be encoded as a
111
+ # comma-delimited string, such as `?in=one,two,three`.
112
+ #
113
+ # @return [Array<Symbol, Increase::Models::CardValidationListParams::Status::In>, nil]
114
+ optional :in_,
115
+ -> {
116
+ Increase::Internal::Type::ArrayOf[enum: Increase::CardValidationListParams::Status::In]
117
+ },
118
+ api_name: :in
119
+
120
+ # @!method initialize(in_: nil)
121
+ # Some parameter documentations has been truncated, see
122
+ # {Increase::Models::CardValidationListParams::Status} for more details.
123
+ #
124
+ # @param in_ [Array<Symbol, Increase::Models::CardValidationListParams::Status::In>] Filter Card Validations by status. For GET requests, this should be encoded as a
125
+
126
+ module In
127
+ extend Increase::Internal::Type::Enum
128
+
129
+ # The validation requires attention from an Increase operator.
130
+ REQUIRES_ATTENTION = :requires_attention
131
+
132
+ # The validation is queued to be submitted to the card network.
133
+ PENDING_SUBMISSION = :pending_submission
134
+
135
+ # The validation has been submitted and is pending a response from the card network.
136
+ SUBMITTED = :submitted
137
+
138
+ # The validation has been sent successfully and is complete.
139
+ COMPLETE = :complete
140
+
141
+ # The validation was declined by the network or the recipient's bank.
142
+ DECLINED = :declined
143
+
144
+ # @!method self.values
145
+ # @return [Array<Symbol>]
146
+ end
147
+ end
148
+ end
149
+ end
150
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Models
5
+ # @see Increase::Resources::CardValidations#retrieve
6
+ class CardValidationRetrieveParams < Increase::Internal::Type::BaseModel
7
+ extend Increase::Internal::Type::RequestParameters::Converter
8
+ include Increase::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ end
@@ -126,6 +126,9 @@ module Increase
126
126
  # A savings account.
127
127
  SAVINGS = :savings
128
128
 
129
+ # A general ledger account.
130
+ GENERAL_LEDGER = :general_ledger
131
+
129
132
  # A different type of account.
130
133
  OTHER = :other
131
134
 
@@ -81,6 +81,9 @@ module Increase
81
81
  # A savings account.
82
82
  SAVINGS = :savings
83
83
 
84
+ # A general ledger account.
85
+ GENERAL_LEDGER = :general_ledger
86
+
84
87
  # A different type of account.
85
88
  OTHER = :other
86
89
 
@@ -66,6 +66,9 @@ module Increase
66
66
  # A savings account.
67
67
  SAVINGS = :savings
68
68
 
69
+ # A general ledger account.
70
+ GENERAL_LEDGER = :general_ledger
71
+
69
72
  # A different type of account.
70
73
  OTHER = :other
71
74
 
@@ -0,0 +1,140 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Models
5
+ module Simulations
6
+ # @see Increase::Resources::Simulations::CardTokens#create
7
+ class CardTokenCreateParams < Increase::Internal::Type::BaseModel
8
+ extend Increase::Internal::Type::RequestParameters::Converter
9
+ include Increase::Internal::Type::RequestParameters
10
+
11
+ # @!attribute capabilities
12
+ # The capabilities of the outbound card token.
13
+ #
14
+ # @return [Array<Increase::Models::Simulations::CardTokenCreateParams::Capability>, nil]
15
+ optional :capabilities,
16
+ -> {
17
+ Increase::Internal::Type::ArrayOf[Increase::Simulations::CardTokenCreateParams::Capability]
18
+ }
19
+
20
+ # @!attribute expiration
21
+ # The expiration date of the card.
22
+ #
23
+ # @return [Date, nil]
24
+ optional :expiration, Date
25
+
26
+ # @!attribute last4
27
+ # The last 4 digits of the card number.
28
+ #
29
+ # @return [String, nil]
30
+ optional :last4, String
31
+
32
+ # @!attribute prefix
33
+ # The prefix of the card number, usually the first 8 digits.
34
+ #
35
+ # @return [String, nil]
36
+ optional :prefix, String
37
+
38
+ # @!attribute primary_account_number_length
39
+ # The total length of the card number, including prefix and last4.
40
+ #
41
+ # @return [Integer, nil]
42
+ optional :primary_account_number_length, Integer
43
+
44
+ # @!method initialize(capabilities: nil, expiration: nil, last4: nil, prefix: nil, primary_account_number_length: nil, request_options: {})
45
+ # @param capabilities [Array<Increase::Models::Simulations::CardTokenCreateParams::Capability>] The capabilities of the outbound card token.
46
+ #
47
+ # @param expiration [Date] The expiration date of the card.
48
+ #
49
+ # @param last4 [String] The last 4 digits of the card number.
50
+ #
51
+ # @param prefix [String] The prefix of the card number, usually the first 8 digits.
52
+ #
53
+ # @param primary_account_number_length [Integer] The total length of the card number, including prefix and last4.
54
+ #
55
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}]
56
+
57
+ class Capability < Increase::Internal::Type::BaseModel
58
+ # @!attribute cross_border_push_transfers
59
+ # The cross-border push transfers capability.
60
+ #
61
+ # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers]
62
+ required :cross_border_push_transfers,
63
+ enum: -> {
64
+ Increase::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers
65
+ }
66
+
67
+ # @!attribute domestic_push_transfers
68
+ # The domestic push transfers capability.
69
+ #
70
+ # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers]
71
+ required :domestic_push_transfers,
72
+ enum: -> {
73
+ Increase::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers
74
+ }
75
+
76
+ # @!attribute route
77
+ # The route of the capability.
78
+ #
79
+ # @return [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::Route]
80
+ required :route, enum: -> { Increase::Simulations::CardTokenCreateParams::Capability::Route }
81
+
82
+ # @!method initialize(cross_border_push_transfers:, domestic_push_transfers:, route:)
83
+ # @param cross_border_push_transfers [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::CrossBorderPushTransfers] The cross-border push transfers capability.
84
+ #
85
+ # @param domestic_push_transfers [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::DomesticPushTransfers] The domestic push transfers capability.
86
+ #
87
+ # @param route [Symbol, Increase::Models::Simulations::CardTokenCreateParams::Capability::Route] The route of the capability.
88
+
89
+ # The cross-border push transfers capability.
90
+ #
91
+ # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#cross_border_push_transfers
92
+ module CrossBorderPushTransfers
93
+ extend Increase::Internal::Type::Enum
94
+
95
+ # The capability is supported.
96
+ SUPPORTED = :supported
97
+
98
+ # The capability is not supported.
99
+ NOT_SUPPORTED = :not_supported
100
+
101
+ # @!method self.values
102
+ # @return [Array<Symbol>]
103
+ end
104
+
105
+ # The domestic push transfers capability.
106
+ #
107
+ # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#domestic_push_transfers
108
+ module DomesticPushTransfers
109
+ extend Increase::Internal::Type::Enum
110
+
111
+ # The capability is supported.
112
+ SUPPORTED = :supported
113
+
114
+ # The capability is not supported.
115
+ NOT_SUPPORTED = :not_supported
116
+
117
+ # @!method self.values
118
+ # @return [Array<Symbol>]
119
+ end
120
+
121
+ # The route of the capability.
122
+ #
123
+ # @see Increase::Models::Simulations::CardTokenCreateParams::Capability#route
124
+ module Route
125
+ extend Increase::Internal::Type::Enum
126
+
127
+ # Visa and Interlink
128
+ VISA = :visa
129
+
130
+ # Mastercard and Maestro
131
+ MASTERCARD = :mastercard
132
+
133
+ # @!method self.values
134
+ # @return [Array<Symbol>]
135
+ end
136
+ end
137
+ end
138
+ end
139
+ end
140
+ end
@@ -159,10 +159,40 @@ module Increase
159
159
 
160
160
  CardPurchaseSupplementRetrieveParams = Increase::Models::CardPurchaseSupplementRetrieveParams
161
161
 
162
+ CardPushTransfer = Increase::Models::CardPushTransfer
163
+
164
+ CardPushTransferApproveParams = Increase::Models::CardPushTransferApproveParams
165
+
166
+ CardPushTransferCancelParams = Increase::Models::CardPushTransferCancelParams
167
+
168
+ CardPushTransferCreateParams = Increase::Models::CardPushTransferCreateParams
169
+
170
+ CardPushTransferListParams = Increase::Models::CardPushTransferListParams
171
+
172
+ CardPushTransferRetrieveParams = Increase::Models::CardPushTransferRetrieveParams
173
+
162
174
  CardRetrieveParams = Increase::Models::CardRetrieveParams
163
175
 
176
+ CardToken = Increase::Models::CardToken
177
+
178
+ CardTokenCapabilities = Increase::Models::CardTokenCapabilities
179
+
180
+ CardTokenCapabilitiesParams = Increase::Models::CardTokenCapabilitiesParams
181
+
182
+ CardTokenListParams = Increase::Models::CardTokenListParams
183
+
184
+ CardTokenRetrieveParams = Increase::Models::CardTokenRetrieveParams
185
+
164
186
  CardUpdateParams = Increase::Models::CardUpdateParams
165
187
 
188
+ CardValidation = Increase::Models::CardValidation
189
+
190
+ CardValidationCreateParams = Increase::Models::CardValidationCreateParams
191
+
192
+ CardValidationListParams = Increase::Models::CardValidationListParams
193
+
194
+ CardValidationRetrieveParams = Increase::Models::CardValidationRetrieveParams
195
+
166
196
  CheckDeposit = Increase::Models::CheckDeposit
167
197
 
168
198
  CheckDepositCreateParams = Increase::Models::CheckDepositCreateParams
@@ -0,0 +1,167 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Increase
4
+ module Resources
5
+ class CardPushTransfers
6
+ # Some parameter documentations has been truncated, see
7
+ # {Increase::Models::CardPushTransferCreateParams} for more details.
8
+ #
9
+ # Create a Card Push Transfer
10
+ #
11
+ # @overload create(amount:, business_application_identifier:, card_token_id:, merchant_category_code:, merchant_city_name:, merchant_name:, merchant_name_prefix:, merchant_postal_code:, merchant_state:, recipient_name:, sender_address_city:, sender_address_line1:, sender_address_postal_code:, sender_address_state:, sender_name:, source_account_number_id:, require_approval: nil, request_options: {})
12
+ #
13
+ # @param amount [Integer] The transfer amount in USD cents. For Card Push transfers, must be positive.
14
+ #
15
+ # @param business_application_identifier [Symbol, Increase::Models::CardPushTransferCreateParams::BusinessApplicationIdentifier] The Business Application Identifier describes the type of transaction being perf
16
+ #
17
+ # @param card_token_id [String] The Increase identifier for the Card Token that represents the card number you'r
18
+ #
19
+ # @param merchant_category_code [String] The merchant category code (MCC) of the merchant (generally your business) sendi
20
+ #
21
+ # @param merchant_city_name [String] The city name of the merchant (generally your business) sending the transfer.
22
+ #
23
+ # @param merchant_name [String] The merchant name shows up as the statement descriptor for the transfer. This is
24
+ #
25
+ # @param merchant_name_prefix [String] For certain Business Application Identifiers, the statement descriptor is `merch
26
+ #
27
+ # @param merchant_postal_code [String] The postal code of the merchant (generally your business) sending the transfer.
28
+ #
29
+ # @param merchant_state [String] The state of the merchant (generally your business) sending the transfer.
30
+ #
31
+ # @param recipient_name [String] The name of the funds recipient.
32
+ #
33
+ # @param sender_address_city [String] The city of the sender.
34
+ #
35
+ # @param sender_address_line1 [String] The address line 1 of the sender.
36
+ #
37
+ # @param sender_address_postal_code [String] The postal code of the sender.
38
+ #
39
+ # @param sender_address_state [String] The state of the sender.
40
+ #
41
+ # @param sender_name [String] The name of the funds originator.
42
+ #
43
+ # @param source_account_number_id [String] The identifier of the Account Number from which to send the transfer.
44
+ #
45
+ # @param require_approval [Boolean] Whether the transfer requires explicit approval via the dashboard or API.
46
+ #
47
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
48
+ #
49
+ # @return [Increase::Models::CardPushTransfer]
50
+ #
51
+ # @see Increase::Models::CardPushTransferCreateParams
52
+ def create(params)
53
+ parsed, options = Increase::CardPushTransferCreateParams.dump_request(params)
54
+ @client.request(
55
+ method: :post,
56
+ path: "card_push_transfers",
57
+ body: parsed,
58
+ model: Increase::CardPushTransfer,
59
+ options: options
60
+ )
61
+ end
62
+
63
+ # Retrieve a Card Push Transfer
64
+ #
65
+ # @overload retrieve(card_push_transfer_id, request_options: {})
66
+ #
67
+ # @param card_push_transfer_id [String] The identifier of the Card Push Transfer.
68
+ #
69
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
70
+ #
71
+ # @return [Increase::Models::CardPushTransfer]
72
+ #
73
+ # @see Increase::Models::CardPushTransferRetrieveParams
74
+ def retrieve(card_push_transfer_id, params = {})
75
+ @client.request(
76
+ method: :get,
77
+ path: ["card_push_transfers/%1$s", card_push_transfer_id],
78
+ model: Increase::CardPushTransfer,
79
+ options: params[:request_options]
80
+ )
81
+ end
82
+
83
+ # Some parameter documentations has been truncated, see
84
+ # {Increase::Models::CardPushTransferListParams} for more details.
85
+ #
86
+ # List Card Push Transfers
87
+ #
88
+ # @overload list(account_id: nil, created_at: nil, cursor: nil, idempotency_key: nil, limit: nil, status: nil, request_options: {})
89
+ #
90
+ # @param account_id [String] Filter Card Push Transfers to ones belonging to the specified Account.
91
+ #
92
+ # @param created_at [Increase::Models::CardPushTransferListParams::CreatedAt]
93
+ #
94
+ # @param cursor [String] Return the page of entries after this one.
95
+ #
96
+ # @param idempotency_key [String] Filter records to the one with the specified `idempotency_key` you chose for tha
97
+ #
98
+ # @param limit [Integer] Limit the size of the list that is returned. The default (and maximum) is 100 ob
99
+ #
100
+ # @param status [Increase::Models::CardPushTransferListParams::Status]
101
+ #
102
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
103
+ #
104
+ # @return [Increase::Internal::Page<Increase::Models::CardPushTransfer>]
105
+ #
106
+ # @see Increase::Models::CardPushTransferListParams
107
+ def list(params = {})
108
+ parsed, options = Increase::CardPushTransferListParams.dump_request(params)
109
+ @client.request(
110
+ method: :get,
111
+ path: "card_push_transfers",
112
+ query: parsed,
113
+ page: Increase::Internal::Page,
114
+ model: Increase::CardPushTransfer,
115
+ options: options
116
+ )
117
+ end
118
+
119
+ # Approves a Card Push Transfer in a pending_approval state.
120
+ #
121
+ # @overload approve(card_push_transfer_id, request_options: {})
122
+ #
123
+ # @param card_push_transfer_id [String] The identifier of the Card Push Transfer to approve.
124
+ #
125
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
126
+ #
127
+ # @return [Increase::Models::CardPushTransfer]
128
+ #
129
+ # @see Increase::Models::CardPushTransferApproveParams
130
+ def approve(card_push_transfer_id, params = {})
131
+ @client.request(
132
+ method: :post,
133
+ path: ["card_push_transfers/%1$s/approve", card_push_transfer_id],
134
+ model: Increase::CardPushTransfer,
135
+ options: params[:request_options]
136
+ )
137
+ end
138
+
139
+ # Cancels a Card Push Transfer in a pending_approval state.
140
+ #
141
+ # @overload cancel(card_push_transfer_id, request_options: {})
142
+ #
143
+ # @param card_push_transfer_id [String] The identifier of the pending Card Push Transfer to cancel.
144
+ #
145
+ # @param request_options [Increase::RequestOptions, Hash{Symbol=>Object}, nil]
146
+ #
147
+ # @return [Increase::Models::CardPushTransfer]
148
+ #
149
+ # @see Increase::Models::CardPushTransferCancelParams
150
+ def cancel(card_push_transfer_id, params = {})
151
+ @client.request(
152
+ method: :post,
153
+ path: ["card_push_transfers/%1$s/cancel", card_push_transfer_id],
154
+ model: Increase::CardPushTransfer,
155
+ options: params[:request_options]
156
+ )
157
+ end
158
+
159
+ # @api private
160
+ #
161
+ # @param client [Increase::Client]
162
+ def initialize(client:)
163
+ @client = client
164
+ end
165
+ end
166
+ end
167
+ end