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

#amountObject (readonly)

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



2134
2135
2136
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2134

def amount
  @amount
end

#amount_authorizedObject (readonly)

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



2136
2137
2138
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2136

def amount_authorized
  @amount_authorized
end

#amount_canceledObject (readonly)

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



2138
2139
2140
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2138

def amount_canceled
  @amount_canceled
end

#amount_failedObject (readonly)

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



2140
2141
2142
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2140

def amount_failed
  @amount_failed
end

#amount_guaranteedObject (readonly)

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



2142
2143
2144
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2142

def amount_guaranteed
  @amount_guaranteed
end

#amount_refundedObject (readonly)

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



2144
2145
2146
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2144

def amount_refunded
  @amount_refunded
end

#amount_requestedObject (readonly)

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



2146
2147
2148
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2146

def amount_requested
  @amount_requested
end

#applicationObject (readonly)

ID of the Connect application that created the PaymentAttemptRecord.



2148
2149
2150
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2148

def application
  @application
end

#createdObject (readonly)

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



2150
2151
2152
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2150

def created
  @created
end

#customer_detailsObject (readonly)

Customer information for this payment.



2152
2153
2154
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2152

def customer_details
  @customer_details
end

#customer_presenceObject (readonly)

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



2154
2155
2156
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2154

def customer_presence
  @customer_presence
end

#descriptionObject (readonly)

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



2156
2157
2158
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2156

def description
  @description
end

#idObject (readonly)

Unique identifier for the object.



2158
2159
2160
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2158

def id
  @id
end

#livemodeObject (readonly)

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



2160
2161
2162
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2160

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.



2162
2163
2164
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2162

def 
  @metadata
end

#objectObject (readonly)

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



2164
2165
2166
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2164

def object
  @object
end

#payment_method_detailsObject (readonly)

Information about the Payment Method debited for this payment.



2166
2167
2168
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2166

def payment_method_details
  @payment_method_details
end

#payment_recordObject (readonly)

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



2168
2169
2170
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2168

def payment_record
  @payment_record
end

#processor_detailsObject (readonly)

Processor information associated with this payment.



2170
2171
2172
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2170

def processor_details
  @processor_details
end

#reported_byObject (readonly)

Indicates who reported the payment.



2172
2173
2174
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2172

def reported_by
  @reported_by
end

#shipping_detailsObject (readonly)

Shipping information for this payment.



2174
2175
2176
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2174

def shipping_details
  @shipping_details
end

Class Method Details

.field_remappingsObject



2202
2203
2204
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2202

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2186

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.



2177
2178
2179
2180
2181
2182
2183
2184
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2177

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

.object_nameObject



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

def self.object_name
  "payment_attempt_record"
end