Class: Pago::V2026_04::Models::ProductPriceSeatBasedCreate

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

Overview

Schema to create a seat-based price with volume-based tiers.

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  amount_type: "amount_type",
  price_currency: "price_currency",
  tax_behavior: "tax_behavior",
  seat_tiers: "seat_tiers"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["amount_type", "seat_tiers"].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(amount_type:, price_currency: ::Pago::UNSET, tax_behavior: ::Pago::UNSET, seat_tiers:) ⇒ ProductPriceSeatBasedCreate

Returns a new instance of ProductPriceSeatBasedCreate.

Parameters:

  • amount_type: (String)
  • price_currency: (String, nil) (defaults to: ::Pago::UNSET)
  • tax_behavior: (String, nil) (defaults to: ::Pago::UNSET)
  • seat_tiers: (Models::ProductPriceSeatTiersInput)


37840
37841
37842
37843
37844
37845
37846
37847
37848
37849
37850
37851
# File 'lib/pago/v2026_04/models.rb', line 37840

def initialize(
  amount_type:,
  price_currency: ::Pago::UNSET,
  tax_behavior: ::Pago::UNSET,
  seat_tiers:
)
  super()
  assign(:amount_type, amount_type)
  assign(:price_currency, price_currency)
  assign(:tax_behavior, tax_behavior)
  assign(:seat_tiers, seat_tiers)
end

Instance Attribute Details

#amount_typeString (readonly)

Returns:

  • (String)


37828
37829
37830
# File 'lib/pago/v2026_04/models.rb', line 37828

def amount_type
  @amount_type
end

#price_currencyString (readonly)

Returns:

  • (String)


37831
37832
37833
# File 'lib/pago/v2026_04/models.rb', line 37831

def price_currency
  @price_currency
end

#seat_tiersModels::ProductPriceSeatTiersInput (readonly)



37838
37839
37840
# File 'lib/pago/v2026_04/models.rb', line 37838

def seat_tiers
  @seat_tiers
end

#tax_behaviorString? (readonly)

The tax behavior of the price. If not set, it will default to the organization's default tax behavior.

Returns:

  • (String, nil)


37835
37836
37837
# File 'lib/pago/v2026_04/models.rb', line 37835

def tax_behavior
  @tax_behavior
end

Class Method Details

.from_json(data) ⇒ ProductPriceSeatBasedCreate?

Parameters:

  • data (Hash, String, nil)

Returns:



37855
37856
37857
37858
37859
37860
37861
37862
37863
37864
37865
37866
37867
37868
37869
# File 'lib/pago/v2026_04/models.rb', line 37855

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(
      amount_type: (data.key?("amount_type") ? data["amount_type"] : ::Pago::UNSET),
      price_currency: (data.key?("price_currency") ? data["price_currency"] : ::Pago::UNSET),
      tax_behavior: (data.key?("tax_behavior") ? data["tax_behavior"] : ::Pago::UNSET),
      seat_tiers: (data.key?("seat_tiers") ? Models::ProductPriceSeatTiersInput.from_json(data["seat_tiers"]) : ::Pago::UNSET)
    ),
    data
  )
end