class BillForward::SubscriptionCharge
This entity exposes the following child entities via method_missing:
Invoice
.invoice
Public Class Methods
batch_recalculate(id, request_object = {}, custom_client = nil)
click to toggle source
# File lib/bill_forward/entities/subscription_charge.rb, line 28 def batch_recalculate(id, request_object = {}, custom_client = nil) raise ArgumentError.new("id cannot be nil") if id.nil? endpoint = sprintf('recalculate', ERB::Util.url_encode(id) ) request_entity = BillForward::GenericEntity.new( request_object ) self.request_first('post', endpoint, request_entity, nil, custom_client) end
create(entity = nil)
click to toggle source
# File lib/bill_forward/entities/subscription_charge.rb, line 9 def create(entity = nil) raise DenyMethod.new 'Create support is denied for this entity; '+ 'Please use Invoice.create_charge or Subscription.create_charge instead.' end
recalculate(id, request_object = {}, custom_client = nil)
click to toggle source
# File lib/bill_forward/entities/subscription_charge.rb, line 14 def recalculate(id, request_object = {}, custom_client = nil) raise ArgumentError.new("id cannot be nil") if id.nil? endpoint = sprintf('%s/recalculate', ERB::Util.url_encode(id) ) request_entity = BillForward::GenericEntity.new( request_object ) self.request_first('post', endpoint, request_entity, nil, custom_client) end
Protected Instance Methods
unserialize_all(hash)
click to toggle source
Calls superclass method
# File lib/bill_forward/entities/subscription_charge.rb, line 44 def unserialize_all(hash) super unserialize_entity('invoice', Invoice, hash) end