Class: Worldline::Connect::SDK::V1::Domain::MandateCustomer

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#bank_account_ibanWorldline::Connect::SDK::V1::Domain::BankAccountIban

Returns the current value of bank_account_iban.

Returns:



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 21

def 
  @bank_account_iban
end

#company_nameString

Returns the current value of company_name.

Returns:

  • (String)

    the current value of company_name



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 21

def company_name
  @company_name
end

#contact_detailsWorldline::Connect::SDK::V1::Domain::MandateContactDetails

Returns the current value of contact_details.

Returns:



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 21

def contact_details
  @contact_details
end

#mandate_addressWorldline::Connect::SDK::V1::Domain::MandateAddress

Returns the current value of mandate_address.

Returns:



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 21

def mandate_address
  @mandate_address
end

#personal_informationWorldline::Connect::SDK::V1::Domain::MandatePersonalInformation

Returns the current value of personal_information.

Returns:



21
22
23
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 21

def personal_information
  @personal_information
end

Instance Method Details

#from_hash(hash) ⇒ Object



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 44

def from_hash(hash)
  super
  if hash.has_key? 'bankAccountIban'
    raise TypeError, "value '%s' is not a Hash" % [hash['bankAccountIban']] unless hash['bankAccountIban'].is_a? Hash
    @bank_account_iban = Worldline::Connect::SDK::V1::Domain::BankAccountIban.new_from_hash(hash['bankAccountIban'])
  end
  if hash.has_key? 'companyName'
    @company_name = hash['companyName']
  end
  if hash.has_key? 'contactDetails'
    raise TypeError, "value '%s' is not a Hash" % [hash['contactDetails']] unless hash['contactDetails'].is_a? Hash
    @contact_details = Worldline::Connect::SDK::V1::Domain::MandateContactDetails.new_from_hash(hash['contactDetails'])
  end
  if hash.has_key? 'mandateAddress'
    raise TypeError, "value '%s' is not a Hash" % [hash['mandateAddress']] unless hash['mandateAddress'].is_a? Hash
    @mandate_address = Worldline::Connect::SDK::V1::Domain::MandateAddress.new_from_hash(hash['mandateAddress'])
  end
  if hash.has_key? 'personalInformation'
    raise TypeError, "value '%s' is not a Hash" % [hash['personalInformation']] unless hash['personalInformation'].is_a? Hash
    @personal_information = Worldline::Connect::SDK::V1::Domain::MandatePersonalInformation.new_from_hash(hash['personalInformation'])
  end
end

#to_hHash

Returns:

  • (Hash)


34
35
36
37
38
39
40
41
42
# File 'lib/worldline/connect/sdk/v1/domain/mandate_customer.rb', line 34

def to_h
  hash = super
  hash['bankAccountIban'] = @bank_account_iban.to_h unless @bank_account_iban.nil?
  hash['companyName'] = @company_name unless @company_name.nil?
  hash['contactDetails'] = @contact_details.to_h unless @contact_details.nil?
  hash['mandateAddress'] = @mandate_address.to_h unless @mandate_address.nil?
  hash['personalInformation'] = @personal_information.to_h unless @personal_information.nil?
  hash
end