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
194
195
|
# File 'lib/t2_airtime/serializer.rb', line 156
def self.serialize_one(t)
{
id: Integer(t[:transactionid]),
msisdn: t[:msisdn],
destination_msisdn: t[:destination_msisdn],
transaction_authentication_key: t[:transaction_authentication_key],
transaction_error_code: Integer(t[:transaction_error_code]),
transaction_error_txt: t[:transaction_error_txt],
country: t[:country],
country_aid: Integer(t[:countryid]),
alpha3: T2Airtime::Country.alpha3(t[:country]),
operator: t[:operator],
operator_aid: Integer(t[:operatorid]),
operator_logo_url: T2Airtime::Util.operator_logo_url(t[:operatorid]),
reference_operator: t[:reference_operator],
product_requested: t[:product_requested],
product_requested_display: T2Airtime::Util.format_price(t[:product_requested], t[:destination_currency]),
actual_product_sent: t[:actual_product_sent],
actual_product_sent_display: T2Airtime::Util.format_price(t[:actual_product_sent], t[:destination_currency]),
wholesale_price: t[:wholesale_price],
wholesale_price_display: T2Airtime::Util.format_price(t[:wholesale_price], t[:originating_currency]),
retail_price: t[:retail_price],
retail_price_display: T2Airtime::Util.format_price(t[:retail_price], t[:originating_currency]),
sms: t[:sms],
cid1: t[:cid1],
cid2: t[:cid2],
cid3: t[:cid3],
date: t[:date],
originating_currency: t[:originating_currency],
destination_currency: t[:destination_currency],
pin_based: t[:pin_based],
local_info_amount: t[:local_info_amount],
local_info_amount_display: T2Airtime::Util.format_price(t[:local_info_amount], t[:local_info_currency]),
local_info_currency: t[:local_info_currency],
local_info_value: t[:local_info_value],
local_info_value_display: T2Airtime::Util.format_price(t[:local_info_value], t[:local_info_currency]),
error_code: t[:error_code],
error_txt: t[:error_txt]
}
end
|