Class: TripIt::PointsProgramActivity
- Defined in:
- lib/trip_it/classes/points_program_activity.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#bonus ⇒ Object
readonly
Returns the value of attribute bonus.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#total ⇒ Object
readonly
Returns the value of attribute total.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PointsProgramActivity
constructor
A new instance of PointsProgramActivity.
Methods inherited from Base
#Boolean, #camelize, #chkAndPopulate, #chkObjAndPopulate, #convertDT, #to_hash, #to_json, #to_xml
Methods included from ParamUtil
#address_param, #airportcode_param, #array_param, #boolean_param, #boolean_read_param, #camelize, #date_param, #datetime_param, #exceptions, #float_param, #integer_param, #string_param, #time_param, #traveler_array_param, #traveler_param
Constructor Details
#initialize(params = {}) ⇒ PointsProgramActivity
Returns a new instance of PointsProgramActivity.
5 6 7 8 9 10 11 12 13 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 5 def initialize(params = {}) raise ArgumentError, "PointsProgramActivity created with empty parameters" if params.empty? @date = Date.parse(params["date"]) unless params["date"].nil? @description = params["description"] @base = params["base"] @bonus = params["bonus"] @total = params["total"] end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
3 4 5 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 3 def base @base end |
#bonus ⇒ Object (readonly)
Returns the value of attribute bonus.
3 4 5 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 3 def bonus @bonus end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 3 def date @date end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
3 4 5 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 3 def description @description end |
#total ⇒ Object (readonly)
Returns the value of attribute total.
3 4 5 |
# File 'lib/trip_it/classes/points_program_activity.rb', line 3 def total @total end |