Class: Cardflex::Transaction

Inherits:
Object
  • Object
show all
Includes:
BaseModule
Defined in:
lib/cardflex/transaction.rb

Defined Under Namespace

Modules: Type

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from BaseModule

included, #method_missing

Methods included from BaseModule::ClassMethods

#create_helper_methods, #set_instance_variables_from_hash, #snakecase

Constructor Details

#initialize(gateway, attributes) ⇒ Transaction

Returns a new instance of Transaction.



39
40
41
42
43
# File 'lib/cardflex/transaction.rb', line 39

def initialize(gateway, attributes)
  @gateway = gateway
  @type = attributes[:action_type]
  set_instance_variables_from_hash(attributes)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Cardflex::BaseModule

Instance Attribute Details

#action_typeObject (readonly)

Returns the value of attribute action_type.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def action_type
  @action_type
end

#alternate_tax_amountObject (readonly)

Returns the value of attribute alternate_tax_amount.



28
29
30
# File 'lib/cardflex/transaction.rb', line 28

def alternate_tax_amount
  @alternate_tax_amount
end

#alternate_tax_idObject (readonly)

Returns the value of attribute alternate_tax_id.



28
29
30
# File 'lib/cardflex/transaction.rb', line 28

def alternate_tax_id
  @alternate_tax_id
end

#amountObject (readonly)

Returns the value of attribute amount.



13
14
15
# File 'lib/cardflex/transaction.rb', line 13

def amount
  @amount
end

#authorization_codeObject (readonly)

Returns the value of attribute authorization_code.



11
12
13
# File 'lib/cardflex/transaction.rb', line 11

def authorization_code
  @authorization_code
end

#avs_rejectObject (readonly)

Returns the value of attribute avs_reject.



12
13
14
# File 'lib/cardflex/transaction.rb', line 12

def avs_reject
  @avs_reject
end

#avs_resultObject (readonly)

Returns the value of attribute avs_result.



12
13
14
# File 'lib/cardflex/transaction.rb', line 12

def avs_result
  @avs_result
end

#billingObject (readonly)

Returns the value of attribute billing.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def billing
  @billing
end

#billing_methodObject (readonly)

Returns the value of attribute billing_method.



16
17
18
# File 'lib/cardflex/transaction.rb', line 16

def billing_method
  @billing_method
end

#cardholder_authObject (readonly)

Returns the value of attribute cardholder_auth.



33
34
35
# File 'lib/cardflex/transaction.rb', line 33

def cardholder_auth
  @cardholder_auth
end

#cavvObject (readonly)

Returns the value of attribute cavv.



35
36
37
# File 'lib/cardflex/transaction.rb', line 35

def cavv
  @cavv
end

#currencyObject (readonly)

Returns the value of attribute currency.



13
14
15
# File 'lib/cardflex/transaction.rb', line 13

def currency
  @currency
end

#customer_idObject (readonly)

Returns the value of attribute customer_id.



23
24
25
# File 'lib/cardflex/transaction.rb', line 23

def customer_id
  @customer_id
end

#customer_receiptObject (readonly)

Returns the value of attribute customer_receipt.



25
26
27
# File 'lib/cardflex/transaction.rb', line 25

def customer_receipt
  @customer_receipt
end

#customer_vat_registrationObject (readonly)

Returns the value of attribute customer_vat_registration.



29
30
31
# File 'lib/cardflex/transaction.rb', line 29

def customer_vat_registration
  @customer_vat_registration
end

#customer_vault_idObject (readonly)

Returns the value of attribute customer_vault_id.



23
24
25
# File 'lib/cardflex/transaction.rb', line 23

def customer_vault_id
  @customer_vault_id
end

#cvv_rejectObject (readonly)

Returns the value of attribute cvv_reject.



12
13
14
# File 'lib/cardflex/transaction.rb', line 12

def cvv_reject
  @cvv_reject
end

#cvv_resultObject (readonly)

Returns the value of attribute cvv_result.



12
13
14
# File 'lib/cardflex/transaction.rb', line 12

def cvv_result
  @cvv_result
end

#descriptorObject (readonly)

Returns the value of attribute descriptor.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor
  @descriptor
end

#descriptor_addressObject (readonly)

Returns the value of attribute descriptor_address.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_address
  @descriptor_address
end

#descriptor_cityObject (readonly)

Returns the value of attribute descriptor_city.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_city
  @descriptor_city
end

#descriptor_countryObject (readonly)

Returns the value of attribute descriptor_country.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_country
  @descriptor_country
end

#descriptor_mccObject (readonly)

Returns the value of attribute descriptor_mcc.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_mcc
  @descriptor_mcc
end

#descriptor_merchant_idObject (readonly)

Returns the value of attribute descriptor_merchant_id.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_merchant_id
  @descriptor_merchant_id
end

#descriptor_phoneObject (readonly)

Returns the value of attribute descriptor_phone.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_phone
  @descriptor_phone
end

#descriptor_postalObject (readonly)

Returns the value of attribute descriptor_postal.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_postal
  @descriptor_postal
end

#descriptor_stateObject (readonly)

Returns the value of attribute descriptor_state.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_state
  @descriptor_state
end

#descriptor_urlObject (readonly)

Returns the value of attribute descriptor_url.



19
20
21
# File 'lib/cardflex/transaction.rb', line 19

def descriptor_url
  @descriptor_url
end

#discount_amountObject (readonly)

Returns the value of attribute discount_amount.



32
33
34
# File 'lib/cardflex/transaction.rb', line 32

def discount_amount
  @discount_amount
end

#dup_secondsObject (readonly)

Returns the value of attribute dup_seconds.



36
37
38
# File 'lib/cardflex/transaction.rb', line 36

def dup_seconds
  @dup_seconds
end

#duty_amountObject (readonly)

Returns the value of attribute duty_amount.



28
29
30
# File 'lib/cardflex/transaction.rb', line 28

def duty_amount
  @duty_amount
end

#eciObject (readonly)

Returns the value of attribute eci.



34
35
36
# File 'lib/cardflex/transaction.rb', line 34

def eci
  @eci
end

#industryObject (readonly)

Returns the value of attribute industry.



15
16
17
# File 'lib/cardflex/transaction.rb', line 15

def industry
  @industry
end

#ip_addressObject (readonly)

Returns the value of attribute ip_address.



14
15
16
# File 'lib/cardflex/transaction.rb', line 14

def ip_address
  @ip_address
end

#merchant_receipt_emailObject (readonly)

Returns the value of attribute merchant_receipt_email.



24
25
26
# File 'lib/cardflex/transaction.rb', line 24

def merchant_receipt_email
  @merchant_receipt_email
end

#merchant_vat_registrationObject (readonly)

Returns the value of attribute merchant_vat_registration.



29
30
31
# File 'lib/cardflex/transaction.rb', line 29

def merchant_vat_registration
  @merchant_vat_registration
end

#national_tax_amountObject (readonly)

Returns the value of attribute national_tax_amount.



28
29
30
# File 'lib/cardflex/transaction.rb', line 28

def national_tax_amount
  @national_tax_amount
end

#order_dateObject (readonly)

Returns the value of attribute order_date.



21
22
23
# File 'lib/cardflex/transaction.rb', line 21

def order_date
  @order_date
end

#order_descriptionObject (readonly)

Returns the value of attribute order_description.



21
22
23
# File 'lib/cardflex/transaction.rb', line 21

def order_description
  @order_description
end

#order_idObject (readonly)

Returns the value of attribute order_id.



27
28
29
# File 'lib/cardflex/transaction.rb', line 27

def order_id
  @order_id
end

#planObject (readonly)

Returns the value of attribute plan.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def plan
  @plan
end

#po_numberObject (readonly)

Returns the value of attribute po_number.



27
28
29
# File 'lib/cardflex/transaction.rb', line 27

def po_number
  @po_number
end

#processor_idObject (readonly)

Returns the value of attribute processor_id.



17
18
19
# File 'lib/cardflex/transaction.rb', line 17

def processor_id
  @processor_id
end

#productObject (readonly)

Returns the value of attribute product.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def product
  @product
end

#resultObject (readonly)

Returns the value of attribute result.



11
12
13
# File 'lib/cardflex/transaction.rb', line 11

def result
  @result
end

#result_codeObject (readonly)

Returns the value of attribute result_code.



11
12
13
# File 'lib/cardflex/transaction.rb', line 11

def result_code
  @result_code
end

#result_textObject (readonly)

Returns the value of attribute result_text.



11
12
13
# File 'lib/cardflex/transaction.rb', line 11

def result_text
  @result_text
end

#sec_codeObject (readonly)

Returns the value of attribute sec_code.



18
19
20
# File 'lib/cardflex/transaction.rb', line 18

def sec_code
  @sec_code
end

#ship_from_postalObject (readonly)

Returns the value of attribute ship_from_postal.



26
27
28
# File 'lib/cardflex/transaction.rb', line 26

def ship_from_postal
  @ship_from_postal
end

#shippingObject (readonly)

Returns the value of attribute shipping.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def shipping
  @shipping
end

#shipping_amountObject (readonly)

Returns the value of attribute shipping_amount.



26
27
28
# File 'lib/cardflex/transaction.rb', line 26

def shipping_amount
  @shipping_amount
end

#shipping_carrierObject (readonly)

Returns the value of attribute shipping_carrier.



26
27
28
# File 'lib/cardflex/transaction.rb', line 26

def shipping_carrier
  @shipping_carrier
end

#subscription_idObject (readonly)

Returns the value of attribute subscription_id.



22
23
24
# File 'lib/cardflex/transaction.rb', line 22

def subscription_id
  @subscription_id
end

#summary_commodity_codeObject (readonly)

Returns the value of attribute summary_commodity_code.



31
32
33
# File 'lib/cardflex/transaction.rb', line 31

def summary_commodity_code
  @summary_commodity_code
end

#tax_amountObject (readonly)

Returns the value of attribute tax_amount.



28
29
30
# File 'lib/cardflex/transaction.rb', line 28

def tax_amount
  @tax_amount
end

#tracking_numberObject (readonly)

Returns the value of attribute tracking_number.



26
27
28
# File 'lib/cardflex/transaction.rb', line 26

def tracking_number
  @tracking_number
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def transaction_id
  @transaction_id
end

#typeObject (readonly)

Returns the value of attribute type.



37
38
39
# File 'lib/cardflex/transaction.rb', line 37

def type
  @type
end

#vat_invoice_reference_numberObject (readonly)

Returns the value of attribute vat_invoice_reference_number.



29
30
31
# File 'lib/cardflex/transaction.rb', line 29

def vat_invoice_reference_number
  @vat_invoice_reference_number
end

#vat_tax_amountObject (readonly)

Returns the value of attribute vat_tax_amount.



29
30
31
# File 'lib/cardflex/transaction.rb', line 29

def vat_tax_amount
  @vat_tax_amount
end

#vat_tax_rateObject (readonly)

Returns the value of attribute vat_tax_rate.



29
30
31
# File 'lib/cardflex/transaction.rb', line 29

def vat_tax_rate
  @vat_tax_rate
end

#xidObject (readonly)

Returns the value of attribute xid.



35
36
37
# File 'lib/cardflex/transaction.rb', line 35

def xid
  @xid
end

Class Method Details

.query(attributes) ⇒ Object

Query API



55
56
57
# File 'lib/cardflex/transaction.rb', line 55

def self.query(attributes)
  Configuration.gateway.transaction.query(attributes)
end

.request(attributes) ⇒ Object

Three Step API



46
47
48
# File 'lib/cardflex/transaction.rb', line 46

def self.request(attributes)
  Configuration.gateway.transaction.request(attributes)
end