Class: Pago::V2026_04::Models::ProductPriceSeatBased
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A seat-based price for a product.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", source: "source", amount_type: "amount_type", price_currency: "price_currency", tax_behavior: "tax_behavior", is_archived: "is_archived", product_id: "product_id", seat_tiers: "seat_tiers" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "source", "amount_type", "price_currency", "tax_behavior", "is_archived", "product_id", "seat_tiers"].freeze
Instance Attribute Summary collapse
- #amount_type ⇒ String readonly
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the price.
-
#is_archived ⇒ Boolean
readonly
Whether the price is archived and no longer available.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#price_currency ⇒ String
readonly
The currency in which the customer will be charged.
-
#product_id ⇒ String
readonly
The ID of the product owning the price.
- #seat_tiers ⇒ Models::ProductPriceSeatTiersOutput readonly
- #source ⇒ String readonly
-
#tax_behavior ⇒ String?
readonly
The tax behavior of the price.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, source:, amount_type:, price_currency:, tax_behavior:, is_archived:, product_id:, seat_tiers:) ⇒ ProductPriceSeatBased
constructor
A new instance of ProductPriceSeatBased.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, source:, amount_type:, price_currency:, tax_behavior:, is_archived:, product_id:, seat_tiers:) ⇒ ProductPriceSeatBased
Returns a new instance of ProductPriceSeatBased.
37767 37768 37769 37770 37771 37772 37773 37774 37775 37776 37777 37778 37779 37780 37781 37782 37783 37784 37785 37786 37787 37788 37789 37790 |
# File 'lib/pago/v2026_04/models.rb', line 37767 def initialize( created_at:, modified_at:, id:, source:, amount_type:, price_currency:, tax_behavior:, is_archived:, product_id:, seat_tiers: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:source, source) assign(:amount_type, amount_type) assign(:price_currency, price_currency) assign(:tax_behavior, tax_behavior) assign(:is_archived, is_archived) assign(:product_id, product_id) assign(:seat_tiers, seat_tiers) end |
Instance Attribute Details
#amount_type ⇒ String (readonly)
37746 37747 37748 |
# File 'lib/pago/v2026_04/models.rb', line 37746 def amount_type @amount_type end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
37732 37733 37734 |
# File 'lib/pago/v2026_04/models.rb', line 37732 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the price.
37740 37741 37742 |
# File 'lib/pago/v2026_04/models.rb', line 37740 def id @id end |
#is_archived ⇒ Boolean (readonly)
Whether the price is archived and no longer available.
37758 37759 37760 |
# File 'lib/pago/v2026_04/models.rb', line 37758 def is_archived @is_archived end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
37736 37737 37738 |
# File 'lib/pago/v2026_04/models.rb', line 37736 def modified_at @modified_at end |
#price_currency ⇒ String (readonly)
The currency in which the customer will be charged.
37750 37751 37752 |
# File 'lib/pago/v2026_04/models.rb', line 37750 def price_currency @price_currency end |
#product_id ⇒ String (readonly)
The ID of the product owning the price.
37762 37763 37764 |
# File 'lib/pago/v2026_04/models.rb', line 37762 def product_id @product_id end |
#seat_tiers ⇒ Models::ProductPriceSeatTiersOutput (readonly)
37765 37766 37767 |
# File 'lib/pago/v2026_04/models.rb', line 37765 def seat_tiers @seat_tiers end |
#source ⇒ String (readonly)
37743 37744 37745 |
# File 'lib/pago/v2026_04/models.rb', line 37743 def source @source end |
#tax_behavior ⇒ String? (readonly)
The tax behavior of the price. If null, it defaults to the organization's default tax behavior.
37754 37755 37756 |
# File 'lib/pago/v2026_04/models.rb', line 37754 def tax_behavior @tax_behavior end |
Class Method Details
.from_json(data) ⇒ ProductPriceSeatBased?
37794 37795 37796 37797 37798 37799 37800 37801 37802 37803 37804 37805 37806 37807 37808 37809 37810 37811 37812 37813 37814 |
# File 'lib/pago/v2026_04/models.rb', line 37794 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), source: (data.key?("source") ? data["source"] : ::Pago::UNSET), 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), is_archived: (data.key?("is_archived") ? data["is_archived"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), seat_tiers: (data.key?("seat_tiers") ? Models::ProductPriceSeatTiersOutput.from_json(data["seat_tiers"]) : ::Pago::UNSET) ), data ) end |