Method: ProcessOut::TransactionOperation#to_json

Defined in:
lib/processout/transaction_operation.rb

#to_json(options) ⇒ Object

Overrides the JSON marshaller to only send the fields we want



282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/processout/transaction_operation.rb', line 282

def to_json(options)
  {
      "id": self.id,
      "transaction": self.transaction,
      "transaction_id": self.transaction_id,
      "token": self.token,
      "token_id": self.token_id,
      "card": self.card,
      "card_id": self.card_id,
      "gateway_configuration": self.gateway_configuration,
      "gateway_configuration_id": self.gateway_configuration_id,
      "amount": self.amount,
      "currency": self.currency,
      "is_attempt": self.is_attempt,
      "has_failed": self.has_failed,
      "is_accountable": self.is_accountable,
      "type": self.type,
      "gateway_operation_id": self.gateway_operation_id,
      "arn": self.arn,
      "error_code": self.error_code,
      "gateway_data": self.gateway_data,
      "payment_data_three_d_s_request": self.payment_data_three_d_s_request,
      "payment_data_three_d_s_authentication": self.payment_data_three_d_s_authentication,
      "payment_data_network_authentication": self.payment_data_network_authentication,
      "initial_scheme_transaction_id": self.initial_scheme_transaction_id,
      "scheme_id": self.scheme_id,
      "payment_type": self.payment_type,
      "metadata": self.,
      "gateway_fee": self.gateway_fee,
      "created_at": self.created_at,
  }.to_json
end