Class: Pago::V2026_04::Models::CustomerSubscriptionCancel
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ cancel_at_period_end: "cancel_at_period_end", cancellation_reason: "cancellation_reason", cancellation_comment: "cancellation_comment" }.freeze
- REQUIRED_KEYS =
[].freeze
Instance Attribute Summary collapse
-
#cancel_at_period_end ⇒ Boolean?
readonly
Cancel an active subscription once the current period ends.
-
#cancellation_comment ⇒ String?
readonly
Customer feedback and why they decided to cancel.
-
#cancellation_reason ⇒ String?
readonly
Customers reason for cancellation.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(cancel_at_period_end: ::Pago::UNSET, cancellation_reason: ::Pago::UNSET, cancellation_comment: ::Pago::UNSET) ⇒ CustomerSubscriptionCancel
constructor
A new instance of CustomerSubscriptionCancel.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(cancel_at_period_end: ::Pago::UNSET, cancellation_reason: ::Pago::UNSET, cancellation_comment: ::Pago::UNSET) ⇒ CustomerSubscriptionCancel
Returns a new instance of CustomerSubscriptionCancel.
21046 21047 21048 21049 21050 21051 21052 21053 21054 21055 |
# File 'lib/pago/v2026_04/models.rb', line 21046 def initialize( cancel_at_period_end: ::Pago::UNSET, cancellation_reason: ::Pago::UNSET, cancellation_comment: ::Pago::UNSET ) super() assign(:cancel_at_period_end, cancel_at_period_end) assign(:cancellation_reason, cancellation_reason) assign(:cancellation_comment, cancellation_comment) end |
Instance Attribute Details
#cancel_at_period_end ⇒ Boolean? (readonly)
Cancel an active subscription once the current period ends.
Or uncancel a subscription currently set to be revoked at period end.
21027 21028 21029 |
# File 'lib/pago/v2026_04/models.rb', line 21027 def cancel_at_period_end @cancel_at_period_end end |
#cancellation_comment ⇒ String? (readonly)
Customer feedback and why they decided to cancel.
21044 21045 21046 |
# File 'lib/pago/v2026_04/models.rb', line 21044 def cancellation_comment @cancellation_comment end |
#cancellation_reason ⇒ String? (readonly)
Customers reason for cancellation.
too_expensive: Too expensive for the customer.missing_features: Customer is missing certain features.switched_service: Customer switched to another service.unused: Customer is not using it enough.customer_service: Customer is not satisfied with the customer service.low_quality: Customer is unhappy with the quality.too_complex: Customer considers the service too complicated.other: Other reason(s).
21040 21041 21042 |
# File 'lib/pago/v2026_04/models.rb', line 21040 def cancellation_reason @cancellation_reason end |
Class Method Details
.from_json(data) ⇒ CustomerSubscriptionCancel?
21059 21060 21061 21062 21063 21064 21065 21066 21067 21068 21069 21070 21071 21072 |
# File 'lib/pago/v2026_04/models.rb', line 21059 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( cancel_at_period_end: (data.key?("cancel_at_period_end") ? data["cancel_at_period_end"] : ::Pago::UNSET), cancellation_reason: (data.key?("cancellation_reason") ? data["cancellation_reason"] : ::Pago::UNSET), cancellation_comment: (data.key?("cancellation_comment") ? data["cancellation_comment"] : ::Pago::UNSET) ), data ) end |