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: FulfillmentDetails, LineItemDetail, OrderDetails, SellerDetails, TotalDetails
Constant Summary collapse
- OBJECT_NAME =
"delegated_checkout.requested_session"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#amount_subtotal ⇒ Object
readonly
The subtotal amount of the requested session.
-
#amount_total ⇒ Object
readonly
The total amount of the requested session.
-
#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.
-
#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
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/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.
-
#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
- .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.
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?, #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_subtotal ⇒ Object (readonly)
The subtotal amount of the requested session.
206 207 208 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 206 def amount_subtotal @amount_subtotal end |
#amount_total ⇒ Object (readonly)
The total amount of the requested session.
208 209 210 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 208 def amount_total @amount_total end |
#created_at ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
210 211 212 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 210 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).
212 213 214 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 212 def currency @currency end |
#customer ⇒ Object (readonly)
The customer for this requested session.
214 215 216 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 214 def customer @customer end |
#expires_at ⇒ Object (readonly)
Time at which the requested session expires. Measured in seconds since the Unix epoch.
216 217 218 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 216 def expires_at @expires_at end |
#fulfillment_details ⇒ Object (readonly)
The details of the fulfillment.
218 219 220 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 218 def fulfillment_details @fulfillment_details end |
#id ⇒ Object (readonly)
Unique identifier for the object.
220 221 222 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 220 def id @id end |
#line_item_details ⇒ Object (readonly)
The line items to be purchased.
222 223 224 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 222 def line_item_details @line_item_details end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
224 225 226 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 224 def livemode @livemode end |
#metadata ⇒ Object (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.
226 227 228 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 226 def @metadata end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
228 229 230 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 228 def object @object end |
#order_details ⇒ Object (readonly)
The details of the order.
230 231 232 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 230 def order_details @order_details end |
#payment_method ⇒ Object (readonly)
The payment method used for the requested session.
232 233 234 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 232 def payment_method @payment_method end |
#seller_details ⇒ Object (readonly)
Attribute for field seller_details
234 235 236 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 234 def seller_details @seller_details end |
#setup_future_usage ⇒ Object (readonly)
Whether or not the payment method should be saved for future use.
236 237 238 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 236 def setup_future_usage @setup_future_usage end |
#shared_metadata ⇒ Object (readonly)
The metadata shared with the seller.
238 239 240 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 238 def @shared_metadata end |
#shared_payment_issued_token ⇒ Object (readonly)
The SPT used for payment.
240 241 242 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 240 def shared_payment_issued_token @shared_payment_issued_token end |
#status ⇒ Object (readonly)
The status of the requested session.
242 243 244 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 242 def status @status end |
#total_details ⇒ Object (readonly)
Attribute for field total_details
244 245 246 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 244 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.
246 247 248 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 246 def updated_at @updated_at end |
Class Method Details
.confirm(requested_session, params = {}, opts = {}) ⇒ Object
Confirms a requested session
259 260 261 262 263 264 265 266 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 259 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
269 270 271 272 273 274 275 276 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 269 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
289 290 291 292 293 294 295 296 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 289 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
318 319 320 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 318 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
308 309 310 311 312 313 314 315 316 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 308 def self.inner_class_types @inner_class_types = { fulfillment_details: FulfillmentDetails, line_item_details: LineItemDetail, order_details: OrderDetails, seller_details: SellerDetails, total_details: TotalDetails, } 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
299 300 301 302 303 304 305 306 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 299 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
249 250 251 252 253 254 255 256 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 249 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
279 280 281 282 283 284 285 286 |
# File 'lib/stripe/resources/delegated_checkout/requested_session.rb', line 279 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 |