Class: Fastly::Invoice

Inherits:
Base
  • Object
show all
Defined in:
lib/fastly/invoice.rb

Overview

An invoice for a time period

Instance Attribute Summary collapse

Attributes inherited from Base

#fetcher

Instance Method Summary collapse

Methods inherited from Base

#as_hash, #initialize, path, #require_api_key!

Constructor Details

This class inherits a constructor from Fastly::Base

Instance Attribute Details

#end_timeObject

Returns the value of attribute end_time.



7
8
9
# File 'lib/fastly/invoice.rb', line 7

def end_time
  @end_time
end

#invoice_idObject

Returns the value of attribute invoice_id.



7
8
9
# File 'lib/fastly/invoice.rb', line 7

def invoice_id
  @invoice_id
end

#regionsObject

Returns the value of attribute regions.



7
8
9
# File 'lib/fastly/invoice.rb', line 7

def regions
  @regions
end

#start_timeObject

Returns the value of attribute start_time.



7
8
9
# File 'lib/fastly/invoice.rb', line 7

def start_time
  @start_time
end

#totalObject

Returns the value of attribute total.



7
8
9
# File 'lib/fastly/invoice.rb', line 7

def total
  @total
end

Instance Method Details

#endObject

Get the end time of this invoice as a DateTime object in UTC



38
39
40
# File 'lib/fastly/invoice.rb', line 38

def end
  DateTime.parse(end_time).new_offset(0)
end

#startObject

Get the start time of this invoice as a DateTime object in UTC



33
34
35
# File 'lib/fastly/invoice.rb', line 33

def start
  DateTime.parse(start_time).new_offset(0)
end