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: AmountCanceled, AmountFailed, AmountGuaranteed, AmountRequested, CustomerDetails, ListParams, PaymentMethodDetails, RetrieveParams, 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

#==, #[], #[]=, 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

#amount_canceledObject (readonly)

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



169
170
171
# File 'lib/stripe/resources/payment_attempt_record.rb', line 169

def amount_canceled
  @amount_canceled
end

#amount_failedObject (readonly)

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



172
173
174
# File 'lib/stripe/resources/payment_attempt_record.rb', line 172

def amount_failed
  @amount_failed
end

#amount_guaranteedObject (readonly)

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



175
176
177
# File 'lib/stripe/resources/payment_attempt_record.rb', line 175

def amount_guaranteed
  @amount_guaranteed
end

#amount_requestedObject (readonly)

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



178
179
180
# File 'lib/stripe/resources/payment_attempt_record.rb', line 178

def amount_requested
  @amount_requested
end

#createdObject (readonly)

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



181
182
183
# File 'lib/stripe/resources/payment_attempt_record.rb', line 181

def created
  @created
end

#customer_detailsObject (readonly)

Customer information for this payment.



184
185
186
# File 'lib/stripe/resources/payment_attempt_record.rb', line 184

def customer_details
  @customer_details
end

#customer_presenceObject (readonly)

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



187
188
189
# File 'lib/stripe/resources/payment_attempt_record.rb', line 187

def customer_presence
  @customer_presence
end

#descriptionObject (readonly)

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



190
191
192
# File 'lib/stripe/resources/payment_attempt_record.rb', line 190

def description
  @description
end

#idObject (readonly)

Unique identifier for the object.



193
194
195
# File 'lib/stripe/resources/payment_attempt_record.rb', line 193

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



196
197
198
# File 'lib/stripe/resources/payment_attempt_record.rb', line 196

def livemode
  @livemode
end

#metadataObject (readonly)

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



199
200
201
# File 'lib/stripe/resources/payment_attempt_record.rb', line 199

def 
  @metadata
end

#objectObject (readonly)

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



202
203
204
# File 'lib/stripe/resources/payment_attempt_record.rb', line 202

def object
  @object
end

#payment_method_detailsObject (readonly)

Information about the Payment Method debited for this payment.



205
206
207
# File 'lib/stripe/resources/payment_attempt_record.rb', line 205

def payment_method_details
  @payment_method_details
end

#payment_recordObject (readonly)

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



208
209
210
# File 'lib/stripe/resources/payment_attempt_record.rb', line 208

def payment_record
  @payment_record
end

#payment_referenceObject (readonly)

An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID.



211
212
213
# File 'lib/stripe/resources/payment_attempt_record.rb', line 211

def payment_reference
  @payment_reference
end

#shipping_detailsObject (readonly)

Shipping information for this payment.



214
215
216
# File 'lib/stripe/resources/payment_attempt_record.rb', line 214

def shipping_details
  @shipping_details
end

Class Method Details

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

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



217
218
219
220
221
222
223
224
# File 'lib/stripe/resources/payment_attempt_record.rb', line 217

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