Class: Stripe::Privacy::RedactionJob
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Privacy::RedactionJob
- Includes:
- APIOperations::Save
- Defined in:
- lib/stripe/resources/privacy/redaction_job.rb
Overview
The Redaction Job object redacts Stripe objects. You can use it to coordinate the removal of personal information from selected objects, making them permanently inaccessible in the Stripe Dashboard and API.
Defined Under Namespace
Classes: CancelParams, CreateParams, ListParams, Objects, 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.
-
#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.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#objects ⇒ Object
readonly
The objects to redact in this job.
-
#status ⇒ Object
readonly
The status of the job.
-
#validation_behavior ⇒ Object
readonly
Validation behavior determines how a job validates objects for redaction eligibility.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
-
.cancel(job, params = {}, opts = {}) ⇒ Object
You can cancel a redaction job when it’s in one of these statuses: ready, failed.
-
.create(params = {}, opts = {}) ⇒ Object
Creates a redaction job.
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
-
.list(params = {}, opts = {}) ⇒ Object
Returns a list of redaction jobs.
- .object_name ⇒ Object
-
.run(job, params = {}, opts = {}) ⇒ Object
Run a redaction job in a ready status.
-
.update(job, params = {}, opts = {}) ⇒ Object
Updates the properties of a redaction job without running or canceling the job.
-
.validate(job, params = {}, opts = {}) ⇒ Object
Validate a redaction job when it is in a failed status.
Instance Method Summary collapse
-
#cancel(params = {}, opts = {}) ⇒ Object
You can cancel a redaction job when it’s in one of these statuses: ready, failed.
-
#run(params = {}, opts = {}) ⇒ Object
Run a redaction job in a ready status.
-
#validate(params = {}, opts = {}) ⇒ Object
Validate a redaction job when it is in a failed status.
Methods included from APIOperations::Create
Methods included from APIOperations::List
Methods included from APIOperations::NestedResource
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, 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.
179 180 181 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 179 def created @created end |
#id ⇒ Object (readonly)
Unique identifier for the object.
181 182 183 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 181 def id @id 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.
183 184 185 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 183 def livemode @livemode end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
185 186 187 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 185 def object @object end |
#objects ⇒ Object (readonly)
The objects to redact in this job.
187 188 189 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 187 def objects @objects end |
#status ⇒ Object (readonly)
The status of the job.
189 190 191 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 189 def status @status end |
#validation_behavior ⇒ Object (readonly)
Validation behavior determines how a job validates objects for redaction eligibility. Default is ‘error`.
191 192 193 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 191 def validation_behavior @validation_behavior end |
Class Method Details
.cancel(job, params = {}, opts = {}) ⇒ Object
You can cancel a redaction job when it’s in one of these statuses: ready, failed.
Canceling the redaction job will abandon its attempt to redact the configured objects. A canceled job cannot be used again.
208 209 210 211 212 213 214 215 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 208 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
Creates a redaction job. When a job is created, it will start to validate.
218 219 220 221 222 223 224 225 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 218 def self.create(params = {}, opts = {}) request_stripe_object( method: :post, path: "/v1/privacy/redaction_jobs", params: params, opts: opts ) end |
.field_remappings ⇒ Object
309 310 311 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 309 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
305 306 307 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 305 def self.inner_class_types @inner_class_types = { objects: Objects } end |
.list(params = {}, opts = {}) ⇒ Object
Returns a list of redaction jobs.
228 229 230 231 232 233 234 235 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 228 def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/privacy/redaction_jobs", params: params, opts: opts ) end |
.object_name ⇒ Object
17 18 19 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 17 def self.object_name "privacy.redaction_job" end |
.run(job, params = {}, opts = {}) ⇒ Object
Run a redaction job in a ready status.
When you run a job, the configured objects will be redacted asynchronously. This action is irreversible and cannot be canceled once started.
The status of the job will move to redacting. Once all of the objects are redacted, the status will become succeeded. If the job’s validation_behavior is set to fix, the automatic fixes will be applied to objects at this step.
256 257 258 259 260 261 262 263 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 256 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
Updates the properties of a redaction job without running or canceling the job.
If the job to update is in a failed status, it will not automatically start to validate. Once you applied all of the changes, use the validate API to start validation again.
268 269 270 271 272 273 274 275 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 268 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 a redaction job when it is in a failed status.
When a job is created, it automatically begins to validate on the configured objects’ eligibility for redaction. Use this to validate the job again after its validation errors are resolved or the job’s validation_behavior is changed.
The status of the job will move to validating. Once all of the objects are validated, the status of the job will become ready. If there are any validation errors preventing the job from running, the status will become failed.
296 297 298 299 300 301 302 303 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 296 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
You can cancel a redaction job when it’s in one of these statuses: ready, failed.
Canceling the redaction job will abandon its attempt to redact the configured objects. A canceled job cannot be used again.
196 197 198 199 200 201 202 203 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 196 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 a redaction job in a ready status.
When you run a job, the configured objects will be redacted asynchronously. This action is irreversible and cannot be canceled once started.
The status of the job will move to redacting. Once all of the objects are redacted, the status will become succeeded. If the job’s validation_behavior is set to fix, the automatic fixes will be applied to objects at this step.
242 243 244 245 246 247 248 249 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 242 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 a redaction job when it is in a failed status.
When a job is created, it automatically begins to validate on the configured objects’ eligibility for redaction. Use this to validate the job again after its validation errors are resolved or the job’s validation_behavior is changed.
The status of the job will move to validating. Once all of the objects are validated, the status of the job will become ready. If there are any validation errors preventing the job from running, the status will become failed.
282 283 284 285 286 287 288 289 |
# File 'lib/stripe/resources/privacy/redaction_job.rb', line 282 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 |