Class: Files::InvoiceLineItem
- Inherits:
-
Object
- Object
- Files::InvoiceLineItem
- Defined in:
- lib/files.com/models/invoice_line_item.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#amount ⇒ Object
decimal - Invoice line item amount.
-
#created_at ⇒ Object
date-time - Invoice line item created at date/time.
-
#description ⇒ Object
string - Invoice line item description.
-
#id ⇒ Object
int64 - Invoice Line item Id.
-
#initialize(attributes = {}, options = {}) ⇒ InvoiceLineItem
constructor
A new instance of InvoiceLineItem.
-
#plan ⇒ Object
string - Plan name.
-
#prepaid_bytes ⇒ Object
int64 - Prepaid bytes purchased for this invoice line item.
-
#prepaid_bytes_available ⇒ Object
int64 - Available prepaid bytes for this invoice line item.
-
#prepaid_bytes_expire_at ⇒ Object
date-time - When the prepaid bytes expire.
-
#prepaid_bytes_used ⇒ Object
int64 - Total prepaid bytes used for this invoice line item.
-
#service_end_at ⇒ Object
date-time - Invoice line item service end date/time.
-
#service_start_at ⇒ Object
date-time - Invoice line item service start date/time.
-
#site ⇒ Object
string - Site name.
-
#type ⇒ Object
string - Invoice line item type.
Constructor Details
#initialize(attributes = {}, options = {}) ⇒ InvoiceLineItem
Returns a new instance of InvoiceLineItem.
9 10 11 12 |
# File 'lib/files.com/models/invoice_line_item.rb', line 9 def initialize(attributes = {}, = {}) @attributes = attributes || {} @options = || {} end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
7 8 9 |
# File 'lib/files.com/models/invoice_line_item.rb', line 7 def attributes @attributes end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/files.com/models/invoice_line_item.rb', line 7 def @options end |
Instance Method Details
#amount ⇒ Object
decimal - Invoice line item amount
20 21 22 23 24 25 |
# File 'lib/files.com/models/invoice_line_item.rb', line 20 def amount value = @attributes[:amount] return value if value.nil? || value.is_a?(BigDecimal) BigDecimal(value.to_s) end |
#created_at ⇒ Object
date-time - Invoice line item created at date/time
28 29 30 |
# File 'lib/files.com/models/invoice_line_item.rb', line 28 def created_at @attributes[:created_at] end |
#description ⇒ Object
string - Invoice line item description
33 34 35 |
# File 'lib/files.com/models/invoice_line_item.rb', line 33 def description @attributes[:description] end |
#id ⇒ Object
int64 - Invoice Line item Id
15 16 17 |
# File 'lib/files.com/models/invoice_line_item.rb', line 15 def id @attributes[:id] end |
#plan ⇒ Object
string - Plan name
53 54 55 |
# File 'lib/files.com/models/invoice_line_item.rb', line 53 def plan @attributes[:plan] end |
#prepaid_bytes ⇒ Object
int64 - Prepaid bytes purchased for this invoice line item
63 64 65 |
# File 'lib/files.com/models/invoice_line_item.rb', line 63 def prepaid_bytes @attributes[:prepaid_bytes] end |
#prepaid_bytes_available ⇒ Object
int64 - Available prepaid bytes for this invoice line item
78 79 80 |
# File 'lib/files.com/models/invoice_line_item.rb', line 78 def prepaid_bytes_available @attributes[:prepaid_bytes_available] end |
#prepaid_bytes_expire_at ⇒ Object
date-time - When the prepaid bytes expire
68 69 70 |
# File 'lib/files.com/models/invoice_line_item.rb', line 68 def prepaid_bytes_expire_at @attributes[:prepaid_bytes_expire_at] end |
#prepaid_bytes_used ⇒ Object
int64 - Total prepaid bytes used for this invoice line item
73 74 75 |
# File 'lib/files.com/models/invoice_line_item.rb', line 73 def prepaid_bytes_used @attributes[:prepaid_bytes_used] end |
#service_end_at ⇒ Object
date-time - Invoice line item service end date/time
43 44 45 |
# File 'lib/files.com/models/invoice_line_item.rb', line 43 def service_end_at @attributes[:service_end_at] end |
#service_start_at ⇒ Object
date-time - Invoice line item service start date/time
48 49 50 |
# File 'lib/files.com/models/invoice_line_item.rb', line 48 def service_start_at @attributes[:service_start_at] end |
#site ⇒ Object
string - Site name
58 59 60 |
# File 'lib/files.com/models/invoice_line_item.rb', line 58 def site @attributes[:site] end |
#type ⇒ Object
string - Invoice line item type
38 39 40 |
# File 'lib/files.com/models/invoice_line_item.rb', line 38 def type @attributes[:type] end |