Class: Proz::PatchWiwoReply

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/proz/patch_wiwo_reply.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token:, wiwo_id:, wiwo_reply_id:, **options) ⇒ PatchWiwoReply

Returns a new instance of PatchWiwoReply.



8
9
10
11
12
13
# File 'lib/proz/patch_wiwo_reply.rb', line 8

def initialize(token:, wiwo_id:, wiwo_reply_id:, **options)
  @token = token
  @wiwo_id = wiwo_id
  @wiwo_reply_id = wiwo_reply_id
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'lib/proz/patch_wiwo_reply.rb', line 7

def options
  @options
end

#tokenObject (readonly)

Returns the value of attribute token.



7
8
9
# File 'lib/proz/patch_wiwo_reply.rb', line 7

def token
  @token
end

#wiwo_idObject (readonly)

Returns the value of attribute wiwo_id.



7
8
9
# File 'lib/proz/patch_wiwo_reply.rb', line 7

def wiwo_id
  @wiwo_id
end

#wiwo_reply_idObject (readonly)

Returns the value of attribute wiwo_reply_id.



7
8
9
# File 'lib/proz/patch_wiwo_reply.rb', line 7

def wiwo_reply_id
  @wiwo_reply_id
end

Instance Method Details

#patchObject



15
16
17
18
19
# File 'lib/proz/patch_wiwo_reply.rb', line 15

def patch
  self.class.patch("/wiwo/#{wiwo_id}/replies/#{wiwo_reply_id}",
    body: options,
    headers: { 'Authorization' => "Bearer #{token}" } )
end