Class: OnlinePayments::SDK::Domain::CarRentalVehicleData

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#class_idString?

Returns the current value of class_id.

Returns:

  • (String, nil)

    the current value of class_id



11
12
13
# File 'lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb', line 11

def class_id
  @class_id
end

#identification_numberString?

Returns the current value of identification_number.

Returns:

  • (String, nil)

    the current value of identification_number



11
12
13
# File 'lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb', line 11

def identification_number
  @identification_number
end

Instance Method Details

#from_hash(hash) ⇒ Object



25
26
27
28
29
30
31
32
33
# File 'lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb', line 25

def from_hash(hash)
  super
  if hash.has_key? 'classId'
    @class_id = hash['classId']
  end
  if hash.has_key? 'identificationNumber'
    @identification_number = hash['identificationNumber']
  end
end

#to_hHash

Returns:

  • (Hash)


18
19
20
21
22
23
# File 'lib/onlinepayments/sdk/domain/car_rental_vehicle_data.rb', line 18

def to_h
  hash = super
  hash['classId'] = @class_id unless @class_id.nil?
  hash['identificationNumber'] = @identification_number unless @identification_number.nil?
  hash
end