Class: Pago::V2026_04::Models::LegacyRecurringProductPriceCustom
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A pay-what-you-want 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", minimum_amount: "minimum_amount", maximum_amount: "maximum_amount", preset_amount: "preset_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", "minimum_amount", "maximum_amount", "preset_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
-
#maximum_amount ⇒ Integer?
readonly
The maximum amount the customer can pay.
-
#minimum_amount ⇒ Integer
readonly
The minimum amount the customer can pay.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#preset_amount ⇒ Integer?
readonly
The initial amount shown to the customer.
-
#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:, minimum_amount:, maximum_amount:, preset_amount:, legacy:) ⇒ LegacyRecurringProductPriceCustom
constructor
A new instance of LegacyRecurringProductPriceCustom.
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:, minimum_amount:, maximum_amount:, preset_amount:, legacy:) ⇒ LegacyRecurringProductPriceCustom
Returns a new instance of LegacyRecurringProductPriceCustom.
26344 26345 26346 26347 26348 26349 26350 26351 26352 26353 26354 26355 26356 26357 26358 26359 26360 26361 26362 26363 26364 26365 26366 26367 26368 26369 26370 26371 26372 26373 26374 26375 26376 26377 |
# File 'lib/pago/v2026_04/models.rb', line 26344 def initialize( created_at:, modified_at:, id:, source:, amount_type:, price_currency:, tax_behavior:, is_archived:, product_id:, type:, recurring_interval:, minimum_amount:, maximum_amount:, preset_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(:minimum_amount, minimum_amount) assign(:maximum_amount, maximum_amount) assign(:preset_amount, preset_amount) assign(:legacy, legacy) end |
Instance Attribute Details
#amount_type ⇒ String (readonly)
26304 26305 26306 |
# File 'lib/pago/v2026_04/models.rb', line 26304 def amount_type @amount_type end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
26290 26291 26292 |
# File 'lib/pago/v2026_04/models.rb', line 26290 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the price.
26298 26299 26300 |
# File 'lib/pago/v2026_04/models.rb', line 26298 def id @id end |
#is_archived ⇒ Boolean (readonly)
Whether the price is archived and no longer available.
26316 26317 26318 |
# File 'lib/pago/v2026_04/models.rb', line 26316 def is_archived @is_archived end |
#legacy ⇒ Boolean (readonly)
26342 26343 26344 |
# File 'lib/pago/v2026_04/models.rb', line 26342 def legacy @legacy end |
#maximum_amount ⇒ Integer? (readonly)
The maximum amount the customer can pay.
26335 26336 26337 |
# File 'lib/pago/v2026_04/models.rb', line 26335 def maximum_amount @maximum_amount end |
#minimum_amount ⇒ Integer (readonly)
The minimum amount the customer can pay. If 0, the price is 'free or pay what you want'.
26331 26332 26333 |
# File 'lib/pago/v2026_04/models.rb', line 26331 def minimum_amount @minimum_amount end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
26294 26295 26296 |
# File 'lib/pago/v2026_04/models.rb', line 26294 def modified_at @modified_at end |
#preset_amount ⇒ Integer? (readonly)
The initial amount shown to the customer.
26339 26340 26341 |
# File 'lib/pago/v2026_04/models.rb', line 26339 def preset_amount @preset_amount end |
#price_currency ⇒ String (readonly)
The currency in which the customer will be charged.
26308 26309 26310 |
# File 'lib/pago/v2026_04/models.rb', line 26308 def price_currency @price_currency end |
#product_id ⇒ String (readonly)
The ID of the product owning the price.
26320 26321 26322 |
# File 'lib/pago/v2026_04/models.rb', line 26320 def product_id @product_id end |
#recurring_interval ⇒ String (readonly)
26327 26328 26329 |
# File 'lib/pago/v2026_04/models.rb', line 26327 def recurring_interval @recurring_interval end |
#source ⇒ String (readonly)
26301 26302 26303 |
# File 'lib/pago/v2026_04/models.rb', line 26301 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.
26312 26313 26314 |
# File 'lib/pago/v2026_04/models.rb', line 26312 def tax_behavior @tax_behavior end |
#type ⇒ String (readonly)
The type of the price.
26324 26325 26326 |
# File 'lib/pago/v2026_04/models.rb', line 26324 def type @type end |
Class Method Details
.from_json(data) ⇒ LegacyRecurringProductPriceCustom?
26381 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 26392 26393 26394 26395 26396 26397 26398 26399 26400 26401 26402 26403 26404 26405 26406 |
# File 'lib/pago/v2026_04/models.rb', line 26381 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), minimum_amount: (data.key?("minimum_amount") ? data["minimum_amount"] : ::Pago::UNSET), maximum_amount: (data.key?("maximum_amount") ? data["maximum_amount"] : ::Pago::UNSET), preset_amount: (data.key?("preset_amount") ? data["preset_amount"] : ::Pago::UNSET), legacy: (data.key?("legacy") ? data["legacy"] : ::Pago::UNSET) ), data ) end |