Class: ChartMogul::Import::Invoice::Transaction

Inherits:
Object
  • Object
show all
Defined in:
lib/chart_mogul/import/invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ Transaction

Returns a new instance of Transaction.



50
51
52
53
54
55
56
57
# File 'lib/chart_mogul/import/invoice.rb', line 50

def initialize(args)
  %i{uuid external_id type result}
    .each do |key|
      instance_variable_set("@#{key}", args[key])
    end

  instance_variable_set("@#{:date}", Time.parse(args[:date])) if args[:date]
end

Instance Attribute Details

#dateObject (readonly)

Returns the value of attribute date.



47
48
49
# File 'lib/chart_mogul/import/invoice.rb', line 47

def date
  @date
end

#external_idObject (readonly)

Returns the value of attribute external_id.



45
46
47
# File 'lib/chart_mogul/import/invoice.rb', line 45

def external_id
  @external_id
end

#resultObject (readonly)

Returns the value of attribute result.



48
49
50
# File 'lib/chart_mogul/import/invoice.rb', line 48

def result
  @result
end

#typeObject (readonly)

Returns the value of attribute type.



46
47
48
# File 'lib/chart_mogul/import/invoice.rb', line 46

def type
  @type
end

#uuidObject (readonly)

Returns the value of attribute uuid.



44
45
46
# File 'lib/chart_mogul/import/invoice.rb', line 44

def uuid
  @uuid
end