Class: Pago::V2026_04::Models::CheckoutUpdatePublic
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Update an existing checkout session using the client secret.
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", discount_code: "discount_code", allow_trial: "allow_trial" }.freeze
- REQUIRED_KEYS =
[].freeze
Instance Attribute Summary collapse
-
#allow_trial ⇒ Boolean?
readonly
Disable the trial period for the checkout session.
- #amount ⇒ Integer? 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_name ⇒ String? readonly
- #customer_tax_id ⇒ String? readonly
-
#discount_code ⇒ String?
readonly
Discount code to apply to the checkout.
- #is_business_customer ⇒ Boolean? readonly
- #locale ⇒ String? readonly
-
#product_id ⇒ String?
readonly
ID of the product to checkout.
- #product_price_id ⇒ String? readonly deprecated Deprecated.
-
#seats ⇒ Integer?
readonly
Number of seats for seat-based pricing.
Class Method Summary collapse
Instance Method Summary collapse
-
#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, discount_code: ::Pago::UNSET, allow_trial: ::Pago::UNSET) ⇒ CheckoutUpdatePublic
constructor
A new instance of CheckoutUpdatePublic.
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, discount_code: ::Pago::UNSET, allow_trial: ::Pago::UNSET) ⇒ CheckoutUpdatePublic
Returns a new instance of CheckoutUpdatePublic.
12917 12918 12919 12920 12921 12922 12923 12924 12925 12926 12927 12928 12929 12930 12931 12932 12933 12934 12935 12936 12937 12938 12939 12940 12941 12942 12943 12944 12945 12946 12947 12948 |
# File 'lib/pago/v2026_04/models.rb', line 12917 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, discount_code: ::Pago::UNSET, allow_trial: ::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(:discount_code, discount_code) assign(:allow_trial, allow_trial) end |
Instance Attribute Details
#allow_trial ⇒ Boolean? (readonly)
Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.
12915 12916 12917 |
# File 'lib/pago/v2026_04/models.rb', line 12915 def allow_trial @allow_trial end |
#amount ⇒ Integer? (readonly)
12882 12883 12884 |
# File 'lib/pago/v2026_04/models.rb', line 12882 def amount @amount end |
#custom_field_data ⇒ Hash{String => String, Integer, Boolean, nil} (readonly)
Key-value object storing custom field values.
12870 12871 12872 |
# File 'lib/pago/v2026_04/models.rb', line 12870 def custom_field_data @custom_field_data end |
#customer_billing_address ⇒ Models::AddressInput? (readonly)
12901 12902 12903 |
# File 'lib/pago/v2026_04/models.rb', line 12901 def customer_billing_address @customer_billing_address end |
#customer_billing_name ⇒ String? (readonly)
12898 12899 12900 |
# File 'lib/pago/v2026_04/models.rb', line 12898 def customer_billing_name @customer_billing_name end |
#customer_email ⇒ String? (readonly)
12895 12896 12897 |
# File 'lib/pago/v2026_04/models.rb', line 12895 def customer_email @customer_email end |
#customer_name ⇒ String? (readonly)
12892 12893 12894 |
# File 'lib/pago/v2026_04/models.rb', line 12892 def customer_name @customer_name end |
#customer_tax_id ⇒ String? (readonly)
12904 12905 12906 |
# File 'lib/pago/v2026_04/models.rb', line 12904 def customer_tax_id @customer_tax_id end |
#discount_code ⇒ String? (readonly)
Discount code to apply to the checkout.
12911 12912 12913 |
# File 'lib/pago/v2026_04/models.rb', line 12911 def discount_code @discount_code end |
#is_business_customer ⇒ Boolean? (readonly)
12889 12890 12891 |
# File 'lib/pago/v2026_04/models.rb', line 12889 def is_business_customer @is_business_customer end |
#locale ⇒ String? (readonly)
12907 12908 12909 |
# File 'lib/pago/v2026_04/models.rb', line 12907 def locale @locale end |
#product_id ⇒ String? (readonly)
ID of the product to checkout. Must be present in the checkout's product list.
12874 12875 12876 |
# File 'lib/pago/v2026_04/models.rb', line 12874 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.
12879 12880 12881 |
# File 'lib/pago/v2026_04/models.rb', line 12879 def product_price_id @product_price_id end |
#seats ⇒ Integer? (readonly)
Number of seats for seat-based pricing.
12886 12887 12888 |
# File 'lib/pago/v2026_04/models.rb', line 12886 def seats @seats end |
Class Method Details
.from_json(data) ⇒ CheckoutUpdatePublic?
12952 12953 12954 12955 12956 12957 12958 12959 12960 12961 12962 12963 12964 12965 12966 12967 12968 12969 12970 12971 12972 12973 12974 12975 12976 |
# File 'lib/pago/v2026_04/models.rb', line 12952 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), discount_code: (data.key?("discount_code") ? data["discount_code"] : ::Pago::UNSET), allow_trial: (data.key?("allow_trial") ? data["allow_trial"] : ::Pago::UNSET) ), data ) end |