Class: TripIt::PointsProgramExpiration
- Defined in:
- lib/trip_it/classes/points_program_expiration.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ PointsProgramExpiration
constructor
A new instance of PointsProgramExpiration.
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 = {}) ⇒ PointsProgramExpiration
Returns a new instance of PointsProgramExpiration.
5 6 7 8 9 10 |
# File 'lib/trip_it/classes/points_program_expiration.rb', line 5 def initialize(params = {}) raise ArgumentError, "PointsProgramExpiration created with empty parameters" if params.empty? @date = Date.parse(params["date"]) unless params["date"].nil? @amount = params["amount"] end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
3 4 5 |
# File 'lib/trip_it/classes/points_program_expiration.rb', line 3 def amount @amount end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
3 4 5 |
# File 'lib/trip_it/classes/points_program_expiration.rb', line 3 def date @date end |