Class: Pago::V2026_04::Models::SubscriptionCanceledMetadata
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ subscription_id: "subscription_id", product_id: "product_id", amount: "amount", currency: "currency", recurring_interval: "recurring_interval", recurring_interval_count: "recurring_interval_count", customer_cancellation_reason: "customer_cancellation_reason", customer_cancellation_comment: "customer_cancellation_comment", canceled_at: "canceled_at", ends_at: "ends_at", cancel_at_period_end: "cancel_at_period_end" }.freeze
- REQUIRED_KEYS =
["subscription_id", "amount", "currency", "recurring_interval", "recurring_interval_count", "canceled_at"].freeze
Instance Attribute Summary collapse
- #amount ⇒ Integer readonly
- #cancel_at_period_end ⇒ Boolean readonly
- #canceled_at ⇒ String readonly
- #currency ⇒ String readonly
- #customer_cancellation_comment ⇒ String readonly
- #customer_cancellation_reason ⇒ String readonly
- #ends_at ⇒ String readonly
- #product_id ⇒ String readonly
- #recurring_interval ⇒ String readonly
- #recurring_interval_count ⇒ Integer readonly
- #subscription_id ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(subscription_id:, product_id: ::Pago::UNSET, amount:, currency:, recurring_interval:, recurring_interval_count:, customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, canceled_at:, ends_at: ::Pago::UNSET, cancel_at_period_end: ::Pago::UNSET) ⇒ SubscriptionCanceledMetadata
constructor
A new instance of SubscriptionCanceledMetadata.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(subscription_id:, product_id: ::Pago::UNSET, amount:, currency:, recurring_interval:, recurring_interval_count:, customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, canceled_at:, ends_at: ::Pago::UNSET, cancel_at_period_end: ::Pago::UNSET) ⇒ SubscriptionCanceledMetadata
Returns a new instance of SubscriptionCanceledMetadata.
40007 40008 40009 40010 40011 40012 40013 40014 40015 40016 40017 40018 40019 40020 40021 40022 40023 40024 40025 40026 40027 40028 40029 40030 40031 40032 |
# File 'lib/pago/v2026_04/models.rb', line 40007 def initialize( subscription_id:, product_id: ::Pago::UNSET, amount:, currency:, recurring_interval:, recurring_interval_count:, customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, canceled_at:, ends_at: ::Pago::UNSET, cancel_at_period_end: ::Pago::UNSET ) super() assign(:subscription_id, subscription_id) assign(:product_id, product_id) assign(:amount, amount) assign(:currency, currency) assign(:recurring_interval, recurring_interval) assign(:recurring_interval_count, recurring_interval_count) assign(:customer_cancellation_reason, customer_cancellation_reason) assign(:customer_cancellation_comment, customer_cancellation_comment) assign(:canceled_at, canceled_at) assign(:ends_at, ends_at) assign(:cancel_at_period_end, cancel_at_period_end) end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
39981 39982 39983 |
# File 'lib/pago/v2026_04/models.rb', line 39981 def amount @amount end |
#cancel_at_period_end ⇒ Boolean (readonly)
40005 40006 40007 |
# File 'lib/pago/v2026_04/models.rb', line 40005 def cancel_at_period_end @cancel_at_period_end end |
#canceled_at ⇒ String (readonly)
39999 40000 40001 |
# File 'lib/pago/v2026_04/models.rb', line 39999 def canceled_at @canceled_at end |
#currency ⇒ String (readonly)
39984 39985 39986 |
# File 'lib/pago/v2026_04/models.rb', line 39984 def currency @currency end |
#customer_cancellation_comment ⇒ String (readonly)
39996 39997 39998 |
# File 'lib/pago/v2026_04/models.rb', line 39996 def customer_cancellation_comment @customer_cancellation_comment end |
#customer_cancellation_reason ⇒ String (readonly)
39993 39994 39995 |
# File 'lib/pago/v2026_04/models.rb', line 39993 def customer_cancellation_reason @customer_cancellation_reason end |
#ends_at ⇒ String (readonly)
40002 40003 40004 |
# File 'lib/pago/v2026_04/models.rb', line 40002 def ends_at @ends_at end |
#product_id ⇒ String (readonly)
39978 39979 39980 |
# File 'lib/pago/v2026_04/models.rb', line 39978 def product_id @product_id end |
#recurring_interval ⇒ String (readonly)
39987 39988 39989 |
# File 'lib/pago/v2026_04/models.rb', line 39987 def recurring_interval @recurring_interval end |
#recurring_interval_count ⇒ Integer (readonly)
39990 39991 39992 |
# File 'lib/pago/v2026_04/models.rb', line 39990 def recurring_interval_count @recurring_interval_count end |
#subscription_id ⇒ String (readonly)
39975 39976 39977 |
# File 'lib/pago/v2026_04/models.rb', line 39975 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ SubscriptionCanceledMetadata?
40036 40037 40038 40039 40040 40041 40042 40043 40044 40045 40046 40047 40048 40049 40050 40051 40052 40053 40054 40055 40056 40057 |
# File 'lib/pago/v2026_04/models.rb', line 40036 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( subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), recurring_interval: (data.key?("recurring_interval") ? data["recurring_interval"] : ::Pago::UNSET), recurring_interval_count: (data.key?("recurring_interval_count") ? data["recurring_interval_count"] : ::Pago::UNSET), customer_cancellation_reason: (data.key?("customer_cancellation_reason") ? data["customer_cancellation_reason"] : ::Pago::UNSET), customer_cancellation_comment: (data.key?("customer_cancellation_comment") ? data["customer_cancellation_comment"] : ::Pago::UNSET), canceled_at: (data.key?("canceled_at") ? data["canceled_at"] : ::Pago::UNSET), ends_at: (data.key?("ends_at") ? data["ends_at"] : ::Pago::UNSET), cancel_at_period_end: (data.key?("cancel_at_period_end") ? data["cancel_at_period_end"] : ::Pago::UNSET) ), data ) end |