Class: Stripe::DelegatedCheckout::RequestedSession
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::DelegatedCheckout::RequestedSession
- 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: AffiliateAttribution, BuyerConsents, Discounts, FulfillmentDetails, LineItemDetail, OrderDetails, PaymentMethodOptions, 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
-
#affiliate_attributions ⇒ Object
readonly
Affiliate attribution data associated with this requested session.
-
#amount_subtotal ⇒ Object
readonly
The subtotal amount of the requested session.
-
#amount_total ⇒ Object
readonly
The total amount of the requested session.
-
#buyer_consents ⇒ Object
readonly
The buyer consent options for this requested session, including marketing preferences.
-
#created_at ⇒ Object
readonly
Time at which the object was created.
-
#currency ⇒ Object
readonly
Three-letter [ISO currency code](www.iso.org/iso-4217-currency-codes.html), in lowercase.
-
#customer ⇒ Object
readonly
The customer for this requested session.
-
#discounts ⇒ Object
readonly
The discounts applied to and rejected from this requested session.
-
#expires_at ⇒ Object
readonly
Time at which the requested session expires.
-
#fulfillment_details ⇒ Object
readonly
The details of the fulfillment.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#line_item_details ⇒ Object
readonly
The line items to be purchased.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is ‘true`.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#order_details ⇒ Object
readonly
The details of the order.
-
#payment_method ⇒ Object
readonly
The payment method used for the requested session.
-
#payment_method_options ⇒ Object
readonly
The payment method options for this requested session.
-
#payment_method_preview ⇒ Object
readonly
The preview of the payment method to be created when the requested session is confirmed.
-
#risk_details ⇒ Object
readonly
The risk details of the requested session.
-
#seller_details ⇒ Object
readonly
Attribute for field seller_details.
-
#setup_future_usage ⇒ Object
readonly
Whether or not the payment method should be saved for future use.
-
#shared_metadata ⇒ Object
readonly
The metadata shared with the seller.
-
#shared_payment_issued_token ⇒ Object
readonly
The SPT used for payment.
-
#status ⇒ Object
readonly
The status of the requested session.
-
#total_details ⇒ Object
readonly
Attribute for field total_details.
-
#updated_at ⇒ Object
readonly
Time at which the object was last updated.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.confirm(requested_session, params = {}, opts = {}) ⇒ Object
Confirms a requested session.
-
.create(params = {}, opts = {}) ⇒ Object
Creates a requested session.
-
.expire(requested_session, params = {}, opts = {}) ⇒ Object
Expires a requested session.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list_orders(requested_session, params = {}, opts = {}) ⇒ Object
Lists orders for a delegated checkout requested session.
- .object_name ⇒ Object
-
.update(requested_session, params = {}, opts = {}) ⇒ Object
Updates a requested session.
Instance Method Summary collapse
-
#confirm(params = {}, opts = {}) ⇒ Object
Confirms a requested session.
-
#expire(params = {}, opts = {}) ⇒ Object
Expires a requested session.
-
#list_orders(params = {}, opts = {}) ⇒ Object
Lists orders for a delegated checkout requested session.
Methods included from APIOperations::Create
Methods included from APIOperations::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
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
#affiliate_attributions ⇒ Object (readonly)
Affiliate attribution data associated with this requested session.
740 741 742 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 740 def affiliate_attributions @affiliate_attributions end |
#amount_subtotal ⇒ Object (readonly)
The subtotal amount of the requested session.
742 743 744 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 742 def amount_subtotal @amount_subtotal end |
#amount_total ⇒ Object (readonly)
The total amount of the requested session.
744 745 746 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 744 def amount_total @amount_total end |
#buyer_consents ⇒ Object (readonly)
The buyer consent options for this requested session, including marketing preferences.
746 747 748 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 746 def @buyer_consents end |
#created_at ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
748 749 750 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 748 def created_at @created_at end |
#currency ⇒ Object (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).
750 751 752 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 750 def currency @currency end |
#customer ⇒ Object (readonly)
The customer for this requested session.
752 753 754 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 752 def customer @customer end |
#discounts ⇒ Object (readonly)
The discounts applied to and rejected from this requested session.
754 755 756 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 754 def discounts @discounts end |
#expires_at ⇒ Object (readonly)
Time at which the requested session expires. Measured in seconds since the Unix epoch.
756 757 758 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 756 def expires_at @expires_at end |
#fulfillment_details ⇒ Object (readonly)
The details of the fulfillment.
758 759 760 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 758 def fulfillment_details @fulfillment_details end |
#id ⇒ Object (readonly)
Unique identifier for the object.
760 761 762 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 760 def id @id end |
#line_item_details ⇒ Object (readonly)
The line items to be purchased.
762 763 764 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 762 def line_item_details @line_item_details 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`.
764 765 766 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 764 def livemode @livemode end |
#metadata ⇒ Object (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.
766 767 768 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 766 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
768 769 770 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 768 def object @object end |
#order_details ⇒ Object (readonly)
The details of the order.
770 771 772 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 770 def order_details @order_details end |
#payment_method ⇒ Object (readonly)
The payment method used for the requested session.
772 773 774 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 772 def payment_method @payment_method end |
#payment_method_options ⇒ Object (readonly)
The payment method options for this requested session.
774 775 776 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 774 def @payment_method_options end |
#payment_method_preview ⇒ Object (readonly)
The preview of the payment method to be created when the requested session is confirmed.
776 777 778 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 776 def payment_method_preview @payment_method_preview end |
#risk_details ⇒ Object (readonly)
The risk details of the requested session.
778 779 780 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 778 def risk_details @risk_details end |
#seller_details ⇒ Object (readonly)
Attribute for field seller_details
780 781 782 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 780 def seller_details @seller_details end |
#setup_future_usage ⇒ Object (readonly)
Whether or not the payment method should be saved for future use.
782 783 784 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 782 def setup_future_usage @setup_future_usage end |
#shared_metadata ⇒ Object (readonly)
The metadata shared with the seller.
784 785 786 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 784 def @shared_metadata end |
#shared_payment_issued_token ⇒ Object (readonly)
The SPT used for payment.
786 787 788 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 786 def shared_payment_issued_token @shared_payment_issued_token end |
#status ⇒ Object (readonly)
The status of the requested session.
788 789 790 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 788 def status @status end |
#total_details ⇒ Object (readonly)
Attribute for field total_details
790 791 792 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 790 def total_details @total_details end |
#updated_at ⇒ Object (readonly)
Time at which the object was last updated. Measured in seconds since the Unix epoch.
792 793 794 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 792 def updated_at @updated_at end |
Class Method Details
.confirm(requested_session, params = {}, opts = {}) ⇒ Object
Confirms a requested session
805 806 807 808 809 810 811 812 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 805 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
815 816 817 818 819 820 821 822 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 815 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
835 836 837 838 839 840 841 842 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 835 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_remappings ⇒ Object
890 891 892 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 890 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 874 def self.inner_class_types @inner_class_types = { affiliate_attributions: AffiliateAttribution, buyer_consents: BuyerConsents, discounts: Discounts, fulfillment_details: FulfillmentDetails, line_item_details: LineItemDetail, order_details: OrderDetails, payment_method_options: PaymentMethodOptions, payment_method_preview: PaymentMethodPreview, risk_details: RiskDetails, seller_details: SellerDetails, total_details: TotalDetails, } end |
.list_orders(requested_session, params = {}, opts = {}) ⇒ Object
Lists orders for a delegated checkout requested session.
855 856 857 858 859 860 861 862 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 855 def self.list_orders(requested_session, params = {}, opts = {}) request_stripe_object( method: :get, path: format("/v1/delegated_checkout/requested_sessions/%<requested_session>s/orders", { requested_session: CGI.escape(requested_session) }), params: params, opts: opts ) end |
.object_name ⇒ Object
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
865 866 867 868 869 870 871 872 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 865 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
795 796 797 798 799 800 801 802 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 795 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
825 826 827 828 829 830 831 832 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 825 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 |
#list_orders(params = {}, opts = {}) ⇒ Object
Lists orders for a delegated checkout requested session.
845 846 847 848 849 850 851 852 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 845 def list_orders(params = {}, opts = {}) request_stripe_object( method: :get, path: format("/v1/delegated_checkout/requested_sessions/%<requested_session>s/orders", { requested_session: CGI.escape(self["id"]) }), params: params, opts: opts ) end |