Class: BasecommSdk::BankCardTransaction

Inherits:
Base
  • Object
show all
Defined in:
lib/basecomm_sdk/bank_card_transaction.rb

Constant Summary collapse

TYPE =
{
  xs_bct_type_auth:     'AUTH',
  xs_bct_type_sale:     'SALE',
  xs_bct_type_void:     'VOID',
  xs_bct_type_capture:  'CAPTURE',
  xs_bct_type_refund:   'REFUND',
  xs_bct_type_credit:   'CREDIT'
}
STATUS =
{
  xs_bct_status_created: 'CREATED',
  xs_bct_status_authorized: 'AUTHORIZED',
  xs_bct_status_captured: 'CAPTURED',
  xs_bct_status_settled: 'SETTLED',
  xs_bct_status_voided: 'VOIDED',
  xs_bct_status_declined: 'DECLINED',
  xs_bct_status_failed: 'FAILED',
  xs_bct_status_3dsecure: '3DSECURE',
  xs_bct_status_verified: 'VERIFIED'
}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

attr_accessor, attributes, #attributes, #format, json_prefix, #messages, #qualified_attributes, #qualified_key, #status_description, #status_name, #to_json

Constructor Details

#initialize(options = {}) ⇒ BankCardTransaction

Returns a new instance of BankCardTransaction.



43
44
45
46
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 43

def initialize(options = {})
  super
  @billing_address = Address.new
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def amount
  @amount
end

#authorization_codeObject

Returns the value of attribute authorization_code.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def authorization_code
  @authorization_code
end

#avs_response_codeObject

Returns the value of attribute avs_response_code.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def avs_response_code
  @avs_response_code
end

#billing_addressObject

Returns the value of attribute billing_address.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def billing_address
  @billing_address
end

#card_cvv2Object

Returns the value of attribute card_cvv2.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def card_cvv2
  @card_cvv2
end

#card_nameObject

Returns the value of attribute card_name.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def card_name
  @card_name
end

#card_numberObject

Returns the value of attribute card_number.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def card_number
  @card_number
end

#card_track1_dataObject

Returns the value of attribute card_track1_data.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def card_track1_data
  @card_track1_data
end

#card_track2_dataObject

Returns the value of attribute card_track2_data.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def card_track2_data
  @card_track2_data
end

#check_secure_codeObject

Returns the value of attribute check_secure_code.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def check_secure_code
  @check_secure_code
end

#creation_dateObject

Returns the value of attribute creation_date.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def creation_date
  @creation_date
end

#custom_field1Object

Returns the value of attribute custom_field1.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field1
  @custom_field1
end

#custom_field10Object

Returns the value of attribute custom_field10.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field10
  @custom_field10
end

#custom_field2Object

Returns the value of attribute custom_field2.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field2
  @custom_field2
end

#custom_field3Object

Returns the value of attribute custom_field3.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field3
  @custom_field3
end

#custom_field4Object

Returns the value of attribute custom_field4.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field4
  @custom_field4
end

#custom_field5Object

Returns the value of attribute custom_field5.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field5
  @custom_field5
end

#custom_field6Object

Returns the value of attribute custom_field6.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field6
  @custom_field6
end

#custom_field7Object

Returns the value of attribute custom_field7.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field7
  @custom_field7
end

#custom_field8Object

Returns the value of attribute custom_field8.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field8
  @custom_field8
end

#custom_field9Object

Returns the value of attribute custom_field9.



34
35
36
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 34

def custom_field9
  @custom_field9
end

#cvv_response_codeObject

Returns the value of attribute cvv_response_code.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def cvv_response_code
  @cvv_response_code
end

#encrypted_track_dataObject

Returns the value of attribute encrypted_track_data.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def encrypted_track_data
  @encrypted_track_data
end

#expiration_monthObject

Returns the value of attribute expiration_month.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def expiration_month
  @expiration_month
end

#expiration_yearObject

Returns the value of attribute expiration_year.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def expiration_year
  @expiration_year
end

#idObject

Returns the value of attribute id.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def id
  @id
end

#ip_addressObject

Returns the value of attribute ip_address.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def ip_address
  @ip_address
end

#merchant_transaction_idObject

Returns the value of attribute merchant_transaction_id.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def merchant_transaction_id
  @merchant_transaction_id
end

#po_numberObject

Returns the value of attribute po_number.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def po_number
  @po_number
end

#recurring_indicatorObject

Returns the value of attribute recurring_indicator.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def recurring_indicator
  @recurring_indicator
end

#response_codeObject

Returns the value of attribute response_code.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def response_code
  @response_code
end

#response_messageObject

Returns the value of attribute response_message.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def response_message
  @response_message
end

#settlement_batch_idObject

Returns the value of attribute settlement_batch_id.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def settlement_batch_id
  @settlement_batch_id
end

#settlement_dateObject

Returns the value of attribute settlement_date.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def settlement_date
  @settlement_date
end

#statusObject

Returns the value of attribute status.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def status
  @status
end

#tax_amountObject

Returns the value of attribute tax_amount.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def tax_amount
  @tax_amount
end

#tip_amountObject

Returns the value of attribute tip_amount.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def tip_amount
  @tip_amount
end

#tokenObject

Returns the value of attribute token.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def token
  @token
end

#typeObject

Returns the value of attribute type.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def type
  @type
end

#verify_complete_urlObject

Returns the value of attribute verify_complete_url.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def verify_complete_url
  @verify_complete_url
end

#verify_urlObject

Returns the value of attribute verify_url.



24
25
26
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 24

def verify_url
  @verify_url
end

Class Method Details

.build_from_json(json) ⇒ Object



38
39
40
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 38

def self.build_from_json(json)
  BankCardTransaction.new(JSON.parse(json).recursively_symbolize_keys!)
end

Instance Method Details

#json_prefixObject



48
49
50
# File 'lib/basecomm_sdk/bank_card_transaction.rb', line 48

def json_prefix
  :bank_card_transaction
end