Class: Stripe::Issuing::Transaction::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Issuing::Transaction::TestHelpers
- Defined in:
- lib/stripe/resources/issuing/transaction.rb
Constant Summary collapse
- RESOURCE_CLASS =
Transaction
Class Method Summary collapse
-
.create_force_capture(params = {}, opts = {}) ⇒ Object
Allows the user to capture an arbitrary amount, also known as a forced capture.
-
.create_unlinked_refund(params = {}, opts = {}) ⇒ Object
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
-
.refund(transaction, params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
- .resource_class ⇒ Object
Instance Method Summary collapse
-
#refund(params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
Methods inherited from APIResourceTestHelpers
custom_method, #initialize, resource_url, #resource_url
Methods included from APIOperations::Request
Constructor Details
This class inherits a constructor from Stripe::APIResourceTestHelpers
Class Method Details
.create_force_capture(params = {}, opts = {}) ⇒ Object
Allows the user to capture an arbitrary amount, also known as a forced capture.
1149 1150 1151 1152 1153 1154 1155 1156 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 1149 def self.create_force_capture(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/test_helpers/issuing/transactions/create_force_capture", params: params, opts: opts ) end |
.create_unlinked_refund(params = {}, opts = {}) ⇒ Object
Allows the user to refund an arbitrary amount, also known as a unlinked refund.
1159 1160 1161 1162 1163 1164 1165 1166 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 1159 def self.create_unlinked_refund(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/test_helpers/issuing/transactions/create_unlinked_refund", params: params, opts: opts ) end |
.refund(transaction, params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
1169 1170 1171 1172 1173 1174 1175 1176 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 1169 def self.refund(transaction, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(transaction) }), params: params, opts: opts ) end |
.resource_class ⇒ Object
1144 1145 1146 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 1144 def self.resource_class "Transaction" end |
Instance Method Details
#refund(params = {}, opts = {}) ⇒ Object
Refund a test-mode Transaction.
1179 1180 1181 1182 1183 1184 1185 1186 |
# File 'lib/stripe/resources/issuing/transaction.rb', line 1179 def refund(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/transactions/%<transaction>s/refund", { transaction: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |