Class: Stripe::DelegatedCheckout::RequestedSession

Inherits:
APIResource show all
Extended by:
APIOperations::Create
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/delegated_checkout/requested_session.rb

Overview

A requested session is a session that has been requested by a customer.

Defined Under Namespace

Classes: FulfillmentDetails, LineItemDetail, OrderDetails, PaymentMethodPreview, RiskDetails, SellerDetails, TotalDetails

Constant Summary collapse

OBJECT_NAME =
"delegated_checkout.requested_session"

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

create

Methods included from APIOperations::Save

included, #save

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?, #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_subtotalObject (readonly)

The subtotal amount of the requested session.



386
387
388
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 386

def amount_subtotal
  @amount_subtotal
end

#amount_totalObject (readonly)

The total amount of the requested session.



388
389
390
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 388

def amount_total
  @amount_total
end

#created_atObject (readonly)

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



390
391
392
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 390

def created_at
  @created_at
end

#currencyObject (readonly)

Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](stripe.com/docs/currencies).



392
393
394
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 392

def currency
  @currency
end

#customerObject (readonly)

The customer for this requested session.



394
395
396
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 394

def customer
  @customer
end

#expires_atObject (readonly)

Time at which the requested session expires. Measured in seconds since the Unix epoch.



396
397
398
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 396

def expires_at
  @expires_at
end

#fulfillment_detailsObject (readonly)

The details of the fulfillment.



398
399
400
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 398

def fulfillment_details
  @fulfillment_details
end

#idObject (readonly)

Unique identifier for the object.



400
401
402
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 400

def id
  @id
end

#line_item_detailsObject (readonly)

The line items to be purchased.



402
403
404
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 402

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



404
405
406
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 404

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.



406
407
408
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 406

def 
  @metadata
end

#objectObject (readonly)

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



408
409
410
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 408

def object
  @object
end

#order_detailsObject (readonly)

The details of the order.



410
411
412
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 410

def order_details
  @order_details
end

#payment_methodObject (readonly)

The payment method used for the requested session.



412
413
414
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 412

def payment_method
  @payment_method
end

#payment_method_previewObject (readonly)

The preview of the payment method to be created when the requested session is confirmed.



414
415
416
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 414

def payment_method_preview
  @payment_method_preview
end

#risk_detailsObject (readonly)

The risk details of the requested session.



416
417
418
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 416

def risk_details
  @risk_details
end

#seller_detailsObject (readonly)

Attribute for field seller_details



418
419
420
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 418

def seller_details
  @seller_details
end

#setup_future_usageObject (readonly)

Whether or not the payment method should be saved for future use.



420
421
422
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 420

def setup_future_usage
  @setup_future_usage
end

#shared_metadataObject (readonly)

The metadata shared with the seller.



422
423
424
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 422

def 
  @shared_metadata
end

#shared_payment_issued_tokenObject (readonly)

The SPT used for payment.



424
425
426
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 424

def shared_payment_issued_token
  @shared_payment_issued_token
end

#statusObject (readonly)

The status of the requested session.



426
427
428
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 426

def status
  @status
end

#total_detailsObject (readonly)

Attribute for field total_details



428
429
430
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 428

def total_details
  @total_details
end

#updated_atObject (readonly)

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



430
431
432
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 430

def updated_at
  @updated_at
end

Class Method Details

.confirm(requested_session, params = {}, opts = {}) ⇒ Object

Confirms a requested session



443
444
445
446
447
448
449
450
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 443

def self.confirm(requested_session, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/delegated_checkout/requested_sessions/%<requested_session>s/confirm", { requested_session: CGI.escape(requested_session) }),
    params: params,
    opts: opts
  )
end

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

Creates a requested session



453
454
455
456
457
458
459
460
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 453

def self.create(params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: "/v1/delegated_checkout/requested_sessions",
    params: params,
    opts: opts
  )
end

.expire(requested_session, params = {}, opts = {}) ⇒ Object

Expires a requested session



473
474
475
476
477
478
479
480
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 473

def self.expire(requested_session, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/delegated_checkout/requested_sessions/%<requested_session>s/expire", { requested_session: CGI.escape(requested_session) }),
    params: params,
    opts: opts
  )
end

.field_remappingsObject



504
505
506
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 504

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



492
493
494
495
496
497
498
499
500
501
502
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 492

def self.inner_class_types
  @inner_class_types = {
    fulfillment_details: FulfillmentDetails,
    line_item_details: LineItemDetail,
    order_details: OrderDetails,
    payment_method_preview: PaymentMethodPreview,
    risk_details: RiskDetails,
    seller_details: SellerDetails,
    total_details: TotalDetails,
  }
end

.object_nameObject



12
13
14
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 12

def self.object_name
  "delegated_checkout.requested_session"
end

.update(requested_session, params = {}, opts = {}) ⇒ Object

Updates a requested session



483
484
485
486
487
488
489
490
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 483

def self.update(requested_session, params = {}, opts = {})
  request_stripe_object(
    method: :post,
    path: format("/v1/delegated_checkout/requested_sessions/%<requested_session>s", { requested_session: CGI.escape(requested_session) }),
    params: params,
    opts: opts
  )
end

Instance Method Details

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

Confirms a requested session



433
434
435
436
437
438
439
440
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 433

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

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

Expires a requested session



463
464
465
466
467
468
469
470
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 463

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