Class: Stripe::Billing::FeedbackOption

Inherits:
APIResource show all
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

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::Create

create

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #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

included

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

#descriptionObject (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

#idObject (readonly)

Unique identifier for the object.



32
33
34
# File 'lib/stripe/resources/billing/feedback_option.rb', line 32

def id
  @id
end

#livemodeObject (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

#objectObject (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

#statusObject (readonly)

The feedback option's status.



38
39
40
# File 'lib/stripe/resources/billing/feedback_option.rb', line 38

def status
  @status
end

#status_transitionsObject (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_remappingsObject



96
97
98
# File 'lib/stripe/resources/billing/feedback_option.rb', line 96

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



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_nameObject



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