Class: Stripe::ThreeDSecure::Authentication

Inherits:
APIResource show all
Extended by:
APIOperations::Create, APIOperations::List
Defined in:
lib/stripe/resources/three_d_secure/authentication.rb

Overview

The Standalone 3DS API allows you to run EMV 3D Secure (3DS) authentication using Stripe while authorizing the payment with any PSP.

Related guide: Standalone 3DS

Defined Under Namespace

Classes: AcquirerDetails, Channel, FlowPreference, FutureUsage, OutcomeDetails, ShippingAddress

Constant Summary collapse

OBJECT_NAME =
"three_d_secure.authentication"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, #_get_union_variant_class, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, inner_class_union_variant_types, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#acquirer_details ⇒ Object (readonly)

Contains additional details about the acquirer for a 3DS Authentication.



334
335
336
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 334

def acquirer_details
  @acquirer_details
end

#amount ⇒ Object (readonly)

The amount for this 3DS Authentication.



336
337
338
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 336

def amount
  @amount
end

#challenge_url ⇒ Object (readonly)

The URL for presenting a challenge to your cardholder, present if status is requires_challenge.



338
339
340
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 338

def challenge_url
  @challenge_url
end

#channel ⇒ Object (readonly)

Contains details on the channel used (browser, 3RI) for a standalone 3DS Authentication.



340
341
342
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 340

def channel
  @channel
end

#created ⇒ Object (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



342
343
344
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 342

def created
  @created
end

#currency ⇒ Object (readonly)

Three-letter ISO currency code, in lowercase. Must be a supported currency.



344
345
346
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 344

def currency
  @currency
end

#directory_server ⇒ Object (readonly)

The 3DS directory server with which this 3DS Authentication was processed.



346
347
348
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 346

def directory_server
  @directory_server
end

#fingerprinting_url ⇒ Object (readonly)

The URL for performing issuer fingerprinting, present if fingerprinting is supported for the given payment method.



348
349
350
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 348

def fingerprinting_url
  @fingerprinting_url
end

#flow_preference ⇒ Object (readonly)

Contains details of the flow preference used for a standalone 3DS Authentication.



350
351
352
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 350

def flow_preference
  @flow_preference
end

#future_usage ⇒ Object (readonly)

Contains information about the future authorisations related to this authentication



352
353
354
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 352

def future_usage
  @future_usage
end

#id ⇒ Object (readonly)

Unique identifier for the object.



354
355
356
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 354

def id
  @id
end

#livemode ⇒ Object (readonly)

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.



356
357
358
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 356

def livemode
  @livemode
end

#message_category ⇒ Object (readonly)

Indicates whether this 3DS Authentication is being performed for a payment or non-payment use case.



358
359
360
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 358

def message_category
  @message_category
end

#metadata ⇒ Object (readonly)

Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



360
361
362
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 360

def 
  @metadata
end

#object ⇒ Object (readonly)

String representing the object's type. Objects of the same type share the same value.



362
363
364
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 362

def object
  @object
end

#outcome ⇒ Object (readonly)

The outcome of this 3DS Authentication.



364
365
366
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 364

def outcome
  @outcome
end

#outcome_details ⇒ Object (readonly)

Contains details on the result for a standalone 3DS Authentication.



366
367
368
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 366

def outcome_details
  @outcome_details
end

#payment_method ⇒ Object (readonly)

ID of the payment method (a PaymentMethod object) to attach to this 3DS Authentication.



368
369
370
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 368

def payment_method
  @payment_method
end

#reason ⇒ Object (readonly)

The reason for invoking this 3DS Authentication.



370
371
372
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 370

def reason
  @reason
end

#shipping_address ⇒ Object (readonly)

Contains details about the shipping address for a 3DS Authentication.



372
373
374
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 372

def shipping_address
  @shipping_address
end

#status ⇒ Object (readonly)

Status of this Authentication.



374
375
376
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 374

def status
  @status
end

Class Method Details

.cancel(authentication, params = {}, opts = {}) ⇒ Object

This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: requires_submission or requires_challenge.



389
390
391
392
393
394
395
396
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 389

def self.cancel(authentication, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/three_d_secure/authentications/%<authentication>s/cancel", { authentication: CGI.escape(authentication) }),
    params: params,
    opts: opts
  )
end

.create(params = {}, opts = {}) ⇒ Object

This endpoint creates a 3DS Authentication. Refer to the Create a 3DS Authentication object section of the Standalone 3DS guide for more information.

You can pass the submit parameter to automatically submit the 3DS Authentication object when you create it. Refer to the Submit at creation section of the Standalone 3DS guide for more information.



401
402
403
404
405
406
407
408
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 401

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/three_d_secure/authentications",
    params: params,
    opts: opts
  )
end

.field_remappings ⇒ Object



451
452
453
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 451

def self.field_remappings
  @field_remappings = {}
end

.inner_class_types ⇒ Object



440
441
442
443
444
445
446
447
448
449
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 440

def self.inner_class_types
  @inner_class_types = {
    acquirer_details: AcquirerDetails,
    channel: Channel,
    flow_preference: FlowPreference,
    future_usage: FutureUsage,
    outcome_details: OutcomeDetails,
    shipping_address: ShippingAddress,
  }
end

.list(params = {}, opts = {}) ⇒ Object

Returns a list of 3D Secure Authentications.



411
412
413
414
415
416
417
418
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 411

def self.list(params = {}, opts = {})
  request_stripe_object(
    method: :get,
    path: "/v1/three_d_secure/authentications",
    params: params,
    opts: opts
  )
end

.object_name ⇒ Object



14
15
16
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 14

def self.object_name
  "three_d_secure.authentication"
end

.submit(authentication, params = {}, opts = {}) ⇒ Object

This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the Submit the 3DS Authentication object section of the Standalone 3DS guide for more information.



431
432
433
434
435
436
437
438
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 431

def self.submit(authentication, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/three_d_secure/authentications/%<authentication>s/submit", { authentication: CGI.escape(authentication) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#cancel(params = {}, opts = {}) ⇒ Object

This endpoint cancels a 3DS Authentication. You can cancel a 3DS Authentication object when it's in a non-final status: requires_submission or requires_challenge.



378
379
380
381
382
383
384
385
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 378

def cancel(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/three_d_secure/authentications/%<authentication>s/cancel", { authentication: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#submit(params = {}, opts = {}) ⇒ Object

This endpoint submits a 3DS Authentication. You can submit a 3DS Authentication object when it has status requires_submission. Refer to the Submit the 3DS Authentication object section of the Standalone 3DS guide for more information.



421
422
423
424
425
426
427
428
# File 'lib/stripe/resources/three_d_secure/authentication.rb', line 421

def submit(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/three_d_secure/authentications/%<authentication>s/submit", { authentication: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end