Class: Kentaa::Api::Resources::CompanyPackage
- Inherits:
-
Object
- Object
- Kentaa::Api::Resources::CompanyPackage
- Defined in:
- lib/kentaa/api/resources/company_package.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #amount ⇒ Object
- #created_at ⇒ Object
- #description ⇒ Object
- #id ⇒ Object
-
#initialize(data) ⇒ CompanyPackage
constructor
A new instance of CompanyPackage.
- #reservation_limit ⇒ Object
- #reservation_type ⇒ Object
- #title ⇒ Object
- #updated_at ⇒ Object
Constructor Details
#initialize(data) ⇒ CompanyPackage
Returns a new instance of CompanyPackage.
9 10 11 |
# File 'lib/kentaa/api/resources/company_package.rb', line 9 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/kentaa/api/resources/company_package.rb', line 7 def data @data end |
Instance Method Details
#amount ⇒ Object
25 26 27 |
# File 'lib/kentaa/api/resources/company_package.rb', line 25 def amount BigDecimal(data[:amount]) end |
#created_at ⇒ Object
17 18 19 |
# File 'lib/kentaa/api/resources/company_package.rb', line 17 def created_at Time.parse(data[:created_at]) if data[:created_at] end |
#description ⇒ Object
33 34 35 |
# File 'lib/kentaa/api/resources/company_package.rb', line 33 def description data[:description] end |
#id ⇒ Object
13 14 15 |
# File 'lib/kentaa/api/resources/company_package.rb', line 13 def id data[:id] end |
#reservation_limit ⇒ Object
41 42 43 |
# File 'lib/kentaa/api/resources/company_package.rb', line 41 def reservation_limit data[:reservation_limit] end |
#reservation_type ⇒ Object
37 38 39 |
# File 'lib/kentaa/api/resources/company_package.rb', line 37 def reservation_type data[:reservation_type] end |
#title ⇒ Object
29 30 31 |
# File 'lib/kentaa/api/resources/company_package.rb', line 29 def title data[:title] end |
#updated_at ⇒ Object
21 22 23 |
# File 'lib/kentaa/api/resources/company_package.rb', line 21 def updated_at Time.parse(data[:updated_at]) if data[:updated_at] end |