Class: Kobana::Resources::Charge::BankBillet

Inherits:
Base
  • Object
show all
Defined in:
lib/kobana/resources/charge/bank_billet.rb

Constant Summary

Constants included from Kobana::Resources::Connection

Kobana::Resources::Connection::BASE_URI

Instance Attribute Summary

Attributes inherited from Base

#attributes, #errors

Instance Method Summary collapse

Methods inherited from Base

#[], #client, #created?, infer_resource_endpoint, inherited, #initialize, interpolate, #method_missing, #new_record?, #primary_key, #request, #respond_to_missing?, #updated?, uri, #uri, #valid?, with_client

Methods included from Operations

#delete, #find_command, #handle_error_response, included, #list_commands, #save, #update

Methods included from Kobana::Resources::Connection

included

Constructor Details

This class inherits a constructor from Kobana::Resources::Base

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Kobana::Resources::Base

Instance Method Details

#cancelObject

rubocop:disable Naming/PredicateMethod



12
13
14
15
16
17
18
19
20
# File 'lib/kobana/resources/charge/bank_billet.rb', line 12

def cancel
  response = request(:put, "#{uri}/cancel")
  case response[:status]
  when 204
    true
  else
    false
  end
end