Class: ComplyanceSDK::PurchaseInvoice::PurchaseInvoiceArtifacts

Inherits:
Object
  • Object
show all
Defined in:
lib/complyance_sdk/purchase_invoice/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(invoice_xml_base64:, invoice_xml_encoding:, tdd_xml_base64:) ⇒ PurchaseInvoiceArtifacts

Returns a new instance of PurchaseInvoiceArtifacts.



18
19
20
21
22
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 18

def initialize(invoice_xml_base64:, invoice_xml_encoding:, tdd_xml_base64:)
  @invoice_xml_base64 = invoice_xml_base64
  @invoice_xml_encoding = invoice_xml_encoding
  @tdd_xml_base64 = tdd_xml_base64
end

Instance Attribute Details

#invoice_xml_base64Object (readonly)

Returns the value of attribute invoice_xml_base64.



16
17
18
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 16

def invoice_xml_base64
  @invoice_xml_base64
end

#invoice_xml_encodingObject (readonly)

Returns the value of attribute invoice_xml_encoding.



16
17
18
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 16

def invoice_xml_encoding
  @invoice_xml_encoding
end

#tdd_xml_base64Object (readonly)

Returns the value of attribute tdd_xml_base64.



16
17
18
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 16

def tdd_xml_base64
  @tdd_xml_base64
end

Class Method Details

.from_h(data) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/complyance_sdk/purchase_invoice/models.rb', line 24

def self.from_h(data)
  return nil unless data.is_a?(Hash)

  new(
    invoice_xml_base64: ModelHelpers.value_for(data, :invoiceXmlBase64),
    invoice_xml_encoding: ModelHelpers.value_for(data, :invoiceXmlEncoding),
    tdd_xml_base64: ModelHelpers.value_for(data, :tddXmlBase64)
  )
end