Class: Stripe::Billing::FeedbackOption
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Billing::FeedbackOption
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/billing/feedback_option.rb
Overview
A resource for the feedback options model (for custom cancellation reasons)
Defined Under Namespace
Classes: StatusTransitions
Constant Summary collapse
- OBJECT_NAME =
"billing.feedback_option"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
An arbitrary string attached to the object.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#object ⇒ Object
readonly
String representing the object's type.
-
#status ⇒ Object
readonly
The feedback option's status.
-
#status_transitions ⇒ Object
readonly
Attribute for field status_transitions.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new feedback option.
-
.deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates a feedback option.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
An API method for listing the feedback options model.
- .object_name ⇒ Object
-
.update(id, params = {}, opts = {}) ⇒ Object
Updates the description of an existing feedback option.
Instance Method Summary collapse
-
#deactivate(params = {}, opts = {}) ⇒ Object
Deactivates a feedback option.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource
Methods included from APIOperations::Request
Methods inherited from StripeObject
#==, #[], #[]=, #_get_inner_class_type, #_get_union_variant_class, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #hash, #initialize, inner_class_union_variant_types, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values
Constructor Details
This class inherits a constructor from Stripe::StripeObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject
Instance Attribute Details
#description ⇒ Object (readonly)
An arbitrary string attached to the object. Often useful for displaying to users.
30 31 32 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 30 def description @description end |
#id ⇒ Object (readonly)
Unique identifier for the object.
32 33 34 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 32 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
34 35 36 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 34 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
36 37 38 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 36 def object @object end |
#status ⇒ Object (readonly)
The feedback option's status.
38 39 40 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 38 def status @status end |
#status_transitions ⇒ Object (readonly)
Attribute for field status_transitions
40 41 42 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 40 def status_transitions @status_transitions end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a new feedback option.
43 44 45 46 47 48 49 50 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 43 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/billing/feedback_options", params: params, opts: opts ) end |
.deactivate(id, params = {}, opts = {}) ⇒ Object
Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations.
63 64 65 66 67 68 69 70 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 63 def self.deactivate(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/billing/feedback_options/%<id>s/deactivate", { id: CGI.escape(id) }), params: params, opts: opts ) end |
.field_remappings ⇒ Object
96 97 98 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 96 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
92 93 94 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 92 def self.inner_class_types @inner_class_types = { status_transitions: StatusTransitions } end |
.list(params = {}, opts = {}) ⇒ Object
An API method for listing the feedback options model
73 74 75 76 77 78 79 80 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 73 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/feedback_options", params: params, opts: opts ) end |
.object_name ⇒ Object
13 14 15 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 13 def self.object_name "billing.feedback_option" end |
.update(id, params = {}, opts = {}) ⇒ Object
Updates the description of an existing feedback option.
83 84 85 86 87 88 89 90 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 83 def self.update(id, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/billing/feedback_options/%<id>s", { id: CGI.escape(id) }), params: params, opts: opts ) end |
Instance Method Details
#deactivate(params = {}, opts = {}) ⇒ Object
Deactivates a feedback option. Deactivated feedback options cannot be used in portal configurations.
53 54 55 56 57 58 59 60 |
# File 'lib/stripe/resources/billing/feedback_option.rb', line 53 def deactivate(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/billing/feedback_options/%<id>s/deactivate", { id: CGI.escape(self["id"]) }), params: params, opts: opts ) end |