Class: ChartMogul::Import::Invoice::Transaction
- Inherits:
-
Object
- Object
- ChartMogul::Import::Invoice::Transaction
- Defined in:
- lib/chart_mogul/import/invoice.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#external_id ⇒ Object
readonly
Returns the value of attribute external_id.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uuid ⇒ Object
readonly
Returns the value of attribute uuid.
Instance Method Summary collapse
-
#initialize(args) ⇒ Transaction
constructor
A new instance of Transaction.
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
#date ⇒ Object (readonly)
Returns the value of attribute date.
47 48 49 |
# File 'lib/chart_mogul/import/invoice.rb', line 47 def date @date end |
#external_id ⇒ Object (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 |
#result ⇒ Object (readonly)
Returns the value of attribute result.
48 49 50 |
# File 'lib/chart_mogul/import/invoice.rb', line 48 def result @result end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
46 47 48 |
# File 'lib/chart_mogul/import/invoice.rb', line 46 def type @type end |
#uuid ⇒ Object (readonly)
Returns the value of attribute uuid.
44 45 46 |
# File 'lib/chart_mogul/import/invoice.rb', line 44 def uuid @uuid end |