Class: Nova::API::Resource::Installment::WriteOffInstallment

Inherits:
Base show all
Defined in:
lib/nova/api/resource/installment.rb

Constant Summary collapse

ALLOWED_ATTRIBUTES =
[:addition, :attachments, :date, :discount, :extra_installment, :write_offs]

Constants inherited from Base

Base::PRODUCTION_HOST, Base::SCHEME, Base::STAGING_HOST

Constants inherited from Utils::BaseStruct

Utils::BaseStruct::DATE_REGEX

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

base_url, #endpoint

Methods inherited from Utils::BaseStruct

#allowed_attributes

Class Method Details

.endpointObject



33
34
35
# File 'lib/nova/api/resource/installment.rb', line 33

def self.endpoint
  Installment.endpoint
end

Instance Method Details

#write_offObject



37
38
39
40
41
# File 'lib/nova/api/resource/installment.rb', line 37

def write_off
  protect_operation_from_missing_value

  do_post("#{self.class.endpoint}/#{id}/write_off", allowed_attributes)
end