Class: ShellDataReportingApIs::CardExceptions
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::CardExceptions
- Defined in:
- lib/shell_data_reporting_ap_is/models/card_exceptions.rb
Overview
CardExceptions Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id.
-
#account_number ⇒ String
Account Number.
-
#account_short_name ⇒ String
Account Short Name.
-
#card_id ⇒ Integer
Unique Card Id.
-
#currency_code ⇒ String
ISO currency code.
-
#currency_symbol ⇒ String
Currency symbol of the Invoice Currency Code.
-
#day ⇒ Integer
Summary Day: Populated when the Period is passed as ‘Day’.
-
#driver_name ⇒ String
Driver name.
-
#month ⇒ Integer
Summary Month: Populated when the Value of Period is Passed as ‘Month’.
-
#pan ⇒ String
Card PAN.
-
#payer_id ⇒ Integer
Payment customer id of the customer.
-
#payer_number ⇒ String
Payment customer number.
-
#payer_short_name ⇒ String
Payer Short Name.
-
#total_amount ⇒ Float
Total Amount (In Customer Currency) of Transactions met with the given exceptions criteria.
-
#total_quantity ⇒ Integer
Total Quantity of Transactions met with the given exceptions criteria.
-
#total_sales_items ⇒ Integer
Total number of Sales Items met with the given exception criteria.
-
#total_transactions ⇒ Integer
Total number of Transactions met with the given exception criteria.
-
#vrn ⇒ String
Vehicle Registration Number.
-
#week ⇒ Integer
Summary Week Number with in the given date range.
-
#year ⇒ Integer
Summary Year: Populated when the Value of Period is Passed as ‘Month’.
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
Methods inherited from BaseModel
Constructor Details
#initialize(account_id = SKIP, account_number = SKIP, account_short_name = SKIP, card_id = SKIP, currency_code = SKIP, currency_symbol = SKIP, day = SKIP, driver_name = SKIP, month = SKIP, pan = SKIP, payer_id = SKIP, payer_number = SKIP, payer_short_name = SKIP, total_amount = SKIP, total_quantity = SKIP, total_sales_items = SKIP, total_transactions = SKIP, vrn = SKIP, week = SKIP, year = SKIP) ⇒ CardExceptions
Returns a new instance of CardExceptions.
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 172 def initialize(account_id = SKIP, account_number = SKIP, account_short_name = SKIP, card_id = SKIP, currency_code = SKIP, currency_symbol = SKIP, day = SKIP, driver_name = SKIP, month = SKIP, pan = SKIP, payer_id = SKIP, payer_number = SKIP, payer_short_name = SKIP, total_amount = SKIP, total_quantity = SKIP, total_sales_items = SKIP, total_transactions = SKIP, vrn = SKIP, week = SKIP, year = SKIP) @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @account_short_name = account_short_name unless account_short_name == SKIP @card_id = card_id unless card_id == SKIP @currency_code = currency_code unless currency_code == SKIP @currency_symbol = currency_symbol unless currency_symbol == SKIP @day = day unless day == SKIP @driver_name = driver_name unless driver_name == SKIP @month = month unless month == SKIP @pan = pan unless pan == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @payer_short_name = payer_short_name unless payer_short_name == SKIP @total_amount = total_amount unless total_amount == SKIP @total_quantity = total_quantity unless total_quantity == SKIP @total_sales_items = total_sales_items unless total_sales_items == SKIP @total_transactions = total_transactions unless total_transactions == SKIP @vrn = vrn unless vrn == SKIP @week = week unless week == SKIP @year = year unless year == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 14 def account_id @account_id end |
#account_number ⇒ String
Account Number
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 18 def account_number @account_number end |
#account_short_name ⇒ String
Account Short Name
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 22 def account_short_name @account_short_name end |
#card_id ⇒ Integer
Unique Card Id
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 26 def card_id @card_id end |
#currency_code ⇒ String
ISO currency code
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 30 def currency_code @currency_code end |
#currency_symbol ⇒ String
Currency symbol of the Invoice Currency Code
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 34 def currency_symbol @currency_symbol end |
#day ⇒ Integer
Summary Day: Populated when the Period is passed as ‘Day’.
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 38 def day @day end |
#driver_name ⇒ String
Driver name
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 42 def driver_name @driver_name end |
#month ⇒ Integer
Summary Month: Populated when the Value of Period is Passed as ‘Month’.
46 47 48 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 46 def month @month end |
#pan ⇒ String
Card PAN
50 51 52 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 50 def pan @pan end |
#payer_id ⇒ Integer
Payment customer id of the customer
54 55 56 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 54 def payer_id @payer_id end |
#payer_number ⇒ String
Payment customer number
58 59 60 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 58 def payer_number @payer_number end |
#payer_short_name ⇒ String
Payer Short Name
62 63 64 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 62 def payer_short_name @payer_short_name end |
#total_amount ⇒ Float
Total Amount (In Customer Currency) of Transactions met with the given exceptions criteria.
67 68 69 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 67 def total_amount @total_amount end |
#total_quantity ⇒ Integer
Total Quantity of Transactions met with the given exceptions criteria.
71 72 73 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 71 def total_quantity @total_quantity end |
#total_sales_items ⇒ Integer
Total number of Sales Items met with the given exception criteria.
75 76 77 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 75 def total_sales_items @total_sales_items end |
#total_transactions ⇒ Integer
Total number of Transactions met with the given exception criteria.
79 80 81 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 79 def total_transactions @total_transactions end |
#vrn ⇒ String
Vehicle Registration Number
83 84 85 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 83 def vrn @vrn end |
#week ⇒ Integer
Summary Week Number with in the given date range. Populated when the Value of Period is Passed as ‘Week’.
88 89 90 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 88 def week @week end |
#year ⇒ Integer
Summary Year: Populated when the Value of Period is Passed as ‘Month’.
92 93 94 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 92 def year @year end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 204 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP account_short_name = hash.key?('AccountShortName') ? hash['AccountShortName'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP currency_code = hash.key?('CurrencyCode') ? hash['CurrencyCode'] : SKIP currency_symbol = hash.key?('CurrencySymbol') ? hash['CurrencySymbol'] : SKIP day = hash.key?('Day') ? hash['Day'] : SKIP driver_name = hash.key?('DriverName') ? hash['DriverName'] : SKIP month = hash.key?('Month') ? hash['Month'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP payer_short_name = hash.key?('PayerShortName') ? hash['PayerShortName'] : SKIP total_amount = hash.key?('TotalAmount') ? hash['TotalAmount'] : SKIP total_quantity = hash.key?('TotalQuantity') ? hash['TotalQuantity'] : SKIP total_sales_items = hash.key?('TotalSalesItems') ? hash['TotalSalesItems'] : SKIP total_transactions = hash.key?('TotalTransactions') ? hash['TotalTransactions'] : SKIP vrn = hash.key?('VRN') ? hash['VRN'] : SKIP week = hash.key?('Week') ? hash['Week'] : SKIP year = hash.key?('Year') ? hash['Year'] : SKIP # Create object from extracted values. CardExceptions.new(account_id, account_number, account_short_name, card_id, currency_code, currency_symbol, day, driver_name, month, pan, payer_id, payer_number, payer_short_name, total_amount, total_quantity, total_sales_items, total_transactions, vrn, week, year) end |
.names ⇒ Object
A mapping from model property names to API property names.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 95 def self.names @_hash = {} if @_hash.nil? @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['account_short_name'] = 'AccountShortName' @_hash['card_id'] = 'CardId' @_hash['currency_code'] = 'CurrencyCode' @_hash['currency_symbol'] = 'CurrencySymbol' @_hash['day'] = 'Day' @_hash['driver_name'] = 'DriverName' @_hash['month'] = 'Month' @_hash['pan'] = 'PAN' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['payer_short_name'] = 'PayerShortName' @_hash['total_amount'] = 'TotalAmount' @_hash['total_quantity'] = 'TotalQuantity' @_hash['total_sales_items'] = 'TotalSalesItems' @_hash['total_transactions'] = 'TotalTransactions' @_hash['vrn'] = 'VRN' @_hash['week'] = 'Week' @_hash['year'] = 'Year' @_hash end |
.nullables ⇒ Object
An array for nullable fields
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 147 def self.nullables %w[ account_id account_number account_short_name card_id currency_code currency_symbol day driver_name month pan payer_id payer_number payer_short_name total_amount total_quantity total_sales_items total_transactions vrn week year ] end |
.optionals ⇒ Object
An array for optional fields
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/shell_data_reporting_ap_is/models/card_exceptions.rb', line 121 def self.optionals %w[ account_id account_number account_short_name card_id currency_code currency_symbol day driver_name month pan payer_id payer_number payer_short_name total_amount total_quantity total_sales_items total_transactions vrn week year ] end |