Class: Worldline::Acquiring::SDK::V1::Domain::CustomerServiceData

Inherits:
Domain::DataObject show all
Defined in:
lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#customer_service_email ⇒ String

Returns the current value of customer_service_email.

Returns:

  • (String) —

    the current value of customer_service_email



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb', line 14

def customer_service_email
  @customer_service_email
end

#customer_service_phone_number ⇒ String

Returns the current value of customer_service_phone_number.

Returns:

  • (String) —

    the current value of customer_service_phone_number



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb', line 14

def customer_service_phone_number
  @customer_service_phone_number
end

#customer_service_url ⇒ String

Returns the current value of customer_service_url.

Returns:

  • (String) —

    the current value of customer_service_url



14
15
16
# File 'lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb', line 14

def customer_service_url
  @customer_service_url
end

Instance Method Details

#from_hash(hash) ⇒ Object



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb', line 31

def from_hash(hash)
  super
  if hash.has_key? 'customerServiceEmail'
    @customer_service_email = hash['customerServiceEmail']
  end
  if hash.has_key? 'customerServicePhoneNumber'
    @customer_service_phone_number = hash['customerServicePhoneNumber']
  end
  if hash.has_key? 'customerServiceUrl'
    @customer_service_url = hash['customerServiceUrl']
  end
end

#to_h ⇒ Hash

Returns:

  • (Hash)


23
24
25
26
27
28
29
# File 'lib/worldline/acquiring/sdk/v1/domain/customer_service_data.rb', line 23

def to_h
  hash = super
  hash['customerServiceEmail'] = @customer_service_email unless @customer_service_email.nil?
  hash['customerServicePhoneNumber'] = @customer_service_phone_number unless @customer_service_phone_number.nil?
  hash['customerServiceUrl'] = @customer_service_url unless @customer_service_url.nil?
  hash
end