Class: Moyasar::Invoice

Inherits:
Resource show all
Includes:
Actions::Create
Defined in:
lib/moyasar/invoice.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Actions::Create

included

Methods inherited from Resource

class_name, resource_name, resource_url

Methods included from Actions::Cancel

included

Methods included from Actions::Update

included

Methods included from Actions::Fetch

included

Methods included from Actions::List

included

Methods included from Actions::Construct

included

Methods included from Actions::Request

included, #request

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



6
7
8
# File 'lib/moyasar/invoice.rb', line 6

def amount
  @amount
end

#amount_formatObject (readonly)

Returns the value of attribute amount_format.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def amount_format
  @amount_format
end

#created_atObject (readonly)

Returns the value of attribute created_at.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def created_at
  @created_at
end

#currencyObject

Returns the value of attribute currency.



6
7
8
# File 'lib/moyasar/invoice.rb', line 6

def currency
  @currency
end

#descriptionObject

Returns the value of attribute description.



6
7
8
# File 'lib/moyasar/invoice.rb', line 6

def description
  @description
end

#idObject (readonly)

Returns the value of attribute id.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def 
  @metadata
end

#paymentsObject (readonly)

Returns the value of attribute payments.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def payments
  @payments
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def status
  @status
end

#updated_atObject (readonly)

Returns the value of attribute updated_at.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def updated_at
  @updated_at
end

#urlObject (readonly)

Returns the value of attribute url.



5
6
7
# File 'lib/moyasar/invoice.rb', line 5

def url
  @url
end

Instance Method Details

#==(other) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/moyasar/invoice.rb', line 8

def ==(other)
  return false unless other.is_a? Invoice

  [:id, :status, :description, :amount, :currency,  :url, :created_at, :updated_at].all? do |attr|
    self.send(attr) == other.send(attr)
  end
end