Class: Pago::V2026_04::Models::SubscriptionRevoke
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ customer_cancellation_reason: "customer_cancellation_reason", customer_cancellation_comment: "customer_cancellation_comment", revoke: "revoke" }.freeze
- REQUIRED_KEYS =
["revoke"].freeze
Instance Attribute Summary collapse
-
#customer_cancellation_comment ⇒ String?
readonly
Customer feedback and why they decided to cancel.
-
#customer_cancellation_reason ⇒ String?
readonly
Customer reason for cancellation.
-
#revoke ⇒ Boolean
readonly
Cancel and revoke an active subscription immediately.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, revoke:) ⇒ SubscriptionRevoke
constructor
A new instance of SubscriptionRevoke.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, revoke:) ⇒ SubscriptionRevoke
Returns a new instance of SubscriptionRevoke.
42022 42023 42024 42025 42026 42027 42028 42029 42030 42031 |
# File 'lib/pago/v2026_04/models.rb', line 42022 def initialize( customer_cancellation_reason: ::Pago::UNSET, customer_cancellation_comment: ::Pago::UNSET, revoke: ) super() assign(:customer_cancellation_reason, customer_cancellation_reason) assign(:customer_cancellation_comment, customer_cancellation_comment) assign(:revoke, revoke) end |
Instance Attribute Details
#customer_cancellation_comment ⇒ String? (readonly)
Customer feedback and why they decided to cancel.
IMPORTANT: Do not use this to store internal notes! It's intended to be input from the customer and is therefore also available in their Pago purchases library.
Only set this in case your own service is requesting the reason from the customer. Or you copy a message directly from a customer conversation, i.e support.
42016 42017 42018 |
# File 'lib/pago/v2026_04/models.rb', line 42016 def customer_cancellation_comment @customer_cancellation_comment end |
#customer_cancellation_reason ⇒ String? (readonly)
Customer reason for cancellation.
Helpful to monitor reasons behind churn for future improvements.
Only set this in case your own service is requesting the reason from the customer. Or you know based on direct conversations, i.e support, with the customer.
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).
42003 42004 42005 |
# File 'lib/pago/v2026_04/models.rb', line 42003 def customer_cancellation_reason @customer_cancellation_reason end |
#revoke ⇒ Boolean (readonly)
Cancel and revoke an active subscription immediately
42020 42021 42022 |
# File 'lib/pago/v2026_04/models.rb', line 42020 def revoke @revoke end |
Class Method Details
.from_json(data) ⇒ SubscriptionRevoke?
42035 42036 42037 42038 42039 42040 42041 42042 42043 42044 42045 42046 42047 42048 |
# File 'lib/pago/v2026_04/models.rb', line 42035 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( 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), revoke: (data.key?("revoke") ? data["revoke"] : ::Pago::UNSET) ), data ) end |