Class: ShellDataReportingApIs::RecentTransactionReq
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellDataReportingApIs::RecentTransactionReq
- Defined in:
- lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb
Overview
RecentTransactionReq Model.
Instance Attribute Summary collapse
-
#account_number ⇒ String
Customer account number.
-
#card_issuer_name ⇒ String
Card issuer name.
-
#card_pan ⇒ String
Card identifier number masked.
-
#col_co_code ⇒ Integer
Three character Collecting Company Code (Shell Code) of the selected payer.
-
#column_list ⇒ String
Column list to be part of response, it can be ‘All’ to return all possible column.
-
#from_date_time ⇒ String
Start date and time of transactions.
-
#fuel_only ⇒ String
When passed as ‘true’ Only returned records with Fuel transactions.(All Fuels).When passed as ‘false’ the above condition will not be checked.
-
#include_declines ⇒ TrueClass | FalseClass
Flag to enable to get declined records.
-
#payer_number ⇒ String
Unique Identifier for the customer at payment point.
-
#product_code ⇒ String
Global product code.
-
#product_group_name ⇒ String
Product group name.
-
#purchased_in_country ⇒ String
Delco country.
-
#to_date_time ⇒ String
End date and time of transactions.
-
#transaction_status ⇒ String
Status of transaction.
-
#vehicle_registration_number ⇒ String
Vehicle registration number embossed on the card.
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(col_co_code = nil, payer_number = nil, account_number = SKIP, product_code = SKIP, purchased_in_country = SKIP, card_pan = SKIP, from_date_time = SKIP, to_date_time = SKIP, transaction_status = SKIP, fuel_only = SKIP, product_group_name = SKIP, vehicle_registration_number = SKIP, include_declines = SKIP, card_issuer_name = SKIP, column_list = SKIP) ⇒ RecentTransactionReq
constructor
A new instance of RecentTransactionReq.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_code = nil, payer_number = nil, account_number = SKIP, product_code = SKIP, purchased_in_country = SKIP, card_pan = SKIP, from_date_time = SKIP, to_date_time = SKIP, transaction_status = SKIP, fuel_only = SKIP, product_group_name = SKIP, vehicle_registration_number = SKIP, include_declines = SKIP, card_issuer_name = SKIP, column_list = SKIP) ⇒ RecentTransactionReq
Returns a new instance of RecentTransactionReq.
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 137 def initialize(col_co_code = nil, payer_number = nil, account_number = SKIP, product_code = SKIP, purchased_in_country = SKIP, card_pan = SKIP, from_date_time = SKIP, to_date_time = SKIP, transaction_status = SKIP, fuel_only = SKIP, product_group_name = SKIP, vehicle_registration_number = SKIP, include_declines = SKIP, card_issuer_name = SKIP, column_list = SKIP) @col_co_code = col_co_code @payer_number = payer_number @account_number = account_number unless account_number == SKIP @product_code = product_code unless product_code == SKIP @purchased_in_country = purchased_in_country unless purchased_in_country == SKIP @card_pan = card_pan unless card_pan == SKIP @from_date_time = from_date_time unless from_date_time == SKIP @to_date_time = to_date_time unless to_date_time == SKIP @transaction_status = transaction_status unless transaction_status == SKIP @fuel_only = fuel_only unless fuel_only == SKIP @product_group_name = product_group_name unless product_group_name == SKIP unless vehicle_registration_number == SKIP @vehicle_registration_number = vehicle_registration_number end @include_declines = include_declines unless include_declines == SKIP @card_issuer_name = card_issuer_name unless card_issuer_name == SKIP @column_list = column_list unless column_list == SKIP end |
Instance Attribute Details
#account_number ⇒ String
Customer account number.
22 23 24 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 22 def account_number @account_number end |
#card_issuer_name ⇒ String
Card issuer name
68 69 70 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 68 def card_issuer_name @card_issuer_name end |
#card_pan ⇒ String
Card identifier number masked
34 35 36 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 34 def card_pan @card_pan end |
#col_co_code ⇒ Integer
Three character Collecting Company Code (Shell Code) of the selected payer
14 15 16 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 14 def col_co_code @col_co_code end |
#column_list ⇒ String
Column list to be part of response, it can be ‘All’ to return all possible column. E.g. ‘All’ To get specific columns pass multiple columns name separated by comma along with ‘PayerNumber’. E.g. “PayerNumber,ProductCode”
75 76 77 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 75 def column_list @column_list end |
#from_date_time ⇒ String
Start date and time of transactions
38 39 40 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 38 def from_date_time @from_date_time end |
#fuel_only ⇒ String
When passed as ‘true’ Only returned records with Fuel transactions.(All Fuels).When passed as ‘false’ the above condition will not be checked. (Both All Fuels and Non-Fuel)
52 53 54 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 52 def fuel_only @fuel_only end |
#include_declines ⇒ TrueClass | FalseClass
Flag to enable to get declined records
64 65 66 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 64 def include_declines @include_declines end |
#payer_number ⇒ String
Unique Identifier for the customer at payment point.
18 19 20 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 18 def payer_number @payer_number end |
#product_code ⇒ String
Global product code
26 27 28 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 26 def product_code @product_code end |
#product_group_name ⇒ String
Product group name
56 57 58 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 56 def product_group_name @product_group_name end |
#purchased_in_country ⇒ String
Delco country
30 31 32 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 30 def purchased_in_country @purchased_in_country end |
#to_date_time ⇒ String
End date and time of transactions. Mandatory if FromDateTime is provided.
42 43 44 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 42 def to_date_time @to_date_time end |
#transaction_status ⇒ String
Status of transaction. DO NOT pass the value if includeDeclines is passed
46 47 48 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 46 def transaction_status @transaction_status end |
#vehicle_registration_number ⇒ String
Vehicle registration number embossed on the card
60 61 62 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 60 def vehicle_registration_number @vehicle_registration_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 165 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : nil payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : nil account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP product_code = hash.key?('ProductCode') ? hash['ProductCode'] : SKIP purchased_in_country = hash.key?('PurchasedInCountry') ? hash['PurchasedInCountry'] : SKIP card_pan = hash.key?('CardPAN') ? hash['CardPAN'] : SKIP from_date_time = hash.key?('FromDateTime') ? hash['FromDateTime'] : SKIP to_date_time = hash.key?('ToDateTime') ? hash['ToDateTime'] : SKIP transaction_status = hash.key?('TransactionStatus') ? hash['TransactionStatus'] : SKIP fuel_only = hash.key?('FuelOnly') ? hash['FuelOnly'] : SKIP product_group_name = hash.key?('ProductGroupName') ? hash['ProductGroupName'] : SKIP vehicle_registration_number = hash.key?('VehicleRegistrationNumber') ? hash['VehicleRegistrationNumber'] : SKIP include_declines = hash.key?('IncludeDeclines') ? hash['IncludeDeclines'] : SKIP card_issuer_name = hash.key?('CardIssuerName') ? hash['CardIssuerName'] : SKIP column_list = hash.key?('ColumnList') ? hash['ColumnList'] : SKIP # Create object from extracted values. RecentTransactionReq.new(col_co_code, payer_number, account_number, product_code, purchased_in_country, card_pan, from_date_time, to_date_time, transaction_status, fuel_only, product_group_name, vehicle_registration_number, include_declines, card_issuer_name, column_list) end |
.names ⇒ Object
A mapping from model property names to API property names.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 78 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_number'] = 'PayerNumber' @_hash['account_number'] = 'AccountNumber' @_hash['product_code'] = 'ProductCode' @_hash['purchased_in_country'] = 'PurchasedInCountry' @_hash['card_pan'] = 'CardPAN' @_hash['from_date_time'] = 'FromDateTime' @_hash['to_date_time'] = 'ToDateTime' @_hash['transaction_status'] = 'TransactionStatus' @_hash['fuel_only'] = 'FuelOnly' @_hash['product_group_name'] = 'ProductGroupName' @_hash['vehicle_registration_number'] = 'VehicleRegistrationNumber' @_hash['include_declines'] = 'IncludeDeclines' @_hash['card_issuer_name'] = 'CardIssuerName' @_hash['column_list'] = 'ColumnList' @_hash end |
.nullables ⇒ Object
An array for nullable fields
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 118 def self.nullables %w[ col_co_code payer_number account_number product_code purchased_in_country card_pan from_date_time to_date_time transaction_status fuel_only product_group_name vehicle_registration_number include_declines card_issuer_name ] end |
.optionals ⇒ Object
An array for optional fields
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/shell_data_reporting_ap_is/models/recent_transaction_req.rb', line 99 def self.optionals %w[ account_number product_code purchased_in_country card_pan from_date_time to_date_time transaction_status fuel_only product_group_name vehicle_registration_number include_declines card_issuer_name column_list ] end |