Class: CyberSource::Ptsv2paymentsTravelInformationAutoRental

Inherits:
Object
  • Object
show all
Defined in:
lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Ptsv2paymentsTravelInformationAutoRental

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 297

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  if attributes.has_key?(:'noShowIndicator')
    self.no_show_indicator = attributes[:'noShowIndicator']
  end

  if attributes.has_key?(:'customerName')
    self.customer_name = attributes[:'customerName']
  end

  if attributes.has_key?(:'vehicleClass')
    self.vehicle_class = attributes[:'vehicleClass']
  end

  if attributes.has_key?(:'distanceTravelled')
    self.distance_travelled = attributes[:'distanceTravelled']
  end

  if attributes.has_key?(:'distanceUnit')
    self.distance_unit = attributes[:'distanceUnit']
  end

  if attributes.has_key?(:'returnDateTime')
    self.return_date_time = attributes[:'returnDateTime']
  end

  if attributes.has_key?(:'rentalDateTime')
    self.rental_date_time = attributes[:'rentalDateTime']
  end

  if attributes.has_key?(:'maxFreeDistance')
    self.max_free_distance = attributes[:'maxFreeDistance']
  end

  if attributes.has_key?(:'insuranceIndicator')
    self.insurance_indicator = attributes[:'insuranceIndicator']
  end

  if attributes.has_key?(:'programCode')
    self.program_code = attributes[:'programCode']
  end

  if attributes.has_key?(:'returnAddress')
    self.return_address = attributes[:'returnAddress']
  end

  if attributes.has_key?(:'rentalAddress')
    self.rental_address = attributes[:'rentalAddress']
  end

  if attributes.has_key?(:'agreementNumber')
    self.agreement_number = attributes[:'agreementNumber']
  end

  if attributes.has_key?(:'odometerReading')
    self.odometer_reading = attributes[:'odometerReading']
  end

  if attributes.has_key?(:'vehicleIdentificationNumber')
    self.vehicle_identification_number = attributes[:'vehicleIdentificationNumber']
  end

  if attributes.has_key?(:'companyId')
    self.company_id = attributes[:'companyId']
  end

  if attributes.has_key?(:'numberOfAdditionalDrivers')
    self.number_of_additional_drivers = attributes[:'numberOfAdditionalDrivers']
  end

  if attributes.has_key?(:'driverAge')
    self.driver_age = attributes[:'driverAge']
  end

  if attributes.has_key?(:'specialProgramCode')
    self.special_program_code = attributes[:'specialProgramCode']
  end

  if attributes.has_key?(:'vehicleMake')
    self.vehicle_make = attributes[:'vehicleMake']
  end

  if attributes.has_key?(:'vehicleModel')
    self.vehicle_model = attributes[:'vehicleModel']
  end

  if attributes.has_key?(:'timePeriod')
    self.time_period = attributes[:'timePeriod']
  end

  if attributes.has_key?(:'commodityCode')
    self.commodity_code = attributes[:'commodityCode']
  end

  if attributes.has_key?(:'customerServicePhoneNumber')
    self.customer_service_phone_number = attributes[:'customerServicePhoneNumber']
  end

  if attributes.has_key?(:'taxDetails')
    self.tax_details = attributes[:'taxDetails']
  end

  if attributes.has_key?(:'insuranceAmount')
    self.insurance_amount = attributes[:'insuranceAmount']
  end

  if attributes.has_key?(:'oneWayDropOffAmount')
    self.one_way_drop_off_amount = attributes[:'oneWayDropOffAmount']
  end

  if attributes.has_key?(:'adjustedAmountIndicator')
    self.adjusted_amount_indicator = attributes[:'adjustedAmountIndicator']
  end

  if attributes.has_key?(:'adjustedAmount')
    self.adjusted_amount = attributes[:'adjustedAmount']
  end

  if attributes.has_key?(:'fuelCharges')
    self.fuel_charges = attributes[:'fuelCharges']
  end

  if attributes.has_key?(:'weeklyRentalRate')
    self.weekly_rental_rate = attributes[:'weeklyRentalRate']
  end

  if attributes.has_key?(:'dailyRentalRate')
    self.daily_rental_rate = attributes[:'dailyRentalRate']
  end

  if attributes.has_key?(:'ratePerMile')
    self.rate_per_mile = attributes[:'ratePerMile']
  end

  if attributes.has_key?(:'mileageCharge')
    self.mileage_charge = attributes[:'mileageCharge']
  end

  if attributes.has_key?(:'extraMileageCharge')
    self.extra_mileage_charge = attributes[:'extraMileageCharge']
  end

  if attributes.has_key?(:'lateFeeAmount')
    self.late_fee_amount = attributes[:'lateFeeAmount']
  end

  if attributes.has_key?(:'towingCharge')
    self.towing_charge = attributes[:'towingCharge']
  end

  if attributes.has_key?(:'extraCharge')
    self.extra_charge = attributes[:'extraCharge']
  end

  if attributes.has_key?(:'gpsCharge')
    self.gps_charge = attributes[:'gpsCharge']
  end

  if attributes.has_key?(:'phoneCharge')
    self.phone_charge = attributes[:'phoneCharge']
  end

  if attributes.has_key?(:'parkingViolationCharge')
    self.parking_violation_charge = attributes[:'parkingViolationCharge']
  end

  if attributes.has_key?(:'otherCharges')
    self.other_charges = attributes[:'otherCharges']
  end

  if attributes.has_key?(:'companyName')
    self.company_name = attributes[:'companyName']
  end

  if attributes.has_key?(:'affiliateName')
    self.affiliate_name = attributes[:'affiliateName']
  end
end

Instance Attribute Details

#adjusted_amountObject

Adjusted Amount indicates whether any miscellaneous charges were incurred after the vehicle was returned. For authorizations, this field is supported only for American Express. For captures, this field is supported only for MasterCard and American Express. NOTE For American Express, this field is required if the ‘travelInformation.autoRental.adjustedAmountIndicator` field is included in the request and has a value; otherwise, this field is optional. For all other card types, this field is ignored.



98
99
100
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 98

def adjusted_amount
  @adjusted_amount
end

#adjusted_amount_indicatorObject

For MasterCard and Discover: Adjusted amount indicator code that indicates any miscellaneous charges incurred after the auto was returned. Possible values: - ‘A` - Drop-off charges - `B` - Delivery charges - `C` - Parking expenses - `D` - Extra hours - `E` - Violations - `X` - More than one of the above charges For **American Express**: Audit indicator code that indicates any adjustment for mileage, fuel, auto damage, etc. made to a rental agreement and whether the cardholder was notified. Possible value for the authorization service: - `A` (default): adjustment amount greater than 0 (zero) Possible values for the capture service: - `X` - Multiple adjustments - `Y` - One adjustment only; Cardmember notified - `Z` - One adjustment only; Cardmember not notified. This value is used as the default if the request does not include this field and includes an adjustment amount greater than 0 (zero). This is an optional field.



95
96
97
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 95

def adjusted_amount_indicator
  @adjusted_amount_indicator
end

#affiliate_nameObject

When merchant wants to send the affiliate name.



143
144
145
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 143

def affiliate_name
  @affiliate_name
end

#agreement_numberObject

Auto rental agency’s agreement (invoice) number provided to the customer. It is used to trace any inquiries about transactions. This field is supported for Visa, MasterCard, and American Express. This Merchant-defined value, which may be composed of any combination of characters and/or numerals, may become part of the descriptive bill on the Cardmember’s statement.



51
52
53
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 51

def agreement_number
  @agreement_number
end

#commodity_codeObject

Commodity code or International description code used to classify the item. Contact your acquirer for a list of codes.



81
82
83
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 81

def commodity_code
  @commodity_code
end

#company_idObject

Corporate Identifier provides the unique identifier of the corporation or entity renting the vehicle: |Card Specific Validation|VISA|MasterCard|Discover|AMEX| |— |— |— |— | | Filed Length| NA| 12| NA| NA| | Field Type| NA| AN| NA| NA| | M/O/C| NA| O| NA| NA|



60
61
62
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 60

def company_id
  @company_id
end

#company_nameObject

Merchant to send their auto rental company name



140
141
142
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 140

def company_name
  @company_name
end

#customer_nameObject

Name of the individual making the rental agreement. Valid data lengths by card: |Card Specific Validation|VISA|MasterCard|Discover|AMEX| |— |— |— |— | | Filed Length| 40| 40| 29| 26| | Field Type| AN| ANS| AN| AN| | M/O/C| O| M| M| M|



20
21
22
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 20

def customer_name
  @customer_name
end

#customer_service_phone_numberObject

Customer service telephone number that is used to resolve questions or disputes. Include the area code, exchange, and number. This field is supported only for MasterCard and American Express.



84
85
86
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 84

def customer_service_phone_number
  @customer_service_phone_number
end

#daily_rental_rateObject

Daily auto rental rate charged. This field is supported only for MasterCard and American Express. Field - Time Period needs to be populated with Daily if this field is present



107
108
109
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 107

def daily_rental_rate
  @daily_rental_rate
end

#distance_travelledObject

Total number of miles driven by the customer. This field is supported only for MasterCard and American Express.



26
27
28
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 26

def distance_travelled
  @distance_travelled
end

#distance_unitObject

Miles/Kilometers Indicator shows whether the "miles" fields are expressed in miles or kilometers. Allowed values: - ‘K` - Kilometers - `M` - Miles



29
30
31
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 29

def distance_unit
  @distance_unit
end

#driver_ageObject

Age of the driver renting the vehicle.



66
67
68
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 66

def driver_age
  @driver_age
end

#extra_chargeObject

(Extra Charges) provides the extra charges associated with the vehicle rental.



125
126
127
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 125

def extra_charge
  @extra_charge
end

#extra_mileage_chargeObject

Extra mileage charges that extend beyond the basic rental agreement. This field is supported only for Visa.



116
117
118
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 116

def extra_mileage_charge
  @extra_mileage_charge
end

#fuel_chargesObject

Extra gasoline charges that extend beyond the basic rental agreement. This field is supported only for Visa.



101
102
103
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 101

def fuel_charges
  @fuel_charges
end

#gps_chargeObject

Amount charged for renting a Global Positioning Service (GPS).



128
129
130
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 128

def gps_charge
  @gps_charge
end

#insurance_amountObject

Insurance charges. Field is conditional and can include decimal point.



89
90
91
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 89

def insurance_amount
  @insurance_amount
end

#insurance_indicatorObject

Used for MC and Discover Valid values: - ‘true` - Yes (insurance was purchased) - `false` - No (insurance was not purchased)



41
42
43
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 41

def insurance_indicator
  @insurance_indicator
end

#late_fee_amountObject

Extra charges related to a late return of the rented auto. This field is supported only for Visa.



119
120
121
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 119

def late_fee_amount
  @late_fee_amount
end

#max_free_distanceObject

Maximum number of free miles or kilometers allowed to a customer for the duration of the auto rental agreement. This field is supported only for MasterCard and American Express.



38
39
40
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 38

def max_free_distance
  @max_free_distance
end

#mileage_chargeObject

Regular Mileage Charge provides the amount charged for regular miles traveled during vehicle rental. Two decimal places



113
114
115
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 113

def mileage_charge
  @mileage_charge
end

#no_show_indicatorObject

No Show Indicator provides an indicator noting that the individual did not show up after making a reservation for a vehicle. Possible values: - true - false



17
18
19
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 17

def no_show_indicator
  @no_show_indicator
end

#number_of_additional_driversObject

The number of additional drivers included on the rental agreement not including the individual who signed the rental agreement.



63
64
65
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 63

def number_of_additional_drivers
  @number_of_additional_drivers
end

#odometer_readingObject

Odometer reading at time of vehicle rental.



54
55
56
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 54

def odometer_reading
  @odometer_reading
end

#one_way_drop_off_amountObject

Extra charges incurred for a one-way rental agreement for the auto. This field is supported only for Visa.



92
93
94
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 92

def one_way_drop_off_amount
  @one_way_drop_off_amount
end

#other_chargesObject

Total amount charged for all other miscellaneous charges not previously defined.



137
138
139
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 137

def other_charges
  @other_charges
end

#parking_violation_chargeObject

Extra charges incurred due to a parking violation for the auto. This field is supported only for Visa.



134
135
136
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 134

def parking_violation_charge
  @parking_violation_charge
end

#phone_chargeObject

Additional charges incurred for phone usage included on the total bill.



131
132
133
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 131

def phone_charge
  @phone_charge
end

#program_codeObject

Used to identify special circumstances applicable to the Card Transaction or Cardholder, such as "renter" or "show". This code is ‘2 digit` value agreed by Merchant and processor.



44
45
46
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 44

def program_code
  @program_code
end

#rate_per_mileObject

Rate charged for each mile. This field is supported only for MasterCard and American Express.



110
111
112
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 110

def rate_per_mile
  @rate_per_mile
end

#rental_addressObject

Returns the value of attribute rental_address.



48
49
50
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 48

def rental_address
  @rental_address
end

#rental_date_timeObject

Date/time the auto was picked up from the rental agency. Format: ‘yyyy-MM-dd HH-mm-ss z` This field is supported for Visa, MasterCard, and American Express.



35
36
37
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 35

def rental_date_time
  @rental_date_time
end

#return_addressObject

Returns the value of attribute return_address.



46
47
48
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 46

def return_address
  @return_address
end

#return_date_timeObject

Date/time the auto was returned to the rental agency. Format: “yyyy-MM-dd HH-mm-ss z“ This field is supported for Visa, MasterCard, and American Express.



32
33
34
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 32

def return_date_time
  @return_date_time
end

#special_program_codeObject

Program code used to identify special circumstances, such as "frequent renter" or "no show" status for the renter. Possible values: - ‘0`: not applicable (default) - `1`: frequent renter - `2`: no show For authorizations, this field is supported only for Visa. For captures, this field is supported for Visa, MasterCard, and American Express. Code for special programs applicable to the Card Transaction or the Cardholder.



69
70
71
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 69

def special_program_code
  @special_program_code
end

#tax_detailsObject

Returns the value of attribute tax_details.



86
87
88
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 86

def tax_details
  @tax_details
end

#time_periodObject

Indicates the time period for which the vehicle rental rate applies (e.g., daily, weekly or monthly). Daily, Weekly and Monthly are valid values.



78
79
80
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 78

def time_period
  @time_period
end

#towing_chargeObject

(Towing Charges) provides the amount charged to tow the rental vehicle.



122
123
124
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 122

def towing_charge
  @towing_charge
end

#vehicle_classObject

Classification of the rented auto. NOTE For VISA, this is a 2-byte optional code. Valid values for American Express & MasterCard: |American Express |MasterCard |Description| |— |— |— | | 0001| 0001| Mini| | 0002| 0002| Subcompact| | 0003| 0003| Economy| | 0004| 0004| Compact| | 0005| 0005| Midsize| | 0006| 0006| Intermediate| | 0007| 0007| Standard| | 0008| 0008| Fulll size| | 0009| 0009| Luxury| | 0010| 0010| Premium| | 0011| 0011| Minivan| | 0012| 0012| 12-passenger van| | 0013| 0013| Moving van| | 0014| 0014| 15-passenger van| | 0015| 0015| Cargo van| | 0016| 0016| 12-foot truck| | 0017| 0017| 20-foot truck| | 0018| 0018| 24-foot truck| | 0019| 0019| 26-foot truck| | 0020| 0020| Moped| | 0021| 0021| Stretch| | 0022| 0022| Regular| | 0023| 0023| Unique| | 0024| 0024| Exotic| | 0025| 0025| Small/medium truck| | 0026| 0026| Large truck| | 0027| 0027| Small SUV| | 0028| 0028| Medium SUV| | 0029| 0029| Large SUV| | 0030| 0030| Exotic SUV| | 9999| 9999| Miscellaneous| Additional Values allowed only for ‘American Express`: |American Express|MasterCard|Description| |— |— |— | | 0031| NA| Four Wheel Drive| | 0032| NA| Special| | 0099| NA| Taxi|



23
24
25
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 23

def vehicle_class
  @vehicle_class
end

#vehicle_identification_numberObject

This field contains a unique identifier assigned by the company to the vehicle.



57
58
59
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 57

def vehicle_identification_number
  @vehicle_identification_number
end

#vehicle_makeObject

Make of the vehicle being rented (e.g., Chevrolet or Ford).



72
73
74
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 72

def vehicle_make
  @vehicle_make
end

#vehicle_modelObject

Model of the vehicle being rented (e.g., Cavalier or Focus).



75
76
77
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 75

def vehicle_model
  @vehicle_model
end

#weekly_rental_rateObject

Weekly Rental Amount provides the amount charged for a seven-day rental period. Field - Time Period needs to be populated with Weekly if this field is present



104
105
106
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 104

def weekly_rental_rate
  @weekly_rental_rate
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 146

def self.attribute_map
  {
    :'no_show_indicator' => :'noShowIndicator',
    :'customer_name' => :'customerName',
    :'vehicle_class' => :'vehicleClass',
    :'distance_travelled' => :'distanceTravelled',
    :'distance_unit' => :'distanceUnit',
    :'return_date_time' => :'returnDateTime',
    :'rental_date_time' => :'rentalDateTime',
    :'max_free_distance' => :'maxFreeDistance',
    :'insurance_indicator' => :'insuranceIndicator',
    :'program_code' => :'programCode',
    :'return_address' => :'returnAddress',
    :'rental_address' => :'rentalAddress',
    :'agreement_number' => :'agreementNumber',
    :'odometer_reading' => :'odometerReading',
    :'vehicle_identification_number' => :'vehicleIdentificationNumber',
    :'company_id' => :'companyId',
    :'number_of_additional_drivers' => :'numberOfAdditionalDrivers',
    :'driver_age' => :'driverAge',
    :'special_program_code' => :'specialProgramCode',
    :'vehicle_make' => :'vehicleMake',
    :'vehicle_model' => :'vehicleModel',
    :'time_period' => :'timePeriod',
    :'commodity_code' => :'commodityCode',
    :'customer_service_phone_number' => :'customerServicePhoneNumber',
    :'tax_details' => :'taxDetails',
    :'insurance_amount' => :'insuranceAmount',
    :'one_way_drop_off_amount' => :'oneWayDropOffAmount',
    :'adjusted_amount_indicator' => :'adjustedAmountIndicator',
    :'adjusted_amount' => :'adjustedAmount',
    :'fuel_charges' => :'fuelCharges',
    :'weekly_rental_rate' => :'weeklyRentalRate',
    :'daily_rental_rate' => :'dailyRentalRate',
    :'rate_per_mile' => :'ratePerMile',
    :'mileage_charge' => :'mileageCharge',
    :'extra_mileage_charge' => :'extraMileageCharge',
    :'late_fee_amount' => :'lateFeeAmount',
    :'towing_charge' => :'towingCharge',
    :'extra_charge' => :'extraCharge',
    :'gps_charge' => :'gpsCharge',
    :'phone_charge' => :'phoneCharge',
    :'parking_violation_charge' => :'parkingViolationCharge',
    :'other_charges' => :'otherCharges',
    :'company_name' => :'companyName',
    :'affiliate_name' => :'affiliateName'
  }
end

.json_mapObject

Attribute mapping from JSON key to ruby-style variable name.



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 196

def self.json_map
  {
    :'no_show_indicator' => :'no_show_indicator',
    :'customer_name' => :'customer_name',
    :'vehicle_class' => :'vehicle_class',
    :'distance_travelled' => :'distance_travelled',
    :'distance_unit' => :'distance_unit',
    :'return_date_time' => :'return_date_time',
    :'rental_date_time' => :'rental_date_time',
    :'max_free_distance' => :'max_free_distance',
    :'insurance_indicator' => :'insurance_indicator',
    :'program_code' => :'program_code',
    :'return_address' => :'return_address',
    :'rental_address' => :'rental_address',
    :'agreement_number' => :'agreement_number',
    :'odometer_reading' => :'odometer_reading',
    :'vehicle_identification_number' => :'vehicle_identification_number',
    :'company_id' => :'company_id',
    :'number_of_additional_drivers' => :'number_of_additional_drivers',
    :'driver_age' => :'driver_age',
    :'special_program_code' => :'special_program_code',
    :'vehicle_make' => :'vehicle_make',
    :'vehicle_model' => :'vehicle_model',
    :'time_period' => :'time_period',
    :'commodity_code' => :'commodity_code',
    :'customer_service_phone_number' => :'customer_service_phone_number',
    :'tax_details' => :'tax_details',
    :'insurance_amount' => :'insurance_amount',
    :'one_way_drop_off_amount' => :'one_way_drop_off_amount',
    :'adjusted_amount_indicator' => :'adjusted_amount_indicator',
    :'adjusted_amount' => :'adjusted_amount',
    :'fuel_charges' => :'fuel_charges',
    :'weekly_rental_rate' => :'weekly_rental_rate',
    :'daily_rental_rate' => :'daily_rental_rate',
    :'rate_per_mile' => :'rate_per_mile',
    :'mileage_charge' => :'mileage_charge',
    :'extra_mileage_charge' => :'extra_mileage_charge',
    :'late_fee_amount' => :'late_fee_amount',
    :'towing_charge' => :'towing_charge',
    :'extra_charge' => :'extra_charge',
    :'gps_charge' => :'gps_charge',
    :'phone_charge' => :'phone_charge',
    :'parking_violation_charge' => :'parking_violation_charge',
    :'other_charges' => :'other_charges',
    :'company_name' => :'company_name',
    :'affiliate_name' => :'affiliate_name'
  }
end

.swagger_typesObject

Attribute type mapping.



246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 246

def self.swagger_types
  {
    :'no_show_indicator' => :'BOOLEAN',
    :'customer_name' => :'String',
    :'vehicle_class' => :'String',
    :'distance_travelled' => :'String',
    :'distance_unit' => :'String',
    :'return_date_time' => :'String',
    :'rental_date_time' => :'String',
    :'max_free_distance' => :'String',
    :'insurance_indicator' => :'BOOLEAN',
    :'program_code' => :'String',
    :'return_address' => :'Ptsv2paymentsTravelInformationAutoRentalReturnAddress',
    :'rental_address' => :'Ptsv2paymentsTravelInformationAutoRentalRentalAddress',
    :'agreement_number' => :'String',
    :'odometer_reading' => :'String',
    :'vehicle_identification_number' => :'String',
    :'company_id' => :'String',
    :'number_of_additional_drivers' => :'String',
    :'driver_age' => :'String',
    :'special_program_code' => :'String',
    :'vehicle_make' => :'String',
    :'vehicle_model' => :'String',
    :'time_period' => :'String',
    :'commodity_code' => :'String',
    :'customer_service_phone_number' => :'String',
    :'tax_details' => :'Ptsv2paymentsTravelInformationAutoRentalTaxDetails',
    :'insurance_amount' => :'String',
    :'one_way_drop_off_amount' => :'String',
    :'adjusted_amount_indicator' => :'String',
    :'adjusted_amount' => :'String',
    :'fuel_charges' => :'String',
    :'weekly_rental_rate' => :'String',
    :'daily_rental_rate' => :'String',
    :'rate_per_mile' => :'String',
    :'mileage_charge' => :'String',
    :'extra_mileage_charge' => :'String',
    :'late_fee_amount' => :'String',
    :'towing_charge' => :'String',
    :'extra_charge' => :'String',
    :'gps_charge' => :'String',
    :'phone_charge' => :'String',
    :'parking_violation_charge' => :'String',
    :'other_charges' => :'String',
    :'company_name' => :'String',
    :'affiliate_name' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 729

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      no_show_indicator == o.no_show_indicator &&
      customer_name == o.customer_name &&
      vehicle_class == o.vehicle_class &&
      distance_travelled == o.distance_travelled &&
      distance_unit == o.distance_unit &&
      return_date_time == o.return_date_time &&
      rental_date_time == o.rental_date_time &&
      max_free_distance == o.max_free_distance &&
      insurance_indicator == o.insurance_indicator &&
      program_code == o.program_code &&
      return_address == o.return_address &&
      rental_address == o.rental_address &&
      agreement_number == o.agreement_number &&
      odometer_reading == o.odometer_reading &&
      vehicle_identification_number == o.vehicle_identification_number &&
      company_id == o.company_id &&
      number_of_additional_drivers == o.number_of_additional_drivers &&
      driver_age == o.driver_age &&
      special_program_code == o.special_program_code &&
      vehicle_make == o.vehicle_make &&
      vehicle_model == o.vehicle_model &&
      time_period == o.time_period &&
      commodity_code == o.commodity_code &&
      customer_service_phone_number == o.customer_service_phone_number &&
      tax_details == o.tax_details &&
      insurance_amount == o.insurance_amount &&
      one_way_drop_off_amount == o.one_way_drop_off_amount &&
      adjusted_amount_indicator == o.adjusted_amount_indicator &&
      adjusted_amount == o.adjusted_amount &&
      fuel_charges == o.fuel_charges &&
      weekly_rental_rate == o.weekly_rental_rate &&
      daily_rental_rate == o.daily_rental_rate &&
      rate_per_mile == o.rate_per_mile &&
      mileage_charge == o.mileage_charge &&
      extra_mileage_charge == o.extra_mileage_charge &&
      late_fee_amount == o.late_fee_amount &&
      towing_charge == o.towing_charge &&
      extra_charge == o.extra_charge &&
      gps_charge == o.gps_charge &&
      phone_charge == o.phone_charge &&
      parking_violation_charge == o.parking_violation_charge &&
      other_charges == o.other_charges &&
      company_name == o.company_name &&
      affiliate_name == o.affiliate_name
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 814

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = CyberSource.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



880
881
882
883
884
885
886
887
888
889
890
891
892
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 880

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 793

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


780
781
782
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 780

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



786
787
788
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 786

def hash
  [no_show_indicator, customer_name, vehicle_class, distance_travelled, distance_unit, return_date_time, rental_date_time, max_free_distance, insurance_indicator, program_code, return_address, rental_address, agreement_number, odometer_reading, vehicle_identification_number, company_id, number_of_additional_drivers, driver_age, special_program_code, vehicle_make, vehicle_model, time_period, commodity_code, customer_service_phone_number, tax_details, insurance_amount, one_way_drop_off_amount, adjusted_amount_indicator, adjusted_amount, fuel_charges, weekly_rental_rate, daily_rental_rate, rate_per_mile, mileage_charge, extra_mileage_charge, late_fee_amount, towing_charge, extra_charge, gps_charge, phone_charge, parking_violation_charge, other_charges, company_name, affiliate_name].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



482
483
484
485
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 482

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



860
861
862
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 860

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



866
867
868
869
870
871
872
873
874
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 866

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



854
855
856
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 854

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



489
490
491
# File 'lib/cybersource_rest_client/models/ptsv2payments_travel_information_auto_rental.rb', line 489

def valid?
  true
end