Class: Stripe::Issuing::Authorization::TestHelpers
- Inherits:
-
APIResourceTestHelpers
- Object
- APIResourceTestHelpers
- Stripe::Issuing::Authorization::TestHelpers
- Defined in:
- lib/stripe/resources/issuing/authorization.rb
Constant Summary collapse
- RESOURCE_CLASS =
Authorization
Class Method Summary collapse
-
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
-
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
.finalize_amount(authorization, params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
-
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
- .resource_class ⇒ Object
-
.respond(authorization, params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
-
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
Instance Method Summary collapse
-
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
-
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
-
#finalize_amount(params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
-
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
-
#respond(params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
-
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
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
.capture(authorization, params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
106 107 108 109 110 111 112 113 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 106 def self.capture(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Create a test-mode authorization.
126 127 128 129 130 131 132 133 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 126 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/test_helpers/issuing/authorizations", params: params, opts: opts ) end |
.expire(authorization, params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
136 137 138 139 140 141 142 143 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 136 def self.expire(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.finalize_amount(authorization, params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
156 157 158 159 160 161 162 163 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 156 def self.finalize_amount(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.increment(authorization, params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
176 177 178 179 180 181 182 183 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 176 def self.increment(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.resource_class ⇒ Object
101 102 103 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 101 def self.resource_class "Authorization" end |
.respond(authorization, params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
196 197 198 199 200 201 202 203 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 196 def self.respond(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape() }), params: params, opts: opts ) end |
.reverse(authorization, params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
216 217 218 219 220 221 222 223 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 216 def self.reverse(, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape() }), params: params, opts: opts ) end |
Instance Method Details
#capture(params = {}, opts = {}) ⇒ Object
Capture a test-mode authorization.
116 117 118 119 120 121 122 123 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 116 def capture(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/capture", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#expire(params = {}, opts = {}) ⇒ Object
Expire a test-mode Authorization.
146 147 148 149 150 151 152 153 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 146 def expire(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/expire", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#finalize_amount(params = {}, opts = {}) ⇒ Object
Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount.
166 167 168 169 170 171 172 173 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 166 def finalize_amount(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/finalize_amount", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#increment(params = {}, opts = {}) ⇒ Object
Increment a test-mode Authorization.
186 187 188 189 190 191 192 193 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 186 def increment(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/increment", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#respond(params = {}, opts = {}) ⇒ Object
Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy.
206 207 208 209 210 211 212 213 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 206 def respond(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/fraud_challenges/respond", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |
#reverse(params = {}, opts = {}) ⇒ Object
Reverse a test-mode Authorization.
226 227 228 229 230 231 232 233 |
# File 'lib/stripe/resources/issuing/authorization.rb', line 226 def reverse(params = {}, opts = {}) @resource.request_stripe_object( method: :post, path: format("/v1/test_helpers/issuing/authorizations/%<authorization>s/reverse", { authorization: CGI.escape(@resource["id"]) }), params: params, opts: opts ) end |