Class: Postmen::Invoice

Inherits:
Object
  • Object
show all
Includes:
Common
Defined in:
lib/postmen/invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Common

#to_hash

Constructor Details

#initialize(options) ⇒ Invoice

Returns a new instance of Invoice.



10
11
12
13
14
15
# File 'lib/postmen/invoice.rb', line 10

def initialize(options)
  @date = options[:date] # In YYYY-MM-DD format
  @number = options[:number]
  @type = options[:type]
  @number_of_copies = options[:number_of_copies]
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



5
6
7
# File 'lib/postmen/invoice.rb', line 5

def date
  @date
end

#numberObject (readonly)

Returns the value of attribute number.



5
6
7
# File 'lib/postmen/invoice.rb', line 5

def number
  @number
end

#number_of_copiesObject (readonly)

Returns the value of attribute number_of_copies.



5
6
7
# File 'lib/postmen/invoice.rb', line 5

def number_of_copies
  @number_of_copies
end

#typeObject (readonly)

Returns the value of attribute type.



5
6
7
# File 'lib/postmen/invoice.rb', line 5

def type
  @type
end