Packages
stripity_stripe
3.3.2
3.3.2
3.3.1
3.2.0
3.1.1
3.1.0
3.0.0
2.17.3
2.17.2
2.17.1
2.17.0
2.16.0
2.15.1
2.15.0
2.14.1
2.14.0
2.13.0
2.12.1
2.12.0
2.11.0
2.10.0
2.9.0
2.8.0
2.7.2
2.7.1
2.7.0
2.6.0
2.5.0
2.4.0
2.3.0
2.2.3
2.2.2
2.2.1
2.2.0
2.1.0
2.0.1
2.0.0
2.0.0-alpha.11
2.0.0-alpha.10
2.0.0-alpha.9
2.0.0-alpha.8
2.0.0-alpha.7
2.0.0-alpha.6
2.0.0-alpha.5
2.0.0-alpha.4
2.0.0-alpha.3
2.0.0-alpha.2
2.0.0-alpha.1
1.6.2
1.6.1
1.6.0
1.4.0
1.3.0
1.2.0
1.1.0
0.5.0
0.4.0
0.3.0
0.2.0
A Stripe client for Elixir.
Current section
Files
Jump to
Current section
Files
lib/generated/radar__early_fraud_warning.ex
defmodule Stripe.Radar.EarlyFraudWarning do
use Stripe.Entity
@moduledoc "An early fraud warning indicates that the card issuer has notified us that a\ncharge may be fraudulent.\n\nRelated guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings)"
(
defstruct [
:actionable,
:charge,
:created,
:fraud_type,
:id,
:livemode,
:object,
:payment_intent
]
@typedoc "The `radar.early_fraud_warning` type.\n\n * `actionable` An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later.\n * `charge` ID of the charge this early fraud warning is for, optionally expanded.\n * `created` Time at which the object was created. Measured in seconds since the Unix epoch.\n * `fraud_type` The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`.\n * `id` Unique identifier for the object.\n * `livemode` Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.\n * `object` String representing the object's type. Objects of the same type share the same value.\n * `payment_intent` ID of the Payment Intent this early fraud warning is for, optionally expanded.\n"
@type t :: %__MODULE__{
actionable: boolean,
charge: binary | Stripe.Charge.t(),
created: integer,
fraud_type: binary,
id: binary,
livemode: boolean,
object: binary,
payment_intent: binary | Stripe.PaymentIntent.t()
}
)
(
@typedoc nil
@type created :: %{
optional(:gt) => integer,
optional(:gte) => integer,
optional(:lt) => integer,
optional(:lte) => integer
}
)
(
nil
@doc "<p>Returns a list of early fraud warnings.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/radar/early_fraud_warnings`\n"
(
@spec list(
params :: %{
optional(:charge) => binary,
optional(:created) => created | integer,
optional(:ending_before) => binary,
optional(:expand) => list(binary),
optional(:limit) => integer,
optional(:payment_intent) => binary,
optional(:starting_after) => binary
},
opts :: Keyword.t()
) ::
{:ok, Stripe.List.t(Stripe.Radar.EarlyFraudWarning.t())}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def list(params \\ %{}, opts \\ []) do
path = Stripe.OpenApi.Path.replace_path_params("/v1/radar/early_fraud_warnings", [], [])
Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_params(params)
|> Stripe.Request.put_method(:get)
|> Stripe.Request.make_request()
end
)
)
(
nil
@doc "<p>Retrieves the details of an early fraud warning that has previously been created. </p>\n\n<p>Please refer to the <a href=\"#early_fraud_warning_object\">early fraud warning</a> object reference for more details.</p>\n\n#### Details\n\n * Method: `get`\n * Path: `/v1/radar/early_fraud_warnings/{early_fraud_warning}`\n"
(
@spec retrieve(
early_fraud_warning :: binary(),
params :: %{optional(:expand) => list(binary)},
opts :: Keyword.t()
) ::
{:ok, Stripe.Radar.EarlyFraudWarning.t()}
| {:error, Stripe.ApiErrors.t()}
| {:error, term()}
def retrieve(early_fraud_warning, params \\ %{}, opts \\ []) do
path =
Stripe.OpenApi.Path.replace_path_params(
"/v1/radar/early_fraud_warnings/{early_fraud_warning}",
[
%{
__struct__: OpenApiGen.Blueprint.Parameter,
in: "path",
name: "early_fraud_warning",
required: true,
schema: %{
__struct__: OpenApiGen.Blueprint.Parameter.Schema,
any_of: [],
items: [],
name: "early_fraud_warning",
properties: [],
title: nil,
type: "string"
}
}
],
[early_fraud_warning]
)
Stripe.Request.new_request(opts)
|> Stripe.Request.put_endpoint(path)
|> Stripe.Request.put_params(params)
|> Stripe.Request.put_method(:get)
|> Stripe.Request.make_request()
end
)
)
end