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

Instance 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.



2198
2199
2200
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2198

def amount
  @amount
end

#amount_authorizedObject (readonly)

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



2200
2201
2202
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2200

def amount_authorized
  @amount_authorized
end

#amount_canceledObject (readonly)

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



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

def amount_canceled
  @amount_canceled
end

#amount_failedObject (readonly)

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



2204
2205
2206
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2204

def amount_failed
  @amount_failed
end

#amount_guaranteedObject (readonly)

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



2206
2207
2208
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2206

def amount_guaranteed
  @amount_guaranteed
end

#amount_refundedObject (readonly)

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



2208
2209
2210
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2208

def amount_refunded
  @amount_refunded
end

#amount_requestedObject (readonly)

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



2210
2211
2212
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2210

def amount_requested
  @amount_requested
end

#applicationObject (readonly)

ID of the Connect application that created the PaymentAttemptRecord.



2212
2213
2214
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2212

def application
  @application
end

#createdObject (readonly)

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



2214
2215
2216
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2214

def created
  @created
end

#customer_detailsObject (readonly)

Customer information for this payment.



2216
2217
2218
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2216

def customer_details
  @customer_details
end

#customer_presenceObject (readonly)

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



2218
2219
2220
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2218

def customer_presence
  @customer_presence
end

#descriptionObject (readonly)

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



2220
2221
2222
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2220

def description
  @description
end

#idObject (readonly)

Unique identifier for the object.



2222
2223
2224
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2222

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`.



2224
2225
2226
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2224

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.



2226
2227
2228
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2226

def 
  @metadata
end

#objectObject (readonly)

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



2228
2229
2230
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2228

def object
  @object
end

#payment_method_detailsObject (readonly)

Information about the Payment Method debited for this payment.



2230
2231
2232
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2230

def payment_method_details
  @payment_method_details
end

#payment_recordObject (readonly)

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



2232
2233
2234
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2232

def payment_record
  @payment_record
end

#processor_detailsObject (readonly)

Processor information associated with this payment.



2234
2235
2236
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2234

def processor_details
  @processor_details
end

#reported_byObject (readonly)

Indicates who reported the payment.



2236
2237
2238
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2236

def reported_by
  @reported_by
end

#shipping_detailsObject (readonly)

Shipping information for this payment.



2238
2239
2240
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2238

def shipping_details
  @shipping_details
end

Class Method Details

.field_remappingsObject



2406
2407
2408
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2406

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2390

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.



2241
2242
2243
2244
2245
2246
2247
2248
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2241

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

.report_authenticated(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was authenticated.



2261
2262
2263
2264
2265
2266
2267
2268
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2261

def self.report_authenticated(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authenticated", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_authorized(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was authorized.



2281
2282
2283
2284
2285
2286
2287
2288
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2281

def self.report_authorized(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authorized", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_canceled(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was canceled.



2301
2302
2303
2304
2305
2306
2307
2308
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2301

def self.report_canceled(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_canceled", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_failed(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record failed.



2321
2322
2323
2324
2325
2326
2327
2328
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2321

def self.report_failed(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_failed", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_guaranteed(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was guaranteed.



2341
2342
2343
2344
2345
2346
2347
2348
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2341

def self.report_guaranteed(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_guaranteed", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_informational(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report informational updates on the specified Payment Attempt Record.



2361
2362
2363
2364
2365
2366
2367
2368
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2361

def self.report_informational(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_informational", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

.report_refund(payment_attempt_record, params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was refunded.



2381
2382
2383
2384
2385
2386
2387
2388
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2381

def self.report_refund(payment_attempt_record, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_refund", { payment_attempt_record: CGI.escape(payment_attempt_record) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

#report_authenticated(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was authenticated.



2251
2252
2253
2254
2255
2256
2257
2258
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2251

def report_authenticated(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authenticated", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_authorized(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was authorized.



2271
2272
2273
2274
2275
2276
2277
2278
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2271

def report_authorized(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_authorized", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_canceled(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was canceled.



2291
2292
2293
2294
2295
2296
2297
2298
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2291

def report_canceled(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_canceled", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_failed(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record failed.



2311
2312
2313
2314
2315
2316
2317
2318
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2311

def report_failed(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_failed", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_guaranteed(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was guaranteed.



2331
2332
2333
2334
2335
2336
2337
2338
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2331

def report_guaranteed(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_guaranteed", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_informational(params = {}, opts = {}) ⇒ Object

Report informational updates on the specified Payment Attempt Record.



2351
2352
2353
2354
2355
2356
2357
2358
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2351

def report_informational(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_informational", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end

#report_refund(params = {}, opts = {}) ⇒ Object

Report that the specified Payment Attempt Record was refunded.



2371
2372
2373
2374
2375
2376
2377
2378
# File 'lib/stripe/resources/payment_attempt_record.rb', line 2371

def report_refund(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/payment_attempt_records/%<payment_attempt_record>s/report_refund", { payment_attempt_record: CGI.escape(self["id"]) }),
    params: params,
    opts: opts
  )
end