Class: OnlinePayments::SDK::Domain::CarRentalPickupReturnData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#addressString?

Returns the current value of address.

Returns:

  • (String, nil)

    the current value of address



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def address
  @address
end

#cityString?

Returns the current value of city.

Returns:

  • (String, nil)

    the current value of city



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def city
  @city
end

#countryInteger?

Returns the current value of country.

Returns:

  • (Integer, nil)

    the current value of country



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def country
  @country
end

#dateString?

Returns the current value of date.

Returns:

  • (String, nil)

    the current value of date



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def date
  @date
end

#locationString?

Returns the current value of location.

Returns:

  • (String, nil)

    the current value of location



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def location
  @location
end

#postcodeString?

Returns the current value of postcode.

Returns:

  • (String, nil)

    the current value of postcode



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def postcode
  @postcode
end

#stateString?

Returns the current value of state.

Returns:

  • (String, nil)

    the current value of state



16
17
18
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 16

def state
  @state
end

Instance Method Details

#from_hash(hash) ⇒ Object



45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 45

def from_hash(hash)
  super
  if hash.has_key? 'address'
    @address = hash['address']
  end
  if hash.has_key? 'city'
    @city = hash['city']
  end
  if hash.has_key? 'country'
    @country = hash['country']
  end
  if hash.has_key? 'date'
    @date = hash['date']
  end
  if hash.has_key? 'location'
    @location = hash['location']
  end
  if hash.has_key? 'postcode'
    @postcode = hash['postcode']
  end
  if hash.has_key? 'state'
    @state = hash['state']
  end
end

#to_hHash

Returns:

  • (Hash)


33
34
35
36
37
38
39
40
41
42
43
# File 'lib/onlinepayments/sdk/domain/car_rental_pickup_return_data.rb', line 33

def to_h
  hash = super
  hash['address'] = @address unless @address.nil?
  hash['city'] = @city unless @city.nil?
  hash['country'] = @country unless @country.nil?
  hash['date'] = @date unless @date.nil?
  hash['location'] = @location unless @location.nil?
  hash['postcode'] = @postcode unless @postcode.nil?
  hash['state'] = @state unless @state.nil?
  hash
end