Class: CheckoutSdk::PaymentRequestSource

Inherits:
Object
  • Object
show all
Defined in:
lib/checkout_sdk/data/payment_request_source.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def amount
  @amount
end

#billing_address_line1Object

Returns the value of attribute billing_address_line1.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_address_line1
  @billing_address_line1
end

#billing_address_line2Object

Returns the value of attribute billing_address_line2.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_address_line2
  @billing_address_line2
end

#billing_cityObject

Returns the value of attribute billing_city.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_city
  @billing_city
end

#billing_countryObject

Returns the value of attribute billing_country.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_country
  @billing_country
end

#billing_descriptorObject

Returns the value of attribute billing_descriptor.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_descriptor
  @billing_descriptor
end

#billing_descriptor_cityObject

Returns the value of attribute billing_descriptor_city.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_descriptor_city
  @billing_descriptor_city
end

#billing_descriptor_nameObject

Returns the value of attribute billing_descriptor_name.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_descriptor_name
  @billing_descriptor_name
end

#billing_stateObject

Returns the value of attribute billing_state.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_state
  @billing_state
end

#billing_zipObject

Returns the value of attribute billing_zip.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def billing_zip
  @billing_zip
end

#captureObject

Returns the value of attribute capture.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def capture
  @capture
end

#capture_onObject

Returns the value of attribute capture_on.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def capture_on
  @capture_on
end

#card_cvvObject

Returns the value of attribute card_cvv.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_cvv
  @card_cvv
end

#card_expiry_monthObject

Returns the value of attribute card_expiry_month.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_expiry_month
  @card_expiry_month
end

#card_expiry_yearObject

Returns the value of attribute card_expiry_year.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_expiry_year
  @card_expiry_year
end

#card_nameObject

Returns the value of attribute card_name.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_name
  @card_name
end

#card_numberObject

Returns the value of attribute card_number.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_number
  @card_number
end

#card_storedObject

Returns the value of attribute card_stored.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def card_stored
  @card_stored
end

#currencyObject

Returns the value of attribute currency.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def currency
  @currency
end

#customer_emailObject

Returns the value of attribute customer_email.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def customer_email
  @customer_email
end

#customer_idObject

Returns the value of attribute customer_id.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def customer_id
  @customer_id
end

#customer_nameObject

Returns the value of attribute customer_name.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def customer_name
  @customer_name
end

#cvvObject

Returns the value of attribute cvv.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def cvv
  @cvv
end

#descriptionObject

Returns the value of attribute description.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def description
  @description
end

#failure_urlObject

Returns the value of attribute failure_url.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def failure_url
  @failure_url
end

#idObject

Returns the value of attribute id.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def id
  @id
end

#merchant_initiatedObject

Returns the value of attribute merchant_initiated.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def merchant_initiated
  @merchant_initiated
end

#metadataObject

Returns the value of attribute metadata.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def 
  @metadata
end

#payment_ipObject

Returns the value of attribute payment_ip.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def payment_ip
  @payment_ip
end

#payment_typeObject

Returns the value of attribute payment_type.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def payment_type
  @payment_type
end

#phone_country_codeObject

Returns the value of attribute phone_country_code.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def phone_country_code
  @phone_country_code
end

#phone_numberObject

Returns the value of attribute phone_number.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def phone_number
  @phone_number
end

#previous_payment_idObject

Returns the value of attribute previous_payment_id.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def previous_payment_id
  @previous_payment_id
end

#processing_midObject

Returns the value of attribute processing_mid.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def processing_mid
  @processing_mid
end

#recipient_account_numberObject

Returns the value of attribute recipient_account_number.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def 
  @recipient_account_number
end

#recipient_dobObject

Returns the value of attribute recipient_dob.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def recipient_dob
  @recipient_dob
end

#recipient_last_nameObject

Returns the value of attribute recipient_last_name.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def recipient_last_name
  @recipient_last_name
end

#recipient_zipObject

Returns the value of attribute recipient_zip.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def recipient_zip
  @recipient_zip
end

#referenceObject

Returns the value of attribute reference.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def reference
  @reference
end

#risk_enabledObject

Returns the value of attribute risk_enabled.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def risk_enabled
  @risk_enabled
end

#shipping_address_line1Object

Returns the value of attribute shipping_address_line1.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_address_line1
  @shipping_address_line1
end

#shipping_address_line2Object

Returns the value of attribute shipping_address_line2.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_address_line2
  @shipping_address_line2
end

#shipping_cityObject

Returns the value of attribute shipping_city.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_city
  @shipping_city
end

#shipping_countryObject

Returns the value of attribute shipping_country.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_country
  @shipping_country
end

#shipping_phone_country_codeObject

Returns the value of attribute shipping_phone_country_code.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_phone_country_code
  @shipping_phone_country_code
end

#shipping_phone_numberObject

Returns the value of attribute shipping_phone_number.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_phone_number
  @shipping_phone_number
end

#shipping_stateObject

Returns the value of attribute shipping_state.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_state
  @shipping_state
end

#shipping_zipObject

Returns the value of attribute shipping_zip.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def shipping_zip
  @shipping_zip
end

#success_urlObject

Returns the value of attribute success_url.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def success_url
  @success_url
end

#threeds_attempt_n3dObject

Returns the value of attribute threeds_attempt_n3d.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_attempt_n3d
  @threeds_attempt_n3d
end

#threeds_cryptogramObject

Returns the value of attribute threeds_cryptogram.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_cryptogram
  @threeds_cryptogram
end

#threeds_eciObject

Returns the value of attribute threeds_eci.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_eci
  @threeds_eci
end

#threeds_enabledObject

Returns the value of attribute threeds_enabled.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_enabled
  @threeds_enabled
end

#threeds_versionObject

Returns the value of attribute threeds_version.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_version
  @threeds_version
end

#threeds_xidObject

Returns the value of attribute threeds_xid.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def threeds_xid
  @threeds_xid
end

#tokenObject

Returns the value of attribute token.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def token
  @token
end

#typeObject

Returns the value of attribute type.



2
3
4
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 2

def type
  @type
end

Instance Method Details

#dataObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/checkout_sdk/data/payment_request_source.rb', line 15

def data
  { source: source(type),
    amount: amount,
    currency: currency,
    payment_type: payment_type,
    merchant_initiated: merchant_initiated,
    reference: reference,
    description: description,
    capture: capture,
    capture_on: capture_on,
    customer: {
      id: customer_id,
      email: customer_email,
      name: customer_name
    },
    billing_descriptor: {
      name: billing_descriptor_name,
      city: billing_descriptor_city
    },
    shipping: {
      address: {
        address_line1: shipping_address_line1,
        address_line2: shipping_address_line2,
        city: shipping_city,
        state: shipping_state,
        zip: shipping_zip,
        country: shipping_country
      },
      phone: {
        country_code: shipping_phone_country_code,
        number: shipping_phone_number
      }
    },
    "3ds" => {
      enabled: threeds_enabled,
      attempt_n3d: threeds_attempt_n3d,
      eci: threeds_eci,
      cryptogram: threeds_cryptogram,
      xid: threeds_xid,
      version: threeds_version
    },
    previous_payment_id: previous_payment_id,
    risk: {
      enabled: risk_enabled
    },
    success_url: success_url,
    failure_url: failure_url,
    payment_ip: payment_ip,
    recipient: {
      dob: recipient_dob,
      account_number: ,
      zip: recipient_zip,
      last_name: recipient_last_name
    },
    processing: {
      mid: processing_mid
    },
    metadata: 
  }
end