Class: Stripe::Radar::ValueListItemService
- Inherits:
-
StripeService
- Object
- StripeService
- Stripe::Radar::ValueListItemService
- Defined in:
- lib/stripe/services/radar/value_list_item_service.rb
Defined Under Namespace
Classes: CreateParams, DeleteParams, ListParams, RetrieveParams
Instance Method Summary collapse
-
#create(params = {}, opts = {}) ⇒ Object
Creates a new ValueListItem object, which is added to the specified parent value list.
-
#delete(item, params = {}, opts = {}) ⇒ Object
Deletes a ValueListItem object, removing it from its parent value list.
-
#list(params = {}, opts = {}) ⇒ Object
Returns a list of ValueListItem objects.
-
#retrieve(item, params = {}, opts = {}) ⇒ Object
Retrieves a ValueListItem object.
Methods inherited from StripeService
#initialize, #request, #request_stream
Constructor Details
This class inherits a constructor from Stripe::StripeService
Instance Method Details
#create(params = {}, opts = {}) ⇒ Object
Creates a new ValueListItem object, which is added to the specified parent value list.
86 87 88 89 90 91 92 93 94 |
# File 'lib/stripe/services/radar/value_list_item_service.rb', line 86 def create(params = {}, opts = {}) request( method: :post, path: "/v1/radar/value_list_items", params: params, opts: opts, base_address: :api ) end |
#delete(item, params = {}, opts = {}) ⇒ Object
Deletes a ValueListItem object, removing it from its parent value list.
97 98 99 100 101 102 103 104 105 |
# File 'lib/stripe/services/radar/value_list_item_service.rb', line 97 def delete(item, params = {}, opts = {}) request( method: :delete, path: format("/v1/radar/value_list_items/%<item>s", { item: CGI.escape(item) }), params: params, opts: opts, base_address: :api ) end |
#list(params = {}, opts = {}) ⇒ Object
Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.
108 109 110 111 112 113 114 115 116 |
# File 'lib/stripe/services/radar/value_list_item_service.rb', line 108 def list(params = {}, opts = {}) request( method: :get, path: "/v1/radar/value_list_items", params: params, opts: opts, base_address: :api ) end |
#retrieve(item, params = {}, opts = {}) ⇒ Object
Retrieves a ValueListItem object.
119 120 121 122 123 124 125 126 127 |
# File 'lib/stripe/services/radar/value_list_item_service.rb', line 119 def retrieve(item, params = {}, opts = {}) request( method: :get, path: format("/v1/radar/value_list_items/%<item>s", { item: CGI.escape(item) }), params: params, opts: opts, base_address: :api ) end |