Class: Worldline::Connect::SDK::V1::Domain::OrderInvoiceData

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Domain::DataObject

new_from_hash

Instance Attribute Details

#additional_dataString

Returns the current value of additional_data.

Returns:

  • (String)

    the current value of additional_data



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 16

def additional_data
  @additional_data
end

#invoice_dateString

Returns the current value of invoice_date.

Returns:

  • (String)

    the current value of invoice_date



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 16

def invoice_date
  @invoice_date
end

#invoice_numberString

Returns the current value of invoice_number.

Returns:

  • (String)

    the current value of invoice_number



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 16

def invoice_number
  @invoice_number
end

#text_qualifiersArray<String>

Returns the current value of text_qualifiers.

Returns:

  • (Array<String>)

    the current value of text_qualifiers



16
17
18
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 16

def text_qualifiers
  @text_qualifiers
end

Instance Method Details

#from_hash(hash) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 36

def from_hash(hash)
  super
  if hash.has_key? 'additionalData'
    @additional_data = hash['additionalData']
  end
  if hash.has_key? 'invoiceDate'
    @invoice_date = hash['invoiceDate']
  end
  if hash.has_key? 'invoiceNumber'
    @invoice_number = hash['invoiceNumber']
  end
  if hash.has_key? 'textQualifiers'
    raise TypeError, "value '%s' is not an Array" % [hash['textQualifiers']] unless hash['textQualifiers'].is_a? Array
    @text_qualifiers = []
    hash['textQualifiers'].each do |e|
      @text_qualifiers << e
    end
  end
end

#to_hHash

Returns:

  • (Hash)


27
28
29
30
31
32
33
34
# File 'lib/worldline/connect/sdk/v1/domain/order_invoice_data.rb', line 27

def to_h
  hash = super
  hash['additionalData'] = @additional_data unless @additional_data.nil?
  hash['invoiceDate'] = @invoice_date unless @invoice_date.nil?
  hash['invoiceNumber'] = @invoice_number unless @invoice_number.nil?
  hash['textQualifiers'] = @text_qualifiers unless @text_qualifiers.nil?
  hash
end