Class: OnlinePayments::SDK::Domain::PaymentProduct840CustomerAccount

Inherits:
DataObject
  • Object
show all
Defined in:
lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DataObject

new_from_hash

Instance Attribute Details

#account_idString

Returns the current value of account_id.

Returns:

  • (String)

    the current value of account_id



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def 
  @account_id
end

#company_nameString

Returns the current value of company_name.

Returns:

  • (String)

    the current value of company_name



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def company_name
  @company_name
end

#country_codeString

Returns the current value of country_code.

Returns:

  • (String)

    the current value of country_code



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def country_code
  @country_code
end

#customer_account_statusString

Returns the current value of customer_account_status.

Returns:

  • (String)

    the current value of customer_account_status



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def 
  
end

#customer_address_statusString

Returns the current value of customer_address_status.

Returns:

  • (String)

    the current value of customer_address_status



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def customer_address_status
  @customer_address_status
end

#first_nameString

Returns the current value of first_name.

Returns:

  • (String)

    the current value of first_name



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def first_name
  @first_name
end

#payer_idString

Returns the current value of payer_id.

Returns:

  • (String)

    the current value of payer_id



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def payer_id
  @payer_id
end

#surnameString

Returns the current value of surname.

Returns:

  • (String)

    the current value of surname



17
18
19
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 17

def surname
  @surname
end

Instance Method Details

#from_hash(hash) ⇒ Object



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
75
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 49

def from_hash(hash)
  super
  if hash.has_key? 'accountId'
    @account_id = hash['accountId']
  end
  if hash.has_key? 'companyName'
    @company_name = hash['companyName']
  end
  if hash.has_key? 'countryCode'
    @country_code = hash['countryCode']
  end
  if hash.has_key? 'customerAccountStatus'
     = hash['customerAccountStatus']
  end
  if hash.has_key? 'customerAddressStatus'
    @customer_address_status = hash['customerAddressStatus']
  end
  if hash.has_key? 'firstName'
    @first_name = hash['firstName']
  end
  if hash.has_key? 'payerId'
    @payer_id = hash['payerId']
  end
  if hash.has_key? 'surname'
    @surname = hash['surname']
  end
end

#to_hHash

Returns:

  • (Hash)


36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/onlinepayments/sdk/domain/payment_product840_customer_account.rb', line 36

def to_h
  hash = super
  hash['accountId'] = @account_id unless @account_id.nil?
  hash['companyName'] = @company_name unless @company_name.nil?
  hash['countryCode'] = @country_code unless @country_code.nil?
  hash['customerAccountStatus'] =  unless .nil?
  hash['customerAddressStatus'] = @customer_address_status unless @customer_address_status.nil?
  hash['firstName'] = @first_name unless @first_name.nil?
  hash['payerId'] = @payer_id unless @payer_id.nil?
  hash['surname'] = @surname unless @surname.nil?
  hash
end