Class: Workarea::Paypal::Requests::CreateWebhook

Inherits:
Object
  • Object
show all
Defined in:
lib/workarea/paypal/requests/create_webhook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCreateWebhook

Returns a new instance of CreateWebhook.



7
8
9
10
11
12
13
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 7

def initialize
  @headers = {}
  @body = nil
  @verb = "POST"
  @path = "/v1/notifications/webhooks"
  @headers["Content-Type"] = "application/json"
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



5
6
7
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 5

def body
  @body
end

#headersObject

Returns the value of attribute headers.



5
6
7
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 5

def headers
  @headers
end

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 5

def path
  @path
end

#verbObject

Returns the value of attribute verb.



5
6
7
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 5

def verb
  @verb
end

Instance Method Details

#request_body(body) ⇒ Object



15
16
17
# File 'lib/workarea/paypal/requests/create_webhook.rb', line 15

def request_body(body)
  @body = body
end