Class: Recharge::Charge

Inherits:
Object
  • Object
show all
Extended by:
HTTPRequest::Count, HTTPRequest::Get, HTTPRequest::List
Defined in:
lib/recharge/classes.rb

Constant Summary collapse

PATH =
"/charges".freeze
SINGLE =
"charge".freeze
COLLECTION =
"charges".freeze

Class Method Summary collapse

Methods included from HTTPRequest::Count

count

Methods included from HTTPRequest::Get

get

Methods included from HTTPRequest::List

list

Class Method Details

.change_next_charge_date(id, date) ⇒ Object



432
433
434
435
# File 'lib/recharge/classes.rb', line 432

def self.change_next_charge_date(id, date)
  path = join(id, "change_next_charge_date")
  instance(POST(path, :next_charge_date => date_param(date)))
end

.list(options = nil) ⇒ Object



428
429
430
# File 'lib/recharge/classes.rb', line 428

def self.list(options = nil)
  super(convert_date_params(options, :date_min, :date_max))
end

.skip(id, subscription_id) ⇒ Object



437
438
439
440
# File 'lib/recharge/classes.rb', line 437

def self.skip(id, subscription_id)
  path = join(id, "skip")
  instance(POST(path, :subscription_id => subscription_id))
end