Class: Pago::V2026_04::Models::ProductPriceSeatBasedCreate
- 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 =
{ amount_type: "amount_type", price_currency: "price_currency", tax_behavior: "tax_behavior", seat_tiers: "seat_tiers" }.freeze
- REQUIRED_KEYS =
["amount_type", "seat_tiers"].freeze
Instance Attribute Summary collapse
- #amount_type ⇒ String readonly
- #price_currency ⇒ String readonly
- #seat_tiers ⇒ Models::ProductPriceSeatTiersInput readonly
-
#tax_behavior ⇒ String?
readonly
The tax behavior of the price.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(amount_type:, price_currency: ::Pago::UNSET, tax_behavior: ::Pago::UNSET, seat_tiers:) ⇒ ProductPriceSeatBasedCreate
constructor
A new instance of ProductPriceSeatBasedCreate.
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.
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_type ⇒ String (readonly)
37828 37829 37830 |
# File 'lib/pago/v2026_04/models.rb', line 37828 def amount_type @amount_type end |
#price_currency ⇒ String (readonly)
37831 37832 37833 |
# File 'lib/pago/v2026_04/models.rb', line 37831 def price_currency @price_currency end |
#seat_tiers ⇒ Models::ProductPriceSeatTiersInput (readonly)
37838 37839 37840 |
# File 'lib/pago/v2026_04/models.rb', line 37838 def seat_tiers @seat_tiers end |
#tax_behavior ⇒ String? (readonly)
The tax behavior of the price. If not set, it will default to the organization's default tax behavior.
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?
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 |