Class: Stripe::Radar::ValueList
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Radar::ValueList
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Delete, APIOperations::Save
- Defined in:
- lib/stripe/resources/radar/value_list.rb
Overview
Value lists allow you to group values together which can then be referenced in rules.
Related guide: [Default Stripe lists](stripe.com/docs/radar/lists#managing-list-items)
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, UpdateParams
Constant Summary collapse
- OBJECT_NAME =
"radar.value_list"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#alias ⇒ Object
readonly
The name of the value list for use in rules.
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#created_by ⇒ Object
readonly
The name or email address of the user who created this value list.
-
#deleted ⇒ Object
readonly
Always true for a deleted object.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#item_type ⇒ Object
readonly
The type of items in the value list.
-
#list_items ⇒ Object
readonly
List of items contained within this value list.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#name ⇒ Object
readonly
The name of the value list.
-
#object ⇒ Object
readonly
String representing the object’s type.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.create(params = {}, opts = {}) ⇒ Object
Creates a new ValueList object, which can then be referenced in rules.
-
.delete(value_list, params = {}, opts = {}) ⇒ Object
Deletes a ValueList object, also deleting any items contained within the value list.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of ValueList objects.
- .object_name ⇒ Object
-
.update(value_list, params = {}, opts = {}) ⇒ Object
Updates a ValueList object by setting the values of the parameters passed.
Instance Method Summary collapse
-
#delete(params = {}, opts = {}) ⇒ Object
Deletes a ValueList object, also deleting any items contained within the value list.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::Save
Methods included from APIOperations::Delete
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, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #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
#alias ⇒ Object (readonly)
The name of the value list for use in rules.
113 114 115 |
# File 'lib/stripe/resources/radar/value_list.rb', line 113 def alias @alias end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
115 116 117 |
# File 'lib/stripe/resources/radar/value_list.rb', line 115 def created @created end |
#created_by ⇒ Object (readonly)
The name or email address of the user who created this value list.
117 118 119 |
# File 'lib/stripe/resources/radar/value_list.rb', line 117 def created_by @created_by end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
133 134 135 |
# File 'lib/stripe/resources/radar/value_list.rb', line 133 def deleted @deleted end |
#id ⇒ Object (readonly)
Unique identifier for the object.
119 120 121 |
# File 'lib/stripe/resources/radar/value_list.rb', line 119 def id @id end |
#item_type ⇒ Object (readonly)
The type of items in the value list. One of ‘card_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, `customer_id`, `sepa_debit_fingerprint`, or `us_bank_account_fingerprint`.
121 122 123 |
# File 'lib/stripe/resources/radar/value_list.rb', line 121 def item_type @item_type end |
#list_items ⇒ Object (readonly)
List of items contained within this value list.
123 124 125 |
# File 'lib/stripe/resources/radar/value_list.rb', line 123 def list_items @list_items end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
125 126 127 |
# File 'lib/stripe/resources/radar/value_list.rb', line 125 def livemode @livemode end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
127 128 129 |
# File 'lib/stripe/resources/radar/value_list.rb', line 127 def @metadata end |
#name ⇒ Object (readonly)
The name of the value list.
129 130 131 |
# File 'lib/stripe/resources/radar/value_list.rb', line 129 def name @name end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
131 132 133 |
# File 'lib/stripe/resources/radar/value_list.rb', line 131 def object @object end |
Class Method Details
.create(params = {}, opts = {}) ⇒ Object
Creates a new ValueList object, which can then be referenced in rules.
136 137 138 139 140 141 142 143 |
# File 'lib/stripe/resources/radar/value_list.rb', line 136 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/radar/value_lists", params: params, opts: opts ) end |
.delete(value_list, params = {}, opts = {}) ⇒ Object
Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
146 147 148 149 150 151 152 153 |
# File 'lib/stripe/resources/radar/value_list.rb', line 146 def self.delete(value_list, params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/radar/value_lists/%<value_list>s", { value_list: CGI.escape(value_list) }), params: params, opts: opts ) end |
.field_remappings ⇒ Object
189 190 191 |
# File 'lib/stripe/resources/radar/value_list.rb', line 189 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
185 186 187 |
# File 'lib/stripe/resources/radar/value_list.rb', line 185 def self.inner_class_types @inner_class_types = {} end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
166 167 168 169 170 171 172 173 |
# File 'lib/stripe/resources/radar/value_list.rb', line 166 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_lists", params: params, opts: opts ) end |
.object_name ⇒ Object
16 17 18 |
# File 'lib/stripe/resources/radar/value_list.rb', line 16 def self.object_name "radar.value_list" end |
.update(value_list, params = {}, opts = {}) ⇒ Object
Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable.
176 177 178 179 180 181 182 183 |
# File 'lib/stripe/resources/radar/value_list.rb', line 176 def self.update(value_list, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/radar/value_lists/%<value_list>s", { value_list: CGI.escape(value_list) }), params: params, opts: opts ) end |
Instance Method Details
#delete(params = {}, opts = {}) ⇒ Object
Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules.
156 157 158 159 160 161 162 163 |
# File 'lib/stripe/resources/radar/value_list.rb', line 156 def delete(params = {}, opts = {}) request_stripe_object( method: :delete, path: format("/v1/radar/value_lists/%<value_list>s", { value_list: CGI.escape(self["id"]) }), params: params, opts: opts ) end |