Class: ShellDataReportingApIs::FeeRuleLocation
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::FeeRuleLocation
- Defined in:
- lib/shell_data_reporting_ap_is/models/fee_rule_location.rb
Overview
FeeRuleLocation Model.
Instance Attribute Summary collapse
-
#country ⇒ String
Country name.
-
#country_code ⇒ String
ISO Code of country.
-
#delco_id ⇒ String
Delco Identifier.
-
#fuel_network_id ⇒ Integer
Fuel Network Identifier.
-
#network_name ⇒ String
Network Name.
-
#site_code ⇒ Integer
Site Code.
-
#site_group_id ⇒ Integer
Site-Group ID.
-
#site_group_name ⇒ String
Site-Group name.
-
#site_id ⇒ Integer
Site Identifier.
-
#site_name ⇒ String
Site Name.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(delco_id = SKIP, country = SKIP, country_code = SKIP, fuel_network_id = SKIP, network_name = SKIP, site_group_id = SKIP, site_group_name = SKIP, site_code = SKIP, site_id = SKIP, site_name = SKIP) ⇒ FeeRuleLocation
constructor
A new instance of FeeRuleLocation.
Methods inherited from BaseModel
Constructor Details
#initialize(delco_id = SKIP, country = SKIP, country_code = SKIP, fuel_network_id = SKIP, network_name = SKIP, site_group_id = SKIP, site_group_name = SKIP, site_code = SKIP, site_id = SKIP, site_name = SKIP) ⇒ FeeRuleLocation
Returns a new instance of FeeRuleLocation.
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 100 def initialize(delco_id = SKIP, country = SKIP, country_code = SKIP, fuel_network_id = SKIP, network_name = SKIP, site_group_id = SKIP, site_group_name = SKIP, site_code = SKIP, site_id = SKIP, site_name = SKIP) @delco_id = delco_id unless delco_id == SKIP @country = country unless country == SKIP @country_code = country_code unless country_code == SKIP @fuel_network_id = fuel_network_id unless fuel_network_id == SKIP @network_name = network_name unless network_name == SKIP @site_group_id = site_group_id unless site_group_id == SKIP @site_group_name = site_group_name unless site_group_name == SKIP @site_code = site_code unless site_code == SKIP @site_id = site_id unless site_id == SKIP @site_name = site_name unless site_name == SKIP end |
Instance Attribute Details
#country ⇒ String
Country name.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 18 def country @country end |
#country_code ⇒ String
ISO Code of country.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 22 def country_code @country_code end |
#delco_id ⇒ String
Delco Identifier.
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 14 def delco_id @delco_id end |
#fuel_network_id ⇒ Integer
Fuel Network Identifier.
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 26 def fuel_network_id @fuel_network_id end |
#network_name ⇒ String
Network Name.
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 30 def network_name @network_name end |
#site_code ⇒ Integer
Site Code
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 42 def site_code @site_code end |
#site_group_id ⇒ Integer
Site-Group ID
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 34 def site_group_id @site_group_id end |
#site_group_name ⇒ String
Site-Group name.
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 38 def site_group_name @site_group_name end |
#site_id ⇒ Integer
Site Identifier
46 47 48 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 46 def site_id @site_id end |
#site_name ⇒ String
Site Name
50 51 52 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 50 def site_name @site_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 117 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. delco_id = hash.key?('DelcoId') ? hash['DelcoId'] : SKIP country = hash.key?('Country') ? hash['Country'] : SKIP country_code = hash.key?('CountryCode') ? hash['CountryCode'] : SKIP fuel_network_id = hash.key?('FuelNetworkId') ? hash['FuelNetworkId'] : SKIP network_name = hash.key?('NetworkName') ? hash['NetworkName'] : SKIP site_group_id = hash.key?('SiteGroupId') ? hash['SiteGroupId'] : SKIP site_group_name = hash.key?('SiteGroupName') ? hash['SiteGroupName'] : SKIP site_code = hash.key?('SiteCode') ? hash['SiteCode'] : SKIP site_id = hash.key?('SiteId') ? hash['SiteId'] : SKIP site_name = hash.key?('SiteName') ? hash['SiteName'] : SKIP # Create object from extracted values. FeeRuleLocation.new(delco_id, country, country_code, fuel_network_id, network_name, site_group_id, site_group_name, site_code, site_id, site_name) end |
.names ⇒ Object
A mapping from model property names to API property names.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 53 def self.names @_hash = {} if @_hash.nil? @_hash['delco_id'] = 'DelcoId' @_hash['country'] = 'Country' @_hash['country_code'] = 'CountryCode' @_hash['fuel_network_id'] = 'FuelNetworkId' @_hash['network_name'] = 'NetworkName' @_hash['site_group_id'] = 'SiteGroupId' @_hash['site_group_name'] = 'SiteGroupName' @_hash['site_code'] = 'SiteCode' @_hash['site_id'] = 'SiteId' @_hash['site_name'] = 'SiteName' @_hash end |
.nullables ⇒ Object
An array for nullable fields
85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 85 def self.nullables %w[ delco_id country country_code fuel_network_id network_name site_group_id site_group_name site_code site_id site_name ] end |
.optionals ⇒ Object
An array for optional fields
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/shell_data_reporting_ap_is/models/fee_rule_location.rb', line 69 def self.optionals %w[ delco_id country country_code fuel_network_id network_name site_group_id site_group_name site_code site_id site_name ] end |