Class: Stripe::Radar::PaymentEvaluation

Inherits:
APIResource show all
Extended by:
APIOperations::Create
Defined in:
lib/stripe/resources/radar/payment_evaluation.rb

Overview

Payment Evaluations represent the risk lifecycle of an externally processed payment. It includes the Radar risk score from Stripe, payment outcome taken by the merchant or processor, and any post transaction events, such as refunds or disputes. See the [Radar API guide](docs.stripe.com/radar/multiprocessor) for integration steps.

Defined Under Namespace

Classes: ClientDeviceMetadataDetails, CustomerDetails, Event, Insights, Outcome, PaymentDetails

Constant Summary collapse

OBJECT_NAME =
"radar.payment_evaluation"

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

Methods included from APIOperations::Create

create

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, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #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

#client_device_metadata_detailsObject (readonly)

Client device metadata attached to this payment evaluation.



467
468
469
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 467

def 
  @client_device_metadata_details
end

#created_atObject (readonly)

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



469
470
471
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 469

def created_at
  @created_at
end

#customer_detailsObject (readonly)

Customer details attached to this payment evaluation.



471
472
473
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 471

def customer_details
  @customer_details
end

#eventsObject (readonly)

Event information associated with the payment evaluation, such as refunds, dispute, early fraud warnings, or user interventions.



473
474
475
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 473

def events
  @events
end

#idObject (readonly)

Unique identifier for the object.



475
476
477
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 475

def id
  @id
end

#insightsObject (readonly)

Collection of scores and insights for this payment evaluation.



477
478
479
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 477

def insights
  @insights
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



479
480
481
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 479

def livemode
  @livemode
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



481
482
483
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 481

def 
  @metadata
end

#objectObject (readonly)

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



483
484
485
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 483

def object
  @object
end

#outcomeObject (readonly)

Indicates the final outcome for the payment evaluation.



485
486
487
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 485

def outcome
  @outcome
end

#payment_detailsObject (readonly)

Payment details attached to this payment evaluation.



487
488
489
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 487

def payment_details
  @payment_details
end

Class Method Details

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

Request a Radar API fraud risk score from Stripe for a payment before sending it for external processor authorization.



490
491
492
493
494
495
496
497
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 490

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

.field_remappingsObject



510
511
512
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 510

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



499
500
501
502
503
504
505
506
507
508
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 499

def self.inner_class_types
  @inner_class_types = {
    client_device_metadata_details: ClientDeviceMetadataDetails,
    customer_details: CustomerDetails,
    events: Event,
    insights: Insights,
    outcome: Outcome,
    payment_details: PaymentDetails,
  }
end

.object_nameObject



11
12
13
# File 'lib/stripe/resources/radar/payment_evaluation.rb', line 11

def self.object_name
  "radar.payment_evaluation"
end