Class: Worldline::Connect::SDK::V1::Domain::CreateMandateBase

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

Direct Known Subclasses

CreateMandateWithReturnUrl

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#aliasString

Returns the current value of alias.

Returns:

  • (String)

    the current value of alias



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

def alias
  @alias
end

#customerWorldline::Connect::SDK::V1::Domain::MandateCustomer

Returns the current value of customer.

Returns:



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

def customer
  @customer
end

#customer_referenceString

Returns the current value of customer_reference.

Returns:

  • (String)

    the current value of customer_reference



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

def customer_reference
  @customer_reference
end

#languageString

Returns the current value of language.

Returns:

  • (String)

    the current value of language



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

def language
  @language
end

#recurrence_typeString

Returns the current value of recurrence_type.

Returns:

  • (String)

    the current value of recurrence_type



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

def recurrence_type
  @recurrence_type
end

#signature_typeString

Returns the current value of signature_type.

Returns:

  • (String)

    the current value of signature_type



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

def signature_type
  @signature_type
end

#unique_mandate_referenceString

Returns the current value of unique_mandate_reference.

Returns:

  • (String)

    the current value of unique_mandate_reference



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

def unique_mandate_reference
  @unique_mandate_reference
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
# File 'lib/worldline/connect/sdk/v1/domain/create_mandate_base.rb', line 49

def from_hash(hash)
  super
  if hash.has_key? 'alias'
    @alias = hash['alias']
  end
  if hash.has_key? 'customer'
    raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
    @customer = Worldline::Connect::SDK::V1::Domain::MandateCustomer.new_from_hash(hash['customer'])
  end
  if hash.has_key? 'customerReference'
    @customer_reference = hash['customerReference']
  end
  if hash.has_key? 'language'
    @language = hash['language']
  end
  if hash.has_key? 'recurrenceType'
    @recurrence_type = hash['recurrenceType']
  end
  if hash.has_key? 'signatureType'
    @signature_type = hash['signatureType']
  end
  if hash.has_key? 'uniqueMandateReference'
    @unique_mandate_reference = hash['uniqueMandateReference']
  end
end

#to_hHash

Returns:

  • (Hash)


37
38
39
40
41
42
43
44
45
46
47
# File 'lib/worldline/connect/sdk/v1/domain/create_mandate_base.rb', line 37

def to_h
  hash = super
  hash['alias'] = @alias unless @alias.nil?
  hash['customer'] = @customer.to_h unless @customer.nil?
  hash['customerReference'] = @customer_reference unless @customer_reference.nil?
  hash['language'] = @language unless @language.nil?
  hash['recurrenceType'] = @recurrence_type unless @recurrence_type.nil?
  hash['signatureType'] = @signature_type unless @signature_type.nil?
  hash['uniqueMandateReference'] = @unique_mandate_reference unless @unique_mandate_reference.nil?
  hash
end