Class: Pago::V2026_04::Models::CheckoutUpdatePublic

Inherits:
Model
  • Object
show all
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 =

Returns:

  • (Hash[Symbol, String])
{
  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 =

Returns:

  • (Array[String])
[].freeze

Instance Attribute Summary collapse

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, discount_code: ::Pago::UNSET, allow_trial: ::Pago::UNSET) ⇒ CheckoutUpdatePublic

Returns a new instance of CheckoutUpdatePublic.

Parameters:

  • custom_field_data: (Hash[String, untyped], nil) (defaults to: ::Pago::UNSET)
  • product_id: (String, nil) (defaults to: ::Pago::UNSET)
  • product_price_id: (String, nil) (defaults to: ::Pago::UNSET)
  • amount: (Integer, nil) (defaults to: ::Pago::UNSET)
  • seats: (Integer, nil) (defaults to: ::Pago::UNSET)
  • is_business_customer: (Boolean, nil) (defaults to: ::Pago::UNSET)
  • customer_name: (String, nil) (defaults to: ::Pago::UNSET)
  • customer_email: (String, nil) (defaults to: ::Pago::UNSET)
  • customer_billing_name: (String, nil) (defaults to: ::Pago::UNSET)
  • customer_billing_address: (Models::AddressInput, nil) (defaults to: ::Pago::UNSET)
  • customer_tax_id: (String, nil) (defaults to: ::Pago::UNSET)
  • locale: (String, nil) (defaults to: ::Pago::UNSET)
  • discount_code: (String, nil) (defaults to: ::Pago::UNSET)
  • allow_trial: (Boolean, nil) (defaults to: ::Pago::UNSET)


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_trialBoolean? (readonly)

Disable the trial period for the checkout session. It's mainly useful when the trial is blocked because the customer already redeemed one.

Returns:

  • (Boolean, nil)


12915
12916
12917
# File 'lib/pago/v2026_04/models.rb', line 12915

def allow_trial
  @allow_trial
end

#amountInteger? (readonly)

Returns:

  • (Integer, nil)


12882
12883
12884
# File 'lib/pago/v2026_04/models.rb', line 12882

def amount
  @amount
end

#custom_field_dataHash{String => String, Integer, Boolean, nil} (readonly)

Key-value object storing custom field values.

Returns:

  • (Hash{String => String, Integer, Boolean, nil})


12870
12871
12872
# File 'lib/pago/v2026_04/models.rb', line 12870

def custom_field_data
  @custom_field_data
end

#customer_billing_addressModels::AddressInput? (readonly)

Returns:



12901
12902
12903
# File 'lib/pago/v2026_04/models.rb', line 12901

def customer_billing_address
  @customer_billing_address
end

#customer_billing_nameString? (readonly)

Returns:

  • (String, nil)


12898
12899
12900
# File 'lib/pago/v2026_04/models.rb', line 12898

def customer_billing_name
  @customer_billing_name
end

#customer_emailString? (readonly)

Returns:

  • (String, nil)


12895
12896
12897
# File 'lib/pago/v2026_04/models.rb', line 12895

def customer_email
  @customer_email
end

#customer_nameString? (readonly)

Returns:

  • (String, nil)


12892
12893
12894
# File 'lib/pago/v2026_04/models.rb', line 12892

def customer_name
  @customer_name
end

#customer_tax_idString? (readonly)

Returns:

  • (String, nil)


12904
12905
12906
# File 'lib/pago/v2026_04/models.rb', line 12904

def customer_tax_id
  @customer_tax_id
end

#discount_codeString? (readonly)

Discount code to apply to the checkout.

Returns:

  • (String, nil)


12911
12912
12913
# File 'lib/pago/v2026_04/models.rb', line 12911

def discount_code
  @discount_code
end

#is_business_customerBoolean? (readonly)

Returns:

  • (Boolean, nil)


12889
12890
12891
# File 'lib/pago/v2026_04/models.rb', line 12889

def is_business_customer
  @is_business_customer
end

#localeString? (readonly)

Returns:

  • (String, nil)


12907
12908
12909
# File 'lib/pago/v2026_04/models.rb', line 12907

def locale
  @locale
end

#product_idString? (readonly)

ID of the product to checkout. Must be present in the checkout's product list.

Returns:

  • (String, nil)


12874
12875
12876
# File 'lib/pago/v2026_04/models.rb', line 12874

def product_id
  @product_id
end

#product_price_idString? (readonly)

Deprecated.

ID of the product price to checkout. Must correspond to a price present in the checkout's product list.

Returns:

  • (String, nil)


12879
12880
12881
# File 'lib/pago/v2026_04/models.rb', line 12879

def product_price_id
  @product_price_id
end

#seatsInteger? (readonly)

Number of seats for seat-based pricing.

Returns:

  • (Integer, nil)


12886
12887
12888
# File 'lib/pago/v2026_04/models.rb', line 12886

def seats
  @seats
end

Class Method Details

.from_json(data) ⇒ CheckoutUpdatePublic?

Parameters:

  • data (Hash, String, nil)

Returns:



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