Class: Billogram::Invoice

Inherits:
Resource show all
Defined in:
lib/billogram/resources/invoice.rb

Constant Summary

Constants inherited from Resource

Resource::DEFAULT_OPTIONS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Resource

build_objects, create, #delete, delete, endpoint, fetch, #initialize, perform_request, relation, relations, search, update, #update

Constructor Details

This class inherits a constructor from Billogram::Resource

Instance Attribute Details

#attachmentObject

Returns the value of attribute attachment.



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

def attachment
  @attachment
end

#attested_atObject

Returns the value of attribute attested_at.



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

def attested_at
  @attested_at
end

#automatic_remindersObject

Returns the value of attribute automatic_reminders.



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

def automatic_reminders
  @automatic_reminders
end

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#currencyObject

Returns the value of attribute currency.



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

def currency
  @currency
end

#delivery_methodObject

Returns the value of attribute delivery_method.



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

def delivery_method
  @delivery_method
end

#detailed_sumsObject

Returns the value of attribute detailed_sums.



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

def detailed_sums
  @detailed_sums
end

#due_dateObject

Returns the value of attribute due_date.



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

def due_date
  @due_date
end

#due_daysObject

Returns the value of attribute due_days.



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

def due_days
  @due_days
end

#flagsObject

Returns the value of attribute flags.



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

def flags
  @flags
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#interest_feeObject

Returns the value of attribute interest_fee.



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

def interest_fee
  @interest_fee
end

#interest_rateObject

Returns the value of attribute interest_rate.



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

def interest_rate
  @interest_rate
end

#invoice_dateObject

Returns the value of attribute invoice_date.



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

def invoice_date
  @invoice_date
end

#invoice_feeObject

Returns the value of attribute invoice_fee.



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

def invoice_fee
  @invoice_fee
end

#invoice_fee_vatObject

Returns the value of attribute invoice_fee_vat.



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

def invoice_fee_vat
  @invoice_fee_vat
end

#invoice_noObject

Returns the value of attribute invoice_no.



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

def invoice_no
  @invoice_no
end

#ocr_numberObject

Returns the value of attribute ocr_number.



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

def ocr_number
  @ocr_number
end

#remaining_sumObject

Returns the value of attribute remaining_sum.



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

def remaining_sum
  @remaining_sum
end

#reminder_countObject

Returns the value of attribute reminder_count.



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

def reminder_count
  @reminder_count
end

#reminder_feeObject

Returns the value of attribute reminder_fee.



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

def reminder_fee
  @reminder_fee
end

#rounding_valueObject

Returns the value of attribute rounding_value.



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

def rounding_value
  @rounding_value
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

#total_sumObject

Returns the value of attribute total_sum.



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

def total_sum
  @total_sum
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#urlObject

Returns the value of attribute url.



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

def url
  @url
end

Instance Method Details

#attach(options = {}) ⇒ Object



56
57
58
# File 'lib/billogram/resources/invoice.rb', line 56

def attach(options = {})
  perform_request("#{endpoint}/#{id}/command/attach", :post, options)
end

#collectObject



23
24
25
# File 'lib/billogram/resources/invoice.rb', line 23

def collect
  perform_request("#{endpoint}/#{id}/command/collect", :post)
end

#credit(options = {}) ⇒ Object



48
49
50
# File 'lib/billogram/resources/invoice.rb', line 48

def credit(options = {})
  perform_request("#{endpoint}/#{id}/command/credit", :post, options)
end

#message(options = {}) ⇒ Object



52
53
54
# File 'lib/billogram/resources/invoice.rb', line 52

def message(options = {})
  perform_request("#{endpoint}/#{id}/command/message", :post, options)
end

#payment(options = {}) ⇒ Object



44
45
46
# File 'lib/billogram/resources/invoice.rb', line 44

def payment(options = {})
  perform_request("#{endpoint}/#{id}/command/payment", :post, options)
end

#remind(options = {}) ⇒ Object



40
41
42
# File 'lib/billogram/resources/invoice.rb', line 40

def remind(options = {})
  perform_request("#{endpoint}/#{id}/command/remind", :post, options)
end

#resend(options = {}) ⇒ Object



36
37
38
# File 'lib/billogram/resources/invoice.rb', line 36

def resend(options = {})
  perform_request("#{endpoint}/#{id}/command/resend", :post, options)
end

#sellObject



19
20
21
# File 'lib/billogram/resources/invoice.rb', line 19

def sell
  perform_request("#{endpoint}/#{id}/command/send", :post)
end

#send!(options = {}) ⇒ Object



31
32
33
34
# File 'lib/billogram/resources/invoice.rb', line 31

def send!(options = {})
  # https://billogram.com/api/documentation#billogram_call_send
  perform_request("#{endpoint}/#{id}/command/send", :post, options)
end

#writeoff(options = {}) ⇒ Object



27
28
29
# File 'lib/billogram/resources/invoice.rb', line 27

def writeoff(options = {})
  perform_request("#{endpoint}/#{id}/command/writeoff", :post)
end