Class: CheckoutSdk::PaymentSource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#billing_address_line1Object

Returns the value of attribute billing_address_line1.



2
3
4
# File 'lib/checkout_sdk/data/payment_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_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_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_source.rb', line 2

def billing_country
  @billing_country
end

#billing_stateObject

Returns the value of attribute billing_state.



2
3
4
# File 'lib/checkout_sdk/data/payment_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_source.rb', line 2

def billing_zip
  @billing_zip
end

#customer_emailObject

Returns the value of attribute customer_email.



2
3
4
# File 'lib/checkout_sdk/data/payment_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_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_source.rb', line 2

def customer_name
  @customer_name
end

#phone_country_codeObject

Returns the value of attribute phone_country_code.



2
3
4
# File 'lib/checkout_sdk/data/payment_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_source.rb', line 2

def phone_number
  @phone_number
end

#referenceObject

Returns the value of attribute reference.



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

def reference
  @reference
end

#source_data_account_ibanObject

Returns the value of attribute source_data_account_iban.



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

def 
  @source_data_account_iban
end

#source_data_bicObject

Returns the value of attribute source_data_bic.



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

def source_data_bic
  @source_data_bic
end

#source_data_billing_descriptorObject

Returns the value of attribute source_data_billing_descriptor.



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

def source_data_billing_descriptor
  @source_data_billing_descriptor
end

#source_data_first_nameObject

Returns the value of attribute source_data_first_name.



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

def source_data_first_name
  @source_data_first_name
end

#source_data_last_nameObject

Returns the value of attribute source_data_last_name.



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

def source_data_last_name
  @source_data_last_name
end

#source_data_mandate_typeObject

Returns the value of attribute source_data_mandate_type.



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

def source_data_mandate_type
  @source_data_mandate_type
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#dataObject



9
10
11
12
13
14
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
# File 'lib/checkout_sdk/data/payment_source.rb', line 9

def data
  {
    type: type,
    reference: reference,
    billing_address:  {
      address_line1: billing_address_line1,
      address_line2: billing_address_line2,
      city: billing_city,
      state: billing_state,
      zip: billing_zip,
      country: billing_country
    },
    phone: {
      country_code: phone_country_code,
      number: phone_number
    },
    customer: {
      id: customer_id,
      email: customer_email,
      name: customer_name
    },
    source_data: {
      first_name: source_data_first_name,
      last_name: source_data_last_name,
      account_iban: ,
      bic: source_data_bic,
      billing_descriptor: source_data_billing_descriptor,
      mandate_type: source_data_mandate_type
    }
  }
end