Class: Stripe::PaymentAttemptRecord

Inherits:
APIResource show all
Extended by:
APIOperations::List
Defined in:
lib/stripe/resources/payment_attempt_record.rb

Overview

A Payment Attempt Record represents an individual attempt at making a payment, on or off Stripe. Each payment attempt tries to collect a fixed amount of money from a fixed customer and payment method. Payment Attempt Records are attached to Payment Records. Only one attempt per Payment Record can have guaranteed funds.

Defined Under Namespace

Classes: Amount, AmountAuthorized, AmountCanceled, AmountFailed, AmountGuaranteed, AmountRefunded, AmountRequested, CustomerDetails, PaymentMethodDetails, ProcessorDetails, ShippingDetails

Constant Summary collapse

OBJECT_NAME =
"payment_attempt_record"

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::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

#amount ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2047
2048
2049
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2047

def amount
  @amount
end

#amount_authorized ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2049
2050
2051
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2049

def amount_authorized
  @amount_authorized
end

#amount_canceled ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2051
2052
2053
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2051

def amount_canceled
  @amount_canceled
end

#amount_failed ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2053
2054
2055
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2053

def amount_failed
  @amount_failed
end

#amount_guaranteed ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2055
2056
2057
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2055

def amount_guaranteed
  @amount_guaranteed
end

#amount_refunded ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2057
2058
2059
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2057

def amount_refunded
  @amount_refunded
end

#amount_requested ⇒ Object (readonly)

A representation of an amount of money, consisting of an amount and a currency.



2059
2060
2061
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2059

def amount_requested
  @amount_requested
end

#application ⇒ Object (readonly)

ID of the Connect application that created the PaymentAttemptRecord.



2061
2062
2063
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2061

def application
  @application
end

#created ⇒ Object (readonly)

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



2063
2064
2065
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2063

def created
  @created
end

#customer_details ⇒ Object (readonly)

Customer information for this payment.



2065
2066
2067
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2065

def customer_details
  @customer_details
end

#customer_presence ⇒ Object (readonly)

Indicates whether the customer was present in your checkout flow during this payment.



2067
2068
2069
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2067

def customer_presence
  @customer_presence
end

#description ⇒ Object (readonly)

An arbitrary string attached to the object. Often useful for displaying to users.



2069
2070
2071
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2069

def description
  @description
end

#id ⇒ Object (readonly)

Unique identifier for the object.



2071
2072
2073
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2071

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.



2073
2074
2075
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2073

def livemode
  @livemode
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.



2075
2076
2077
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2075

def 
  @metadata
end

#object ⇒ Object (readonly)

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



2077
2078
2079
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2077

def object
  @object
end

#payment_method_details ⇒ Object (readonly)

Information about the Payment Method debited for this payment.



2079
2080
2081
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2079

def payment_method_details
  @payment_method_details
end

#payment_record ⇒ Object (readonly)

ID of the Payment Record this Payment Attempt Record belongs to.



2081
2082
2083
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2081

def payment_record
  @payment_record
end

#processor_details ⇒ Object (readonly)

Processor information associated with this payment.



2083
2084
2085
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2083

def processor_details
  @processor_details
end

#reported_by ⇒ Object (readonly)

Indicates who reported the payment.



2085
2086
2087
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2085

def reported_by
  @reported_by
end

#shipping_details ⇒ Object (readonly)

Shipping information for this payment.



2087
2088
2089
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2087

def shipping_details
  @shipping_details
end

Class Method Details

.field_remappings ⇒ Object



2115
2116
2117
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2115

def self.field_remappings
  @field_remappings = {}
end

.inner_class_types ⇒ Object



2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2099

def self.inner_class_types
  @inner_class_types = {
    amount: Amount,
    amount_authorized: AmountAuthorized,
    amount_canceled: AmountCanceled,
    amount_failed: AmountFailed,
    amount_guaranteed: AmountGuaranteed,
    amount_refunded: AmountRefunded,
    amount_requested: AmountRequested,
    customer_details: CustomerDetails,
    payment_method_details: PaymentMethodDetails,
    processor_details: ProcessorDetails,
    shipping_details: ShippingDetails,
  }
end

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

List all the Payment Attempt Records attached to the specified Payment Record.



2090
2091
2092
2093
2094
2095
2096
2097
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2090

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

.object_name ⇒ Object



13
14
15
# File 'lib/stripe/resources/payment_attempt_record.rb', line 13

def self.object_name
  "payment_attempt_record"
end