stripe-ruby/lib/stripe/resources/issuing/fraud_liability_debit.rb
2025-03-31 14:16:15 +00:00

87 lines
3.8 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
module Issuing
# A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions.
class FraudLiabilityDebit < APIResource
extend Stripe::APIOperations::List
OBJECT_NAME = "issuing.fraud_liability_debit"
def self.object_name
"issuing.fraud_liability_debit"
end
class ListParams < Stripe::RequestParams
class Created < Stripe::RequestParams
# Minimum value to filter by (exclusive)
attr_accessor :gt
# Minimum value to filter by (inclusive)
attr_accessor :gte
# Maximum value to filter by (exclusive)
attr_accessor :lt
# Maximum value to filter by (inclusive)
attr_accessor :lte
def initialize(gt: nil, gte: nil, lt: nil, lte: nil)
@gt = gt
@gte = gte
@lt = lt
@lte = lte
end
end
# Only return Issuing Fraud Liability Debits that were created during the given date interval.
attr_accessor :created
# A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
attr_accessor :ending_before
# Specifies which fields in the response should be expanded.
attr_accessor :expand
# A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
attr_accessor :limit
# A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
attr_accessor :starting_after
def initialize(
created: nil,
ending_before: nil,
expand: nil,
limit: nil,
starting_after: nil
)
@created = created
@ending_before = ending_before
@expand = expand
@limit = limit
@starting_after = starting_after
end
end
# Debited amount. This is equal to the disputed amount and is given in the cards currency and in the smallest currency unit.
attr_reader :amount
# ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit.
attr_reader :balance_transaction
# Time at which the object was created. Measured in seconds since the Unix epoch.
attr_reader :created
# The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
attr_reader :currency
# The ID of the linked dispute.
attr_reader :dispute
# Unique identifier for the object.
attr_reader :id
# Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.
attr_reader :livemode
# String representing the object's type. Objects of the same type share the same value.
attr_reader :object
# Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
def self.list(params = {}, opts = {})
request_stripe_object(
method: :get,
path: "/v1/issuing/fraud_liability_debits",
params: params,
opts: opts
)
end
end
end
end