Class: ShellSmartPayApi::AroundLocationArray

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_smart_pay_api/models/around_location_array.rb

Overview

#Amenities The table below lists all the different types of amenities: | Code | Description | ——- | ——–

                       | 1       | ATM
| 2       | Water Closet or Toilet                    | 3       |

Lottery | 4 | Select

| 5       | Shop

| 6 | Truck Friendly | 11 | Bottled Gas | 12 | PB Gas

| 13      | Disabled Facilities                       | 14      |

Credit card | 16 | Loyalty Card (AIr Miles for NL) | 17 | WiFi

| 19      | Air & Water                               | 20      | Hoover /

Vacuum | 21 | Pay at pump

| 24      | Truck Only                                | 25      |

Car Wash | 26 | Service Bay

| 902     | External Card Reader                      |

903 | Bakery Shop | 907 | Grocery rewards / Partner Loyalty Accepted | 908 | Food Offerings | 914 | Shower | 915 | Vehicle identity system | 917 | Quick-lube | 918

| High Speed Diesel  | 919     | Type Of Parking  | 920     | Mobile

Payment | 921 | Disability Assistance | 922 | 24 Hour Fuel Service

| 923     | Mobile Loyalty  | 1001    | ATM-IN  | 1002    | ATM-OUT  | 1401
  | Credit card - Visa  | 1402    | Credit card - Mastercard  | 1403    |

Credit card - American Express | 1404 | Credit card - Diners Club | 1405 | Credit card - General | 1505 | Shellcard | 1506 | Shellcard | 1507 | Partner card | 1601 | Club smart card | 1602 | Gold Club smart card | 2001 | Water Closet or Toilet - standard | 2002 | Water Closet or Toilet - child | 2501 | Conveyor | 2502 | Jet | 2503 | Manual | 2504 | Rollover | 2505 | Rollover & Jet | 2506 | Conveyor & Jet | 5001 | Costa Express | 5002 | Deli2Go | 5003 | 2theloo | 5011 | Tim Hortons | 5012 | Starbucks | 5013 | Waitrose | 5014 | Coca-Cola Freestyle | 9051 | Fleet card - DKV | 9052 | Fleet card - UTA | 9053 | Fleet card - Esso | 9054 | Fleet card - Eni | 9055 | Fleet card | 9061 | austrian highway sticker | 9062 | Czech highway sticker | 9063 | Slovak highway sticker | 9064

| hungarian highway sticker  | 9081    | Snack Food/Quick Food  | 9082

| Sandwich | 9083 | Burger | 9084 | Pizza | 9085 | Hot Food | 9086 | Cafeteria | 9087 | Restaurant | 9088 | Others | 9101 | Telepass Premium | 9102 | Sconti BancoPosta | 9103 | Fuel discount | 9111 | Full service /Attended Service | 9112 | Self service | 9114

| Unmanned  | 9161    | Ido ticket  | 9163    | Toll smart card/Etoll  |

9191 | Parking Lanes | 9192 | Guarded parking | 9193 | Truck Parking | 90735 | Navigator Fleet Loyalty Discount | 7077 | CRT Shell Card Accepted | 7022 | Fleet Shell Card Accepted | 100001 | Single Network Card Accepted | 100002 | National Network Card Accepted | 5015 | Third party rental:Pizza Hut Express | 5016 | Third party rental: Budgens | 5017 | Third party rental: Deli Cafe | 5018 | Third party rental: Amazon Locker | 5019 | Third party rental: Deli by Shell | 9204 | Car Wash MPay | 9205 | PayTM | 9241 | AdBlue Pump Truck | 9242 | AdBlue Pump Passenger vehicles | 9243 | AdBlue Packed Product | 999909 | Shop: Spar Express | 999910 | Shop: Migrolino Error Codes

All request will return a 200 HTTP Response, but the Response will include

details of an error if/when an error occurs

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(data = nil) ⇒ AroundLocationArray

Returns a new instance of AroundLocationArray.



85
86
87
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 85

def initialize(data = nil)
  @data = data
end

Instance Attribute Details

#dataArray[Datum]

An array of station objects

Returns:



66
67
68
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 66

def data
  @data
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 90

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  # Parameter is an array, so we need to iterate through it

  data = nil
  unless hash['data'].nil?
    data = []
    hash['data'].each do |structure|
      data << (Datum.from_hash(structure) if structure)
    end
  end

  data = nil unless hash.key?('data')

  # Create object from extracted values.

  AroundLocationArray.new(data)
end

.namesObject

A mapping from model property names to API property names.



69
70
71
72
73
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 69

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['data'] = 'data'
  @_hash
end

.nullablesObject

An array for nullable fields



81
82
83
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 81

def self.nullables
  []
end

.optionalsObject

An array for optional fields



76
77
78
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 76

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



116
117
118
119
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 116

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} data: #{@data.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



110
111
112
113
# File 'lib/shell_smart_pay_api/models/around_location_array.rb', line 110

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} data: #{@data}>"
end