Class: Pack::Siptrunk

Inherits:
Object
  • Object
show all
Defined in:
lib/ovh-api/api/pack/siptrunk.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ Siptrunk

Returns a new instance of Siptrunk.



6
7
8
# File 'lib/ovh-api/api/pack/siptrunk.rb', line 6

def initialize(connection)
  @connection = connection
end

Instance Method Details

#get(iam_tags: nil) ⇒ Object



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

def get(iam_tags: nil)
  @connection.call(
    :GET,
    '/pack/siptrunk',
    type: nil,
    auth: [],
    query: { 'iamTags' => iam_tags }
  )
end

#pack_name_change_contact_post(pack_name:, cdn_dedicated_service_name_change_contact_post_request: nil) ⇒ Object

Raises:

  • (ArgumentError)


20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/ovh-api/api/pack/siptrunk.rb', line 20

def pack_name_change_contact_post(pack_name:, cdn_dedicated_service_name_change_contact_post_request: nil)
  raise ArgumentError, 'pack_name is required' if pack_name.nil?

  @connection.call(
    :POST,
    '/pack/siptrunk/{packName}/changeContact'
      .gsub('{packName}', ERB::Util.url_encode(pack_name.to_s)),
    type: nil,
    auth: [],
    body: cdn_dedicated_service_name_change_contact_post_request
  )
end

#pack_name_get(pack_name:) ⇒ Object

Raises:

  • (ArgumentError)


33
34
35
36
37
38
39
40
41
42
43
# File 'lib/ovh-api/api/pack/siptrunk.rb', line 33

def pack_name_get(pack_name:)
  raise ArgumentError, 'pack_name is required' if pack_name.nil?

  @connection.call(
    :GET,
    '/pack/siptrunk/{packName}'
      .gsub('{packName}', ERB::Util.url_encode(pack_name.to_s)),
    type: nil,
    auth: []
  )
end

#pack_name_service_infos_get(pack_name:) ⇒ Object

Raises:

  • (ArgumentError)


45
46
47
48
49
50
51
52
53
54
55
# File 'lib/ovh-api/api/pack/siptrunk.rb', line 45

def pack_name_service_infos_get(pack_name:)
  raise ArgumentError, 'pack_name is required' if pack_name.nil?

  @connection.call(
    :GET,
    '/pack/siptrunk/{packName}/serviceInfos'
      .gsub('{packName}', ERB::Util.url_encode(pack_name.to_s)),
    type: nil,
    auth: []
  )
end

#pack_name_service_infos_put(pack_name:, services_service:) ⇒ Object

Raises:

  • (ArgumentError)


57
58
59
60
61
62
63
64
65
66
67
68
69
# File 'lib/ovh-api/api/pack/siptrunk.rb', line 57

def pack_name_service_infos_put(pack_name:, services_service:)
  raise ArgumentError, 'pack_name is required' if pack_name.nil?
  raise ArgumentError, 'services_service is required' if services_service.nil?

  @connection.call(
    :PUT,
    '/pack/siptrunk/{packName}/serviceInfos'
      .gsub('{packName}', ERB::Util.url_encode(pack_name.to_s)),
    type: nil,
    auth: [],
    body: services_service
  )
end