Class: Stripe::Privacy::RedactionJob
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Privacy::RedactionJob
- Extended by:
- APIOperations::Create, APIOperations::List
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/privacy/redaction_job.rb
Overview
Redaction Jobs store the status of a redaction request. They are created when a redaction request is made and track the redaction validation and execution.
Defined Under Namespace
Classes: CancelParams, CreateParams, ListParams, RunParams, UpdateParams, ValidateParams
Constant Summary collapse
- OBJECT_NAME =
"privacy.redaction_job"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#objects ⇒ Object
readonly
The objects at the root level that are subject to redaction.
-
#status ⇒ Object
readonly
The status field represents the current state of the redaction job.
-
#validation_behavior ⇒ Object
readonly
Default is “error”.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.cancel(job, params = {}, opts = {}) ⇒ Object
Cancel redaction job method.
-
.create(params = {}, opts = {}) ⇒ Object
Create redaction job method.
-
.list(params = {}, opts = {}) ⇒ Object
List redaction jobs method…
- .object_name ⇒ Object
-
.run(job, params = {}, opts = {}) ⇒ Object
Run redaction job method.
-
.update(job, params = {}, opts = {}) ⇒ Object
Update redaction job method.
-
.validate(job, params = {}, opts = {}) ⇒ Object
Validate redaction job method.
Instance Method Summary collapse
-
#cancel(params = {}, opts = {}) ⇒ Object
Cancel redaction job method.
-
#run(params = {}, opts = {}) ⇒ Object
Run redaction job method.
-
#validate(params = {}, opts = {}) ⇒ Object
Validate redaction job method.
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
#==, #[], #[]=, 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
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
148 149 150 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 148 def created @created end |
#id ⇒ Object (readonly)
Unique identifier for the object.
150 151 152 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 150 def id @id end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
152 153 154 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 152 def object @object end |
#objects ⇒ Object (readonly)
The objects at the root level that are subject to redaction.
154 155 156 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 154 def objects @objects end |
#status ⇒ Object (readonly)
The status field represents the current state of the redaction job. It can take on any of the following values: VALIDATING, READY, REDACTING, SUCCEEDED, CANCELED, FAILED.
156 157 158 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 156 def status @status end |
#validation_behavior ⇒ Object (readonly)
Default is “error”. If “error”, we will make sure all objects in the graph are redactable in the 1st traversal, otherwise error. If “fix”, where possible, we will auto-fix any validation errors (e.g. by auto-transitioning objects to a terminal state, etc.) in the 2nd traversal before redacting
158 159 160 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 158 def validation_behavior @validation_behavior end |
Class Method Details
.cancel(job, params = {}, opts = {}) ⇒ Object
Cancel redaction job method
171 172 173 174 175 176 177 178 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 171 def self.cancel(job, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/cancel", { job: CGI.escape(job) }), params: params, opts: opts ) end |
.create(params = {}, opts = {}) ⇒ Object
Create redaction job method
181 182 183 184 185 186 187 188 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 181 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/privacy/redaction_jobs", params: params, opts: opts ) end |
.list(params = {}, opts = {}) ⇒ Object
List redaction jobs method…
191 192 193 194 195 196 197 198 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 191 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/privacy/redaction_jobs", params: params, opts: opts ) end |
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 14 def self.object_name "privacy.redaction_job" end |
.run(job, params = {}, opts = {}) ⇒ Object
Run redaction job method
211 212 213 214 215 216 217 218 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 211 def self.run(job, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/run", { job: CGI.escape(job) }), params: params, opts: opts ) end |
.update(job, params = {}, opts = {}) ⇒ Object
Update redaction job method
221 222 223 224 225 226 227 228 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 221 def self.update(job, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s", { job: CGI.escape(job) }), params: params, opts: opts ) end |
.validate(job, params = {}, opts = {}) ⇒ Object
Validate redaction job method
241 242 243 244 245 246 247 248 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 241 def self.validate(job, params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/validate", { job: CGI.escape(job) }), params: params, opts: opts ) end |
Instance Method Details
#cancel(params = {}, opts = {}) ⇒ Object
Cancel redaction job method
161 162 163 164 165 166 167 168 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 161 def cancel(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/cancel", { job: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#run(params = {}, opts = {}) ⇒ Object
Run redaction job method
201 202 203 204 205 206 207 208 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 201 def run(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/run", { job: CGI.escape(self["id"]) }), params: params, opts: opts ) end |
#validate(params = {}, opts = {}) ⇒ Object
Validate redaction job method
231 232 233 234 235 236 237 238 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 231 def validate(params = {}, opts = {}) request_stripe_object( method: :post, path: format("/v1/privacy/redaction_jobs/%<job>s/validate", { job: CGI.escape(self["id"]) }), params: params, opts: opts ) end |