Class: Pago::V2026_04::Models::LegacyRecurringProductPriceFixed
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A recurring price for a product, i.e. a subscription.
Deprecated: The recurring interval should be set on the product itself.
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", type: "type", recurring_interval: "recurring_interval", price_amount: "price_amount", legacy: "legacy" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "source", "amount_type", "price_currency", "tax_behavior", "is_archived", "product_id", "type", "recurring_interval", "price_amount", "legacy"].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.
- #legacy ⇒ Boolean readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#price_amount ⇒ Integer
readonly
The price in cents.
-
#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.
- #recurring_interval ⇒ String readonly
- #source ⇒ String readonly
-
#tax_behavior ⇒ String?
readonly
The tax behavior of the price.
-
#type ⇒ String
readonly
The type 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:, type:, recurring_interval:, price_amount:, legacy:) ⇒ LegacyRecurringProductPriceFixed
constructor
A new instance of LegacyRecurringProductPriceFixed.
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:, type:, recurring_interval:, price_amount:, legacy:) ⇒ LegacyRecurringProductPriceFixed
Returns a new instance of LegacyRecurringProductPriceFixed.
26478 26479 26480 26481 26482 26483 26484 26485 26486 26487 26488 26489 26490 26491 26492 26493 26494 26495 26496 26497 26498 26499 26500 26501 26502 26503 26504 26505 26506 26507 |
# File 'lib/pago/v2026_04/models.rb', line 26478 def initialize( created_at:, modified_at:, id:, source:, amount_type:, price_currency:, tax_behavior:, is_archived:, product_id:, type:, recurring_interval:, price_amount:, legacy: ) 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(:type, type) assign(:recurring_interval, recurring_interval) assign(:price_amount, price_amount) assign(:legacy, legacy) end |
Instance Attribute Details
#amount_type ⇒ String (readonly)
26446 26447 26448 |
# File 'lib/pago/v2026_04/models.rb', line 26446 def amount_type @amount_type end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
26432 26433 26434 |
# File 'lib/pago/v2026_04/models.rb', line 26432 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the price.
26440 26441 26442 |
# File 'lib/pago/v2026_04/models.rb', line 26440 def id @id end |
#is_archived ⇒ Boolean (readonly)
Whether the price is archived and no longer available.
26458 26459 26460 |
# File 'lib/pago/v2026_04/models.rb', line 26458 def is_archived @is_archived end |
#legacy ⇒ Boolean (readonly)
26476 26477 26478 |
# File 'lib/pago/v2026_04/models.rb', line 26476 def legacy @legacy end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
26436 26437 26438 |
# File 'lib/pago/v2026_04/models.rb', line 26436 def modified_at @modified_at end |
#price_amount ⇒ Integer (readonly)
The price in cents.
26473 26474 26475 |
# File 'lib/pago/v2026_04/models.rb', line 26473 def price_amount @price_amount end |
#price_currency ⇒ String (readonly)
The currency in which the customer will be charged.
26450 26451 26452 |
# File 'lib/pago/v2026_04/models.rb', line 26450 def price_currency @price_currency end |
#product_id ⇒ String (readonly)
The ID of the product owning the price.
26462 26463 26464 |
# File 'lib/pago/v2026_04/models.rb', line 26462 def product_id @product_id end |
#recurring_interval ⇒ String (readonly)
26469 26470 26471 |
# File 'lib/pago/v2026_04/models.rb', line 26469 def recurring_interval @recurring_interval end |
#source ⇒ String (readonly)
26443 26444 26445 |
# File 'lib/pago/v2026_04/models.rb', line 26443 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.
26454 26455 26456 |
# File 'lib/pago/v2026_04/models.rb', line 26454 def tax_behavior @tax_behavior end |
#type ⇒ String (readonly)
The type of the price.
26466 26467 26468 |
# File 'lib/pago/v2026_04/models.rb', line 26466 def type @type end |
Class Method Details
.from_json(data) ⇒ LegacyRecurringProductPriceFixed?
26511 26512 26513 26514 26515 26516 26517 26518 26519 26520 26521 26522 26523 26524 26525 26526 26527 26528 26529 26530 26531 26532 26533 26534 |
# File 'lib/pago/v2026_04/models.rb', line 26511 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), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), recurring_interval: (data.key?("recurring_interval") ? data["recurring_interval"] : ::Pago::UNSET), price_amount: (data.key?("price_amount") ? data["price_amount"] : ::Pago::UNSET), legacy: (data.key?("legacy") ? data["legacy"] : ::Pago::UNSET) ), data ) end |