Class: Ovh::Api::Api::Telephony::HistoryTollfreeConsumption

Inherits:
Object
  • Object
show all
Defined in:
lib/ovh-api/api/telephony/history_tollfree_consumption.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ HistoryTollfreeConsumption

Returns a new instance of HistoryTollfreeConsumption.



6
7
8
# File 'lib/ovh-api/api/telephony/history_tollfree_consumption.rb', line 6

def initialize(connection)
  @connection = connection
end

Instance Method Details

#document(billing_account:, date:) ⇒ Object

Raises:

  • (ArgumentError)


10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/ovh-api/api/telephony/history_tollfree_consumption.rb', line 10

def document(billing_account:, date:)
  raise ArgumentError, 'billing_account is required' if .nil?
  raise ArgumentError, 'date is required' if date.nil?

  @connection.call(
    :GET,
    '/telephony/{billingAccount}/historyTollfreeConsumption/{date}/document'
      .gsub('{billingAccount}', ERB::Util.url_encode(.to_s))
      .gsub('{date}', ERB::Util.url_encode(date.to_s)),
    type: nil,
    auth: []
  )
end

#get(billing_account:, date:) ⇒ Object

Raises:

  • (ArgumentError)


24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/ovh-api/api/telephony/history_tollfree_consumption.rb', line 24

def get(billing_account:, date:)
  raise ArgumentError, 'billing_account is required' if .nil?
  raise ArgumentError, 'date is required' if date.nil?

  @connection.call(
    :GET,
    '/telephony/{billingAccount}/historyTollfreeConsumption/{date}'
      .gsub('{billingAccount}', ERB::Util.url_encode(.to_s))
      .gsub('{date}', ERB::Util.url_encode(date.to_s)),
    type: nil,
    auth: []
  )
end

#list(billing_account:) ⇒ Object

Raises:

  • (ArgumentError)


38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ovh-api/api/telephony/history_tollfree_consumption.rb', line 38

def list(billing_account:)
  raise ArgumentError, 'billing_account is required' if .nil?

  @connection.call(
    :GET,
    '/telephony/{billingAccount}/historyTollfreeConsumption'
      .gsub('{billingAccount}', ERB::Util.url_encode(.to_s)),
    type: nil,
    auth: []
  )
end