Class: Pago::V2026_04::Models::CheckoutConfirmStripe

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Confirm a checkout session using a Stripe confirmation token.

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",
  confirmation_token_id: "confirmation_token_id"
}.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, confirmation_token_id: ::Pago::UNSET) ⇒ CheckoutConfirmStripe

Returns a new instance of CheckoutConfirmStripe.

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)
  • confirmation_token_id: (String, nil) (defaults to: ::Pago::UNSET)


9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
# File 'lib/pago/v2026_04/models.rb', line 9707

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,
  confirmation_token_id: ::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)
  assign(:confirmation_token_id, confirmation_token_id)
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)


9701
9702
9703
# File 'lib/pago/v2026_04/models.rb', line 9701

def allow_trial
  @allow_trial
end

#amountInteger? (readonly)

Returns:

  • (Integer, nil)


9668
9669
9670
# File 'lib/pago/v2026_04/models.rb', line 9668

def amount
  @amount
end

#confirmation_token_idString? (readonly)

ID of the Stripe confirmation token. Required for fixed prices and custom prices.

Returns:

  • (String, nil)


9705
9706
9707
# File 'lib/pago/v2026_04/models.rb', line 9705

def confirmation_token_id
  @confirmation_token_id
end

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

Key-value object storing custom field values.

Returns:

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


9656
9657
9658
# File 'lib/pago/v2026_04/models.rb', line 9656

def custom_field_data
  @custom_field_data
end

#customer_billing_addressModels::AddressInput? (readonly)

Returns:



9687
9688
9689
# File 'lib/pago/v2026_04/models.rb', line 9687

def customer_billing_address
  @customer_billing_address
end

#customer_billing_nameString? (readonly)

Returns:

  • (String, nil)


9684
9685
9686
# File 'lib/pago/v2026_04/models.rb', line 9684

def customer_billing_name
  @customer_billing_name
end

#customer_emailString? (readonly)

Returns:

  • (String, nil)


9681
9682
9683
# File 'lib/pago/v2026_04/models.rb', line 9681

def customer_email
  @customer_email
end

#customer_nameString? (readonly)

Returns:

  • (String, nil)


9678
9679
9680
# File 'lib/pago/v2026_04/models.rb', line 9678

def customer_name
  @customer_name
end

#customer_tax_idString? (readonly)

Returns:

  • (String, nil)


9690
9691
9692
# File 'lib/pago/v2026_04/models.rb', line 9690

def customer_tax_id
  @customer_tax_id
end

#discount_codeString? (readonly)

Discount code to apply to the checkout.

Returns:

  • (String, nil)


9697
9698
9699
# File 'lib/pago/v2026_04/models.rb', line 9697

def discount_code
  @discount_code
end

#is_business_customerBoolean? (readonly)

Returns:

  • (Boolean, nil)


9675
9676
9677
# File 'lib/pago/v2026_04/models.rb', line 9675

def is_business_customer
  @is_business_customer
end

#localeString? (readonly)

Returns:

  • (String, nil)


9693
9694
9695
# File 'lib/pago/v2026_04/models.rb', line 9693

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)


9660
9661
9662
# File 'lib/pago/v2026_04/models.rb', line 9660

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)


9665
9666
9667
# File 'lib/pago/v2026_04/models.rb', line 9665

def product_price_id
  @product_price_id
end

#seatsInteger? (readonly)

Number of seats for seat-based pricing.

Returns:

  • (Integer, nil)


9672
9673
9674
# File 'lib/pago/v2026_04/models.rb', line 9672

def seats
  @seats
end

Class Method Details

.from_json(data) ⇒ CheckoutConfirmStripe?

Parameters:

  • data (Hash, String, nil)

Returns:



9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
# File 'lib/pago/v2026_04/models.rb', line 9744

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),
      confirmation_token_id: (data.key?("confirmation_token_id") ? data["confirmation_token_id"] : ::Pago::UNSET)
    ),
    data
  )
end