Class: DeepL::Requests::StyleRule::Update
- Inherits:
-
Base
- Object
- Base
- DeepL::Requests::StyleRule::Update
show all
- Defined in:
- lib/deepl/requests/style_rule/update.rb
Instance Attribute Summary
Attributes inherited from Base
#api, #options, #response
Instance Method Summary
collapse
Methods inherited from Base
#details
Constructor Details
#initialize(api, style_id, name, options = {}) ⇒ Update
Returns a new instance of Update.
10
11
12
13
14
|
# File 'lib/deepl/requests/style_rule/update.rb', line 10
def initialize(api, style_id, name, options = {})
super(api, options)
@style_id = style_id
@name = name
end
|
Instance Method Details
#request ⇒ Object
16
17
18
19
|
# File 'lib/deepl/requests/style_rule/update.rb', line 16
def request
payload = { name: @name }
build_style_rule(*execute_request_with_retries(patch_request(payload)))
end
|
#to_s ⇒ Object
21
22
23
|
# File 'lib/deepl/requests/style_rule/update.rb', line 21
def to_s
"PATCH #{uri.request_uri}"
end
|