Class: Pago::V2026_04::Models::CheckoutUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Update an existing checkout session using an access token.
Constant Summary collapse
- JSON_KEYS =
{ custom_field_data: "custom_field_data", product_id: "product_id", product_price_id: "product_price_id", amount: "amount", seats: "seats", is_business_customer: "is_business_customer", customer_name: "customer_name", customer_email: "customer_email", customer_billing_name: "customer_billing_name", customer_billing_address: "customer_billing_address", customer_tax_id: "customer_tax_id", locale: "locale", trial_interval: "trial_interval", trial_interval_count: "trial_interval_count", metadata: "metadata", currency: "currency", discount_id: "discount_id", allow_discount_codes: "allow_discount_codes", require_billing_address: "require_billing_address", allow_trial: "allow_trial", customer_ip_address: "customer_ip_address", customer_metadata: "customer_metadata", success_url: "success_url", return_url: "return_url", embed_origin: "embed_origin" }.freeze
- REQUIRED_KEYS =
[].freeze
Instance Attribute Summary collapse
-
#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
- #currency ⇒ String? readonly
-
#custom_field_data ⇒ Hash{String => String, Integer, Boolean, nil}
readonly
Key-value object storing custom field values.
- #customer_billing_address ⇒ Models::AddressInput? readonly
- #customer_billing_name ⇒ String? readonly
- #customer_email ⇒ String? readonly
- #customer_ip_address ⇒ String? readonly
-
#customer_metadata ⇒ Hash{String => String, Integer, Float, Boolean}?
readonly
Key-value object allowing you to store additional information that'll be copied to the created customer.
- #customer_name ⇒ String? readonly
- #customer_tax_id ⇒ String? readonly
-
#discount_id ⇒ String?
readonly
ID of the discount to apply to the checkout.
-
#embed_origin ⇒ String?
readonly
If you plan to embed the checkout session, set this to the Origin of the embedding page.
- #is_business_customer ⇒ Boolean? readonly
- #locale ⇒ String? readonly
-
#metadata ⇒ Hash{String => String, Integer, Float, Boolean}
readonly
Key-value object allowing you to store additional information.
-
#product_id ⇒ String?
readonly
ID of the product to checkout.
- #product_price_id ⇒ String? readonly deprecated Deprecated.
-
#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
Number of seats for seat-based pricing.
-
#success_url ⇒ String?
readonly
URL where the customer will be redirected after a successful payment.You can add the
checkout_id={CHECKOUT_ID}query parameter to retrieve the checkout session id. -
#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.
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(custom_field_data: ::Pago::UNSET, product_id: ::Pago::UNSET, product_price_id: ::Pago::UNSET, amount: ::Pago::UNSET, seats: ::Pago::UNSET, is_business_customer: ::Pago::UNSET, customer_name: ::Pago::UNSET, customer_email: ::Pago::UNSET, customer_billing_name: ::Pago::UNSET, customer_billing_address: ::Pago::UNSET, customer_tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, trial_interval: ::Pago::UNSET, trial_interval_count: ::Pago::UNSET, metadata: ::Pago::UNSET, currency: ::Pago::UNSET, discount_id: ::Pago::UNSET, allow_discount_codes: ::Pago::UNSET, require_billing_address: ::Pago::UNSET, allow_trial: ::Pago::UNSET, customer_ip_address: ::Pago::UNSET, customer_metadata: ::Pago::UNSET, success_url: ::Pago::UNSET, return_url: ::Pago::UNSET, embed_origin: ::Pago::UNSET) ⇒ CheckoutUpdate
Returns a new instance of CheckoutUpdate.
12753 12754 12755 12756 12757 12758 12759 12760 12761 12762 12763 12764 12765 12766 12767 12768 12769 12770 12771 12772 12773 12774 12775 12776 12777 12778 12779 12780 12781 12782 12783 12784 12785 12786 12787 12788 12789 12790 12791 12792 12793 12794 12795 12796 12797 12798 12799 12800 12801 12802 12803 12804 12805 12806 |
# File 'lib/pago/v2026_04/models.rb', line 12753 def initialize( custom_field_data: ::Pago::UNSET, product_id: ::Pago::UNSET, product_price_id: ::Pago::UNSET, amount: ::Pago::UNSET, seats: ::Pago::UNSET, is_business_customer: ::Pago::UNSET, customer_name: ::Pago::UNSET, customer_email: ::Pago::UNSET, customer_billing_name: ::Pago::UNSET, customer_billing_address: ::Pago::UNSET, customer_tax_id: ::Pago::UNSET, locale: ::Pago::UNSET, trial_interval: ::Pago::UNSET, trial_interval_count: ::Pago::UNSET, metadata: ::Pago::UNSET, currency: ::Pago::UNSET, discount_id: ::Pago::UNSET, allow_discount_codes: ::Pago::UNSET, require_billing_address: ::Pago::UNSET, allow_trial: ::Pago::UNSET, customer_ip_address: ::Pago::UNSET, customer_metadata: ::Pago::UNSET, success_url: ::Pago::UNSET, return_url: ::Pago::UNSET, embed_origin: ::Pago::UNSET ) super() assign(:custom_field_data, custom_field_data) assign(:product_id, product_id) assign(:product_price_id, product_price_id) assign(:amount, amount) assign(:seats, seats) assign(:is_business_customer, is_business_customer) assign(:customer_name, customer_name) assign(:customer_email, customer_email) 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(:trial_interval, trial_interval) assign(:trial_interval_count, trial_interval_count) assign(:metadata, ) assign(:currency, currency) assign(:discount_id, discount_id) assign(:allow_discount_codes, allow_discount_codes) assign(:require_billing_address, require_billing_address) assign(:allow_trial, allow_trial) assign(:customer_ip_address, customer_ip_address) assign(:customer_metadata, ) assign(:success_url, success_url) assign(:return_url, return_url) assign(:embed_origin, ) end |
Instance Attribute Details
#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.
12714 12715 12716 |
# File 'lib/pago/v2026_04/models.rb', line 12714 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.
12722 12723 12724 |
# File 'lib/pago/v2026_04/models.rb', line 12722 def allow_trial @allow_trial end |
#amount ⇒ Integer? (readonly)
12656 12657 12658 |
# File 'lib/pago/v2026_04/models.rb', line 12656 def amount @amount end |
#currency ⇒ String? (readonly)
12706 12707 12708 |
# File 'lib/pago/v2026_04/models.rb', line 12706 def currency @currency end |
#custom_field_data ⇒ Hash{String => String, Integer, Boolean, nil} (readonly)
Key-value object storing custom field values.
12644 12645 12646 |
# File 'lib/pago/v2026_04/models.rb', line 12644 def custom_field_data @custom_field_data end |
#customer_billing_address ⇒ Models::AddressInput? (readonly)
12675 12676 12677 |
# File 'lib/pago/v2026_04/models.rb', line 12675 def customer_billing_address @customer_billing_address end |
#customer_billing_name ⇒ String? (readonly)
12672 12673 12674 |
# File 'lib/pago/v2026_04/models.rb', line 12672 def customer_billing_name @customer_billing_name end |
#customer_email ⇒ String? (readonly)
12669 12670 12671 |
# File 'lib/pago/v2026_04/models.rb', line 12669 def customer_email @customer_email end |
#customer_ip_address ⇒ String? (readonly)
12725 12726 12727 |
# File 'lib/pago/v2026_04/models.rb', line 12725 def customer_ip_address @customer_ip_address end |
#customer_metadata ⇒ Hash{String => String, Integer, Float, Boolean}? (readonly)
Key-value object allowing you to store additional information that'll be copied to the created customer.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
12739 12740 12741 |
# File 'lib/pago/v2026_04/models.rb', line 12739 def @customer_metadata end |
#customer_name ⇒ String? (readonly)
12666 12667 12668 |
# File 'lib/pago/v2026_04/models.rb', line 12666 def customer_name @customer_name end |
#customer_tax_id ⇒ String? (readonly)
12678 12679 12680 |
# File 'lib/pago/v2026_04/models.rb', line 12678 def customer_tax_id @customer_tax_id end |
#discount_id ⇒ String? (readonly)
ID of the discount to apply to the checkout.
12710 12711 12712 |
# File 'lib/pago/v2026_04/models.rb', line 12710 def discount_id @discount_id end |
#embed_origin ⇒ String? (readonly)
If you plan to embed the checkout session, set this to the Origin of the embedding page. It'll allow the Pago iframe to communicate with the parent page.
12751 12752 12753 |
# File 'lib/pago/v2026_04/models.rb', line 12751 def @embed_origin end |
#is_business_customer ⇒ Boolean? (readonly)
12663 12664 12665 |
# File 'lib/pago/v2026_04/models.rb', line 12663 def is_business_customer @is_business_customer end |
#locale ⇒ String? (readonly)
12681 12682 12683 |
# File 'lib/pago/v2026_04/models.rb', line 12681 def locale @locale end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
Key-value object allowing you to store additional information.
The key must be a string with a maximum length of 40 characters. The value must be either:
- A string with a maximum length of 500 characters
- An integer
- A floating-point number
- A boolean
You can store up to 50 key-value pairs.
12703 12704 12705 |
# File 'lib/pago/v2026_04/models.rb', line 12703 def @metadata end |
#product_id ⇒ String? (readonly)
ID of the product to checkout. Must be present in the checkout's product list.
12648 12649 12650 |
# File 'lib/pago/v2026_04/models.rb', line 12648 def product_id @product_id end |
#product_price_id ⇒ String? (readonly)
ID of the product price to checkout. Must correspond to a price present in the checkout's product list.
12653 12654 12655 |
# File 'lib/pago/v2026_04/models.rb', line 12653 def product_price_id @product_price_id 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.
12718 12719 12720 |
# File 'lib/pago/v2026_04/models.rb', line 12718 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.
12747 12748 12749 |
# File 'lib/pago/v2026_04/models.rb', line 12747 def return_url @return_url end |
#seats ⇒ Integer? (readonly)
Number of seats for seat-based pricing.
12660 12661 12662 |
# File 'lib/pago/v2026_04/models.rb', line 12660 def seats @seats end |
#success_url ⇒ String? (readonly)
URL where the customer will be redirected after a successful payment.You can add the checkout_id={CHECKOUT_ID} query parameter to retrieve the checkout session id.
12743 12744 12745 |
# File 'lib/pago/v2026_04/models.rb', line 12743 def success_url @success_url end |
#trial_interval ⇒ String? (readonly)
The interval unit for the trial period.
12685 12686 12687 |
# File 'lib/pago/v2026_04/models.rb', line 12685 def trial_interval @trial_interval end |
#trial_interval_count ⇒ Integer? (readonly)
The number of interval units for the trial period.
12689 12690 12691 |
# File 'lib/pago/v2026_04/models.rb', line 12689 def trial_interval_count @trial_interval_count end |
Class Method Details
.from_json(data) ⇒ CheckoutUpdate?
12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 12823 12824 12825 12826 12827 12828 12829 12830 12831 12832 12833 12834 12835 12836 12837 12838 12839 12840 12841 12842 12843 12844 12845 |
# File 'lib/pago/v2026_04/models.rb', line 12810 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( custom_field_data: (data.key?("custom_field_data") ? data["custom_field_data"] : ::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), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), seats: (data.key?("seats") ? data["seats"] : ::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_billing_name: (data.key?("customer_billing_name") ? data["customer_billing_name"] : ::Pago::UNSET), customer_billing_address: (data.key?("customer_billing_address") ? Models::AddressInput.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), 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), currency: (data.key?("currency") ? data["currency"] : ::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), allow_trial: (data.key?("allow_trial") ? data["allow_trial"] : ::Pago::UNSET), customer_ip_address: (data.key?("customer_ip_address") ? data["customer_ip_address"] : ::Pago::UNSET), customer_metadata: (data.key?("customer_metadata") ? data["customer_metadata"] : ::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) ), data ) end |