Class: Contact::Form

Inherits:
Object
  • Object
show all
Defined in:
lib/ovh-api/api/contact/form.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Form

Returns a new instance of Form.



6
7
8
# File 'lib/ovh-api/api/contact/form.rb', line 6

def initialize(connection)
  @connection = connection
end

Instance Method Details

#getObject



10
11
12
13
14
15
16
17
# File 'lib/ovh-api/api/contact/form.rb', line 10

def get
  @connection.call(
    :GET,
    '/contact/form',
    type: nil,
    auth: []
  )
end

#send_post(contact_form_send_post_request:) ⇒ Object

Raises:

  • (ArgumentError)


19
20
21
22
23
24
25
26
27
28
29
# File 'lib/ovh-api/api/contact/form.rb', line 19

def send_post(contact_form_send_post_request:)
  raise ArgumentError, 'contact_form_send_post_request is required' if contact_form_send_post_request.nil?

  @connection.call(
    :POST,
    '/contact/form/send',
    type: nil,
    auth: [],
    body: contact_form_send_post_request
  )
end