Class: Pago::V2026_04::Models::Checkout
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Checkout session data retrieved using an access token.
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", custom_field_data: "custom_field_data", payment_processor: "payment_processor", status: "status", client_secret: "client_secret", url: "url", expires_at: "expires_at", success_url: "success_url", return_url: "return_url", embed_origin: "embed_origin", amount: "amount", seats: "seats", min_seats: "min_seats", max_seats: "max_seats", discount_amount: "discount_amount", net_amount: "net_amount", tax_amount: "tax_amount", tax_behavior: "tax_behavior", total_amount: "total_amount", currency: "currency", allow_trial: "allow_trial", active_trial_interval: "active_trial_interval", active_trial_interval_count: "active_trial_interval_count", trial_end: "trial_end", organization_id: "organization_id", product_id: "product_id", product_price_id: "product_price_id", discount_id: "discount_id", allow_discount_codes: "allow_discount_codes", require_billing_address: "require_billing_address", is_discount_applicable: "is_discount_applicable", is_free_product_price: "is_free_product_price", is_payment_required: "is_payment_required", is_payment_setup_required: "is_payment_setup_required", is_payment_form_required: "is_payment_form_required", customer_id: "customer_id", is_business_customer: "is_business_customer", customer_name: "customer_name", customer_email: "customer_email", customer_ip_address: "customer_ip_address", customer_billing_name: "customer_billing_name", customer_billing_address: "customer_billing_address", customer_tax_id: "customer_tax_id", locale: "locale", payment_processor_metadata: "payment_processor_metadata", billing_address_fields: "billing_address_fields", trial_interval: "trial_interval", trial_interval_count: "trial_interval_count", metadata: "metadata", external_customer_id: "external_customer_id", products: "products", product: "product", product_price: "product_price", prices: "prices", discount: "discount", subscription_id: "subscription_id", attached_custom_fields: "attached_custom_fields", customer_metadata: "customer_metadata" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "payment_processor", "status", "client_secret", "url", "expires_at", "success_url", "return_url", "embed_origin", "amount", "discount_amount", "net_amount", "tax_amount", "tax_behavior", "total_amount", "currency", "allow_trial", "active_trial_interval", "active_trial_interval_count", "trial_end", "organization_id", "product_id", "product_price_id", "discount_id", "allow_discount_codes", "require_billing_address", "is_discount_applicable", "is_free_product_price", "is_payment_required", "is_payment_setup_required", "is_payment_form_required", "customer_id", "is_business_customer", "customer_name", "customer_email", "customer_ip_address", "customer_billing_name", "customer_billing_address", "customer_tax_id", "payment_processor_metadata", "billing_address_fields", "trial_interval", "trial_interval_count", "metadata", "external_customer_id", "products", "product", "product_price", "prices", "discount", "subscription_id", "attached_custom_fields", "customer_metadata"].freeze
Instance Attribute Summary collapse
-
#active_trial_interval ⇒ String?
readonly
Interval unit of the trial period, if any.
-
#active_trial_interval_count ⇒ Integer?
readonly
Number of interval units of the trial period, if any.
-
#allow_discount_codes ⇒ Boolean
readonly
Whether to allow the customer to apply discount codes.
-
#allow_trial ⇒ Boolean?
readonly
Whether to enable the trial period for the checkout session.
-
#amount ⇒ Integer
readonly
Amount in cents, before discounts and taxes.
- #attached_custom_fields ⇒ Array<Models::AttachedCustomField>? readonly
- #billing_address_fields ⇒ Models::CheckoutBillingAddressFields readonly
-
#client_secret ⇒ String
readonly
Client secret used to update and complete the checkout session from the client.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#currency ⇒ String
readonly
Currency code of the checkout session.
-
#custom_field_data ⇒ Hash{String => String, Integer, Boolean, nil}
readonly
Key-value object storing custom field values.
- #customer_billing_address ⇒ Models::Address? readonly
- #customer_billing_name ⇒ String? readonly
-
#customer_email ⇒ String?
readonly
Email address of the customer.
- #customer_id ⇒ String? readonly
- #customer_ip_address ⇒ String? readonly
- #customer_metadata ⇒ Hash{String => String, Integer, Boolean} readonly
-
#customer_name ⇒ String?
readonly
Name of the customer.
- #customer_tax_id ⇒ String? readonly
- #discount ⇒ Models::CheckoutDiscountFixedOnceForeverDuration, ... readonly
-
#discount_amount ⇒ Integer
readonly
Discount amount in cents.
-
#discount_id ⇒ String?
readonly
ID of the discount applied to the checkout.
-
#embed_origin ⇒ String?
readonly
When checkout is embedded, represents the Origin of the page embedding the checkout.
-
#expires_at ⇒ String
readonly
Expiration date and time of the checkout session.
-
#external_customer_id ⇒ String?
readonly
ID of the customer in your system.
-
#id ⇒ String
readonly
The ID of the object.
-
#is_business_customer ⇒ Boolean
readonly
Whether the customer is a business or an individual.
-
#is_discount_applicable ⇒ Boolean
readonly
Whether the discount is applicable to the checkout.
-
#is_free_product_price ⇒ Boolean
readonly
Whether the product price is free, regardless of discounts.
-
#is_payment_form_required ⇒ Boolean
readonly
Whether the checkout requires a payment form, whether because of a payment or payment method setup.
-
#is_payment_required ⇒ Boolean
readonly
Whether the checkout requires payment, e.g.
-
#is_payment_setup_required ⇒ Boolean
readonly
Whether the checkout requires setting up a payment method, regardless of the amount, e.g.
- #locale ⇒ String? readonly
-
#max_seats ⇒ Integer?
readonly
Maximum number of seats (works with seat-based pricing only).
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#min_seats ⇒ Integer?
readonly
Minimum number of seats (works with seat-based pricing only).
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#net_amount ⇒ Integer
readonly
Amount in cents, after discounts but before taxes.
-
#organization_id ⇒ String
readonly
ID of the organization owning the checkout session.
- #payment_processor ⇒ String readonly
- #payment_processor_metadata ⇒ Hash{String => String} readonly
-
#prices ⇒ Hash{String => Array<Object>}?
readonly
Mapping of product IDs to their list of prices.
-
#product ⇒ Models::CheckoutProduct?
readonly
Product selected to checkout.
-
#product_id ⇒ String?
readonly
ID of the product to checkout.
- #product_price ⇒ Object? readonly deprecated Deprecated.
- #product_price_id ⇒ String? readonly deprecated Deprecated.
-
#products ⇒ Array<Models::CheckoutProduct>
readonly
List of products available to select.
-
#require_billing_address ⇒ Boolean
readonly
Whether to require the customer to fill their full billing address, instead of just the country.
-
#return_url ⇒ String?
readonly
When set, a back button will be shown in the checkout to return to this URL.
-
#seats ⇒ Integer?
readonly
Predefined number of seats (works with seat-based pricing only).
- #status ⇒ String readonly
- #subscription_id ⇒ String? readonly
-
#success_url ⇒ String
readonly
URL where the customer will be redirected after a successful payment.
-
#tax_amount ⇒ Integer?
readonly
Sales tax amount in cents.
-
#tax_behavior ⇒ String?
readonly
Tax behavior of the checkout.
-
#total_amount ⇒ Integer
readonly
Amount in cents, after discounts and taxes.
-
#trial_end ⇒ String?
readonly
End date and time of the trial period, if any.
-
#trial_interval ⇒ String?
readonly
The interval unit for the trial period.
-
#trial_interval_count ⇒ Integer?
readonly
The number of interval units for the trial period.
-
#url ⇒ String
readonly
URL where the customer can access the checkout session.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, custom_field_data: ::Pago::UNSET, payment_processor:, status:, client_secret:, url:, expires_at:, success_url:, return_url:, embed_origin:, amount:, seats: ::Pago::UNSET, min_seats: ::Pago::UNSET, max_seats: ::Pago::UNSET, discount_amount:, net_amount:, tax_amount:, tax_behavior:, total_amount:, currency:, allow_trial:, active_trial_interval:, active_trial_interval_count:, trial_end:, organization_id:, product_id:, product_price_id:, discount_id:, allow_discount_codes:, require_billing_address:, is_discount_applicable:, is_free_product_price:, is_payment_required:, is_payment_setup_required:, is_payment_form_required:, customer_id:, is_business_customer:, customer_name:, customer_email:, customer_ip_address:, customer_billing_name:, customer_billing_address:, customer_tax_id:, locale: ::Pago::UNSET, payment_processor_metadata:, billing_address_fields:, trial_interval:, trial_interval_count:, metadata:, external_customer_id:, products:, product:, product_price:, prices:, discount:, subscription_id:, attached_custom_fields:, customer_metadata:) ⇒ Checkout
Returns a new instance of Checkout.
9366 9367 9368 9369 9370 9371 9372 9373 9374 9375 9376 9377 9378 9379 9380 9381 9382 9383 9384 9385 9386 9387 9388 9389 9390 9391 9392 9393 9394 9395 9396 9397 9398 9399 9400 9401 9402 9403 9404 9405 9406 9407 9408 9409 9410 9411 9412 9413 9414 9415 9416 9417 9418 9419 9420 9421 9422 9423 9424 9425 9426 9427 9428 9429 9430 9431 9432 9433 9434 9435 9436 9437 9438 9439 9440 9441 9442 9443 9444 9445 9446 9447 9448 9449 9450 9451 9452 9453 9454 9455 9456 9457 9458 9459 9460 9461 9462 9463 9464 9465 9466 9467 9468 9469 9470 9471 9472 9473 9474 9475 9476 9477 9478 9479 9480 9481 9482 9483 9484 9485 9486 9487 9488 9489 |
# File 'lib/pago/v2026_04/models.rb', line 9366 def initialize( id:, created_at:, modified_at:, custom_field_data: ::Pago::UNSET, payment_processor:, status:, client_secret:, url:, expires_at:, success_url:, return_url:, embed_origin:, amount:, seats: ::Pago::UNSET, min_seats: ::Pago::UNSET, max_seats: ::Pago::UNSET, discount_amount:, net_amount:, tax_amount:, tax_behavior:, total_amount:, currency:, allow_trial:, active_trial_interval:, active_trial_interval_count:, trial_end:, organization_id:, product_id:, product_price_id:, discount_id:, allow_discount_codes:, require_billing_address:, is_discount_applicable:, is_free_product_price:, is_payment_required:, is_payment_setup_required:, is_payment_form_required:, customer_id:, is_business_customer:, customer_name:, customer_email:, customer_ip_address:, customer_billing_name:, customer_billing_address:, customer_tax_id:, locale: ::Pago::UNSET, payment_processor_metadata:, billing_address_fields:, trial_interval:, trial_interval_count:, metadata:, external_customer_id:, products:, product:, product_price:, prices:, discount:, subscription_id:, attached_custom_fields:, customer_metadata: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:custom_field_data, custom_field_data) assign(:payment_processor, payment_processor) assign(:status, status) assign(:client_secret, client_secret) assign(:url, url) assign(:expires_at, expires_at) assign(:success_url, success_url) assign(:return_url, return_url) assign(:embed_origin, ) assign(:amount, amount) assign(:seats, seats) assign(:min_seats, min_seats) assign(:max_seats, max_seats) assign(:discount_amount, discount_amount) assign(:net_amount, net_amount) assign(:tax_amount, tax_amount) assign(:tax_behavior, tax_behavior) assign(:total_amount, total_amount) assign(:currency, currency) assign(:allow_trial, allow_trial) assign(:active_trial_interval, active_trial_interval) assign(:active_trial_interval_count, active_trial_interval_count) assign(:trial_end, trial_end) assign(:organization_id, organization_id) assign(:product_id, product_id) assign(:product_price_id, product_price_id) assign(:discount_id, discount_id) assign(:allow_discount_codes, allow_discount_codes) assign(:require_billing_address, require_billing_address) assign(:is_discount_applicable, is_discount_applicable) assign(:is_free_product_price, is_free_product_price) assign(:is_payment_required, is_payment_required) assign(:is_payment_setup_required, is_payment_setup_required) assign(:is_payment_form_required, is_payment_form_required) assign(:customer_id, customer_id) assign(:is_business_customer, is_business_customer) assign(:customer_name, customer_name) assign(:customer_email, customer_email) assign(:customer_ip_address, customer_ip_address) assign(:customer_billing_name, customer_billing_name) assign(:customer_billing_address, customer_billing_address) assign(:customer_tax_id, customer_tax_id) assign(:locale, locale) assign(:payment_processor_metadata, ) assign(:billing_address_fields, billing_address_fields) assign(:trial_interval, trial_interval) assign(:trial_interval_count, trial_interval_count) assign(:metadata, ) assign(:external_customer_id, external_customer_id) assign(:products, products) assign(:product, product) assign(:product_price, product_price) assign(:prices, prices) assign(:discount, discount) assign(:subscription_id, subscription_id) assign(:attached_custom_fields, attached_custom_fields) assign(:customer_metadata, ) end |
Instance Attribute Details
#active_trial_interval ⇒ String? (readonly)
Interval unit of the trial period, if any. This value is either set from the checkout, if trial_interval is set, or from the selected product.
9231 9232 9233 |
# File 'lib/pago/v2026_04/models.rb', line 9231 def active_trial_interval @active_trial_interval end |
#active_trial_interval_count ⇒ Integer? (readonly)
Number of interval units of the trial period, if any. This value is either set from the checkout, if trial_interval_count is set, or from the selected product.
9235 9236 9237 |
# File 'lib/pago/v2026_04/models.rb', line 9235 def active_trial_interval_count @active_trial_interval_count end |
#allow_discount_codes ⇒ Boolean (readonly)
Whether to allow the customer to apply discount codes. If you apply a discount through discount_id, it'll still be applied, but the customer won't be able to change it.
9260 9261 9262 |
# File 'lib/pago/v2026_04/models.rb', line 9260 def allow_discount_codes @allow_discount_codes end |
#allow_trial ⇒ Boolean? (readonly)
Whether to enable the trial period for the checkout session. If false, the trial period will be disabled, even if the selected product has a trial configured.
9227 9228 9229 |
# File 'lib/pago/v2026_04/models.rb', line 9227 def allow_trial @allow_trial end |
#amount ⇒ Integer (readonly)
Amount in cents, before discounts and taxes.
9187 9188 9189 |
# File 'lib/pago/v2026_04/models.rb', line 9187 def amount @amount end |
#attached_custom_fields ⇒ Array<Models::AttachedCustomField>? (readonly)
9361 9362 9363 |
# File 'lib/pago/v2026_04/models.rb', line 9361 def attached_custom_fields @attached_custom_fields end |
#billing_address_fields ⇒ Models::CheckoutBillingAddressFields (readonly)
9320 9321 9322 |
# File 'lib/pago/v2026_04/models.rb', line 9320 def billing_address_fields @billing_address_fields end |
#client_secret ⇒ String (readonly)
Client secret used to update and complete the checkout session from the client.
9163 9164 9165 |
# File 'lib/pago/v2026_04/models.rb', line 9163 def client_secret @client_secret end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
9145 9146 9147 |
# File 'lib/pago/v2026_04/models.rb', line 9145 def created_at @created_at end |
#currency ⇒ String (readonly)
Currency code of the checkout session.
9223 9224 9225 |
# File 'lib/pago/v2026_04/models.rb', line 9223 def currency @currency end |
#custom_field_data ⇒ Hash{String => String, Integer, Boolean, nil} (readonly)
Key-value object storing custom field values.
9153 9154 9155 |
# File 'lib/pago/v2026_04/models.rb', line 9153 def custom_field_data @custom_field_data end |
#customer_billing_address ⇒ Models::Address? (readonly)
9308 9309 9310 |
# File 'lib/pago/v2026_04/models.rb', line 9308 def customer_billing_address @customer_billing_address end |
#customer_billing_name ⇒ String? (readonly)
9305 9306 9307 |
# File 'lib/pago/v2026_04/models.rb', line 9305 def customer_billing_name @customer_billing_name end |
#customer_email ⇒ String? (readonly)
Email address of the customer.
9299 9300 9301 |
# File 'lib/pago/v2026_04/models.rb', line 9299 def customer_email @customer_email end |
#customer_id ⇒ String? (readonly)
9287 9288 9289 |
# File 'lib/pago/v2026_04/models.rb', line 9287 def customer_id @customer_id end |
#customer_ip_address ⇒ String? (readonly)
9302 9303 9304 |
# File 'lib/pago/v2026_04/models.rb', line 9302 def customer_ip_address @customer_ip_address end |
#customer_metadata ⇒ Hash{String => String, Integer, Boolean} (readonly)
9364 9365 9366 |
# File 'lib/pago/v2026_04/models.rb', line 9364 def @customer_metadata end |
#customer_name ⇒ String? (readonly)
Name of the customer.
9295 9296 9297 |
# File 'lib/pago/v2026_04/models.rb', line 9295 def customer_name @customer_name end |
#customer_tax_id ⇒ String? (readonly)
9311 9312 9313 |
# File 'lib/pago/v2026_04/models.rb', line 9311 def customer_tax_id @customer_tax_id end |
#discount ⇒ Models::CheckoutDiscountFixedOnceForeverDuration, ... (readonly)
9355 9356 9357 |
# File 'lib/pago/v2026_04/models.rb', line 9355 def discount @discount end |
#discount_amount ⇒ Integer (readonly)
Discount amount in cents.
9203 9204 9205 |
# File 'lib/pago/v2026_04/models.rb', line 9203 def discount_amount @discount_amount end |
#discount_id ⇒ String? (readonly)
ID of the discount applied to the checkout.
9256 9257 9258 |
# File 'lib/pago/v2026_04/models.rb', line 9256 def discount_id @discount_id end |
#embed_origin ⇒ String? (readonly)
When checkout is embedded, represents the Origin of the page embedding the checkout. Used as a security measure to send messages only to the embedding page.
9183 9184 9185 |
# File 'lib/pago/v2026_04/models.rb', line 9183 def @embed_origin end |
#expires_at ⇒ String (readonly)
Expiration date and time of the checkout session.
9171 9172 9173 |
# File 'lib/pago/v2026_04/models.rb', line 9171 def expires_at @expires_at end |
#external_customer_id ⇒ String? (readonly)
ID of the customer in your system. If a matching customer exists on Pago, the resulting order will be linked to this customer. Otherwise, a new customer will be created with this external ID set.
9335 9336 9337 |
# File 'lib/pago/v2026_04/models.rb', line 9335 def external_customer_id @external_customer_id end |
#id ⇒ String (readonly)
The ID of the object.
9141 9142 9143 |
# File 'lib/pago/v2026_04/models.rb', line 9141 def id @id end |
#is_business_customer ⇒ Boolean (readonly)
Whether the customer is a business or an individual. If true, the customer will be required to fill their full billing address and billing name.
9291 9292 9293 |
# File 'lib/pago/v2026_04/models.rb', line 9291 def is_business_customer @is_business_customer end |
#is_discount_applicable ⇒ Boolean (readonly)
Whether the discount is applicable to the checkout. Typically, free and custom prices are not discountable.
9268 9269 9270 |
# File 'lib/pago/v2026_04/models.rb', line 9268 def is_discount_applicable @is_discount_applicable end |
#is_free_product_price ⇒ Boolean (readonly)
Whether the product price is free, regardless of discounts.
9272 9273 9274 |
# File 'lib/pago/v2026_04/models.rb', line 9272 def is_free_product_price @is_free_product_price end |
#is_payment_form_required ⇒ Boolean (readonly)
Whether the checkout requires a payment form, whether because of a payment or payment method setup.
9284 9285 9286 |
# File 'lib/pago/v2026_04/models.rb', line 9284 def is_payment_form_required @is_payment_form_required end |
#is_payment_required ⇒ Boolean (readonly)
Whether the checkout requires payment, e.g. in case of free products or discounts that cover the total amount.
9276 9277 9278 |
# File 'lib/pago/v2026_04/models.rb', line 9276 def is_payment_required @is_payment_required end |
#is_payment_setup_required ⇒ Boolean (readonly)
Whether the checkout requires setting up a payment method, regardless of the amount, e.g. subscriptions that have first free cycles.
9280 9281 9282 |
# File 'lib/pago/v2026_04/models.rb', line 9280 def is_payment_setup_required @is_payment_setup_required end |
#locale ⇒ String? (readonly)
9314 9315 9316 |
# File 'lib/pago/v2026_04/models.rb', line 9314 def locale @locale end |
#max_seats ⇒ Integer? (readonly)
Maximum number of seats (works with seat-based pricing only)
9199 9200 9201 |
# File 'lib/pago/v2026_04/models.rb', line 9199 def max_seats @max_seats end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
9331 9332 9333 |
# File 'lib/pago/v2026_04/models.rb', line 9331 def @metadata end |
#min_seats ⇒ Integer? (readonly)
Minimum number of seats (works with seat-based pricing only)
9195 9196 9197 |
# File 'lib/pago/v2026_04/models.rb', line 9195 def min_seats @min_seats end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
9149 9150 9151 |
# File 'lib/pago/v2026_04/models.rb', line 9149 def modified_at @modified_at end |
#net_amount ⇒ Integer (readonly)
Amount in cents, after discounts but before taxes.
9207 9208 9209 |
# File 'lib/pago/v2026_04/models.rb', line 9207 def net_amount @net_amount end |
#organization_id ⇒ String (readonly)
ID of the organization owning the checkout session.
9243 9244 9245 |
# File 'lib/pago/v2026_04/models.rb', line 9243 def organization_id @organization_id end |
#payment_processor ⇒ String (readonly)
9156 9157 9158 |
# File 'lib/pago/v2026_04/models.rb', line 9156 def payment_processor @payment_processor end |
#payment_processor_metadata ⇒ Hash{String => String} (readonly)
9317 9318 9319 |
# File 'lib/pago/v2026_04/models.rb', line 9317 def @payment_processor_metadata end |
#prices ⇒ Hash{String => Array<Object>}? (readonly)
Mapping of product IDs to their list of prices.
9352 9353 9354 |
# File 'lib/pago/v2026_04/models.rb', line 9352 def prices @prices end |
#product ⇒ Models::CheckoutProduct? (readonly)
Product selected to checkout.
9343 9344 9345 |
# File 'lib/pago/v2026_04/models.rb', line 9343 def product @product end |
#product_id ⇒ String? (readonly)
ID of the product to checkout.
9247 9248 9249 |
# File 'lib/pago/v2026_04/models.rb', line 9247 def product_id @product_id end |
#product_price ⇒ Object? (readonly)
Price of the selected product.
9348 9349 9350 |
# File 'lib/pago/v2026_04/models.rb', line 9348 def product_price @product_price end |
#product_price_id ⇒ String? (readonly)
ID of the product price to checkout.
9252 9253 9254 |
# File 'lib/pago/v2026_04/models.rb', line 9252 def product_price_id @product_price_id end |
#products ⇒ Array<Models::CheckoutProduct> (readonly)
List of products available to select.
9339 9340 9341 |
# File 'lib/pago/v2026_04/models.rb', line 9339 def products @products end |
#require_billing_address ⇒ Boolean (readonly)
Whether to require the customer to fill their full billing address, instead of just the country. Customers in the US will always be required to fill their full address, regardless of this setting. If you preset the billing address, this setting will be automatically set to true.
9264 9265 9266 |
# File 'lib/pago/v2026_04/models.rb', line 9264 def require_billing_address @require_billing_address end |
#return_url ⇒ String? (readonly)
When set, a back button will be shown in the checkout to return to this URL.
9179 9180 9181 |
# File 'lib/pago/v2026_04/models.rb', line 9179 def return_url @return_url end |
#seats ⇒ Integer? (readonly)
Predefined number of seats (works with seat-based pricing only)
9191 9192 9193 |
# File 'lib/pago/v2026_04/models.rb', line 9191 def seats @seats end |
#status ⇒ String (readonly)
9159 9160 9161 |
# File 'lib/pago/v2026_04/models.rb', line 9159 def status @status end |
#subscription_id ⇒ String? (readonly)
9358 9359 9360 |
# File 'lib/pago/v2026_04/models.rb', line 9358 def subscription_id @subscription_id end |
#success_url ⇒ String (readonly)
URL where the customer will be redirected after a successful payment.
9175 9176 9177 |
# File 'lib/pago/v2026_04/models.rb', line 9175 def success_url @success_url end |
#tax_amount ⇒ Integer? (readonly)
Sales tax amount in cents. If null, it means there is no enough information yet to calculate it.
9211 9212 9213 |
# File 'lib/pago/v2026_04/models.rb', line 9211 def tax_amount @tax_amount end |
#tax_behavior ⇒ String? (readonly)
Tax behavior of the checkout. inclusive means the price includes tax, exclusive means tax is added on top. If null, tax is not yet calculated.
9215 9216 9217 |
# File 'lib/pago/v2026_04/models.rb', line 9215 def tax_behavior @tax_behavior end |
#total_amount ⇒ Integer (readonly)
Amount in cents, after discounts and taxes.
9219 9220 9221 |
# File 'lib/pago/v2026_04/models.rb', line 9219 def total_amount @total_amount end |
#trial_end ⇒ String? (readonly)
End date and time of the trial period, if any.
9239 9240 9241 |
# File 'lib/pago/v2026_04/models.rb', line 9239 def trial_end @trial_end end |
#trial_interval ⇒ String? (readonly)
The interval unit for the trial period.
9324 9325 9326 |
# File 'lib/pago/v2026_04/models.rb', line 9324 def trial_interval @trial_interval end |
#trial_interval_count ⇒ Integer? (readonly)
The number of interval units for the trial period.
9328 9329 9330 |
# File 'lib/pago/v2026_04/models.rb', line 9328 def trial_interval_count @trial_interval_count end |
#url ⇒ String (readonly)
URL where the customer can access the checkout session.
9167 9168 9169 |
# File 'lib/pago/v2026_04/models.rb', line 9167 def url @url end |
Class Method Details
.from_json(data) ⇒ Checkout?
9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 9507 9508 9509 9510 9511 9512 9513 9514 9515 9516 9517 9518 9519 9520 9521 9522 9523 9524 9525 9526 9527 9528 9529 9530 9531 9532 9533 9534 9535 9536 9537 9538 9539 9540 9541 9542 9543 9544 9545 9546 9547 9548 9549 9550 9551 9552 9553 9554 9555 9556 9557 9558 9559 9560 9561 9562 9563 |
# File 'lib/pago/v2026_04/models.rb', line 9493 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), custom_field_data: (data.key?("custom_field_data") ? data["custom_field_data"] : ::Pago::UNSET), payment_processor: (data.key?("payment_processor") ? data["payment_processor"] : ::Pago::UNSET), status: (data.key?("status") ? data["status"] : ::Pago::UNSET), client_secret: (data.key?("client_secret") ? data["client_secret"] : ::Pago::UNSET), url: (data.key?("url") ? data["url"] : ::Pago::UNSET), expires_at: (data.key?("expires_at") ? data["expires_at"] : ::Pago::UNSET), success_url: (data.key?("success_url") ? data["success_url"] : ::Pago::UNSET), return_url: (data.key?("return_url") ? data["return_url"] : ::Pago::UNSET), embed_origin: (data.key?("embed_origin") ? data["embed_origin"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), seats: (data.key?("seats") ? data["seats"] : ::Pago::UNSET), min_seats: (data.key?("min_seats") ? data["min_seats"] : ::Pago::UNSET), max_seats: (data.key?("max_seats") ? data["max_seats"] : ::Pago::UNSET), discount_amount: (data.key?("discount_amount") ? data["discount_amount"] : ::Pago::UNSET), net_amount: (data.key?("net_amount") ? data["net_amount"] : ::Pago::UNSET), tax_amount: (data.key?("tax_amount") ? data["tax_amount"] : ::Pago::UNSET), tax_behavior: (data.key?("tax_behavior") ? data["tax_behavior"] : ::Pago::UNSET), total_amount: (data.key?("total_amount") ? data["total_amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), allow_trial: (data.key?("allow_trial") ? data["allow_trial"] : ::Pago::UNSET), active_trial_interval: (data.key?("active_trial_interval") ? data["active_trial_interval"] : ::Pago::UNSET), active_trial_interval_count: (data.key?("active_trial_interval_count") ? data["active_trial_interval_count"] : ::Pago::UNSET), trial_end: (data.key?("trial_end") ? data["trial_end"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), product_price_id: (data.key?("product_price_id") ? data["product_price_id"] : ::Pago::UNSET), discount_id: (data.key?("discount_id") ? data["discount_id"] : ::Pago::UNSET), allow_discount_codes: (data.key?("allow_discount_codes") ? data["allow_discount_codes"] : ::Pago::UNSET), require_billing_address: (data.key?("require_billing_address") ? data["require_billing_address"] : ::Pago::UNSET), is_discount_applicable: (data.key?("is_discount_applicable") ? data["is_discount_applicable"] : ::Pago::UNSET), is_free_product_price: (data.key?("is_free_product_price") ? data["is_free_product_price"] : ::Pago::UNSET), is_payment_required: (data.key?("is_payment_required") ? data["is_payment_required"] : ::Pago::UNSET), is_payment_setup_required: (data.key?("is_payment_setup_required") ? data["is_payment_setup_required"] : ::Pago::UNSET), is_payment_form_required: (data.key?("is_payment_form_required") ? data["is_payment_form_required"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), is_business_customer: (data.key?("is_business_customer") ? data["is_business_customer"] : ::Pago::UNSET), customer_name: (data.key?("customer_name") ? data["customer_name"] : ::Pago::UNSET), customer_email: (data.key?("customer_email") ? data["customer_email"] : ::Pago::UNSET), customer_ip_address: (data.key?("customer_ip_address") ? data["customer_ip_address"] : ::Pago::UNSET), customer_billing_name: (data.key?("customer_billing_name") ? data["customer_billing_name"] : ::Pago::UNSET), customer_billing_address: (data.key?("customer_billing_address") ? Models::Address.from_json(data["customer_billing_address"]) : ::Pago::UNSET), customer_tax_id: (data.key?("customer_tax_id") ? data["customer_tax_id"] : ::Pago::UNSET), locale: (data.key?("locale") ? data["locale"] : ::Pago::UNSET), payment_processor_metadata: (data.key?("payment_processor_metadata") ? data["payment_processor_metadata"] : ::Pago::UNSET), billing_address_fields: (data.key?("billing_address_fields") ? Models::CheckoutBillingAddressFields.from_json(data["billing_address_fields"]) : ::Pago::UNSET), trial_interval: (data.key?("trial_interval") ? data["trial_interval"] : ::Pago::UNSET), trial_interval_count: (data.key?("trial_interval_count") ? data["trial_interval_count"] : ::Pago::UNSET), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), external_customer_id: (data.key?("external_customer_id") ? data["external_customer_id"] : ::Pago::UNSET), products: (data.key?("products") ? ::Pago::Serde.array(data["products"]) { |item0| Models::CheckoutProduct.from_json(item0) } : ::Pago::UNSET), product: (data.key?("product") ? Models::CheckoutProduct.from_json(data["product"]) : ::Pago::UNSET), product_price: (data.key?("product_price") ? ::Pago::Serde.union(data["product_price"], variants: [Unions::LegacyRecurringProductPrice, Unions::ProductPrice]) : ::Pago::UNSET), prices: (data.key?("prices") ? ::Pago::Serde.map(data["prices"]) { |value0| ::Pago::Serde.array(value0) { |item1| ::Pago::Serde.union(item1, variants: [Unions::LegacyRecurringProductPrice, Unions::ProductPrice]) } } : ::Pago::UNSET), discount: (data.key?("discount") ? ::Pago::Serde.union(data["discount"], variants: [Models::CheckoutDiscountFixedOnceForeverDuration, Models::CheckoutDiscountFixedRepeatDuration, Models::CheckoutDiscountPercentageOnceForeverDuration, Models::CheckoutDiscountPercentageRepeatDuration]) : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), attached_custom_fields: (data.key?("attached_custom_fields") ? ::Pago::Serde.array(data["attached_custom_fields"]) { |item0| Models::AttachedCustomField.from_json(item0) } : ::Pago::UNSET), customer_metadata: (data.key?("customer_metadata") ? data["customer_metadata"] : ::Pago::UNSET) ), data ) end |