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

authorization_header, base_url, configuration, do_get, do_get_search, #endpoint, perform_get

Methods inherited from Utils::BaseStruct

#allowed_attributes, generate_valid_value_for, initialize_empty_model_with_id, value_for_field

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