Module: FidorApi::Client::DSL::StandingOrders

Defined in:
lib/fidor_api/client/dsl/standing_orders.rb

Instance Method Summary collapse

Instance Method Details

#confirm_standing_order(id, options = {}) ⇒ Object



25
26
27
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 25

def confirm_standing_order(id, options = {})
  request(:put, "standing_orders/#{id}/confirm", {}, options[:headers])
end

#create_standing_order(attributes = {}, options = {}) ⇒ Object



17
18
19
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 17

def create_standing_order(attributes = {}, options = {})
  create(FidorApi::Model::StandingOrder, 'standing_orders', attributes, options)
end

#delete_standing_order(id, options = {}) ⇒ Object



29
30
31
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 29

def delete_standing_order(id, options = {})
  request(:delete, "standing_orders/#{id}", nil, options[:headers])
end

#new_standing_order(attributes = {}) ⇒ Object



13
14
15
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 13

def new_standing_order(attributes = {})
  FidorApi::Model::StandingOrder.new(attributes)
end

#standing_order(id, options = {}) ⇒ Object



5
6
7
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 5

def standing_order(id, options = {})
  fetch(:single, FidorApi::Model::StandingOrder, "standing_orders/#{id}", options)
end

#standing_orders(options = {}) ⇒ Object



9
10
11
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 9

def standing_orders(options = {})
  fetch(:collection, FidorApi::Model::StandingOrder, 'standing_orders', options)
end

#update_standing_order(id, attributes = {}, options = {}) ⇒ Object



21
22
23
# File 'lib/fidor_api/client/dsl/standing_orders.rb', line 21

def update_standing_order(id, attributes = {}, options = {})
  update(FidorApi::Model::StandingOrder, "standing_orders/#{id}", id, attributes, options)
end