Class: Softlayer::Product::Order

Inherits:
Model
  • Object
show all
Defined in:
lib/softlayer/product/order.rb

Defined Under Namespace

Classes: Representer

Constant Summary collapse

SERVICE =
'SoftLayer_Product_Order'

Class Method Summary collapse

Methods inherited from Model

all, all_request_for, create, find, #init_headers, parse, request, #request, service_name, #to_hash

Methods included from Model::Operations

extended, #filter, included, #limit, #mask, #request_headers

Class Method Details

.check_item_availability(item_prices = nil, account_id = nil, availability_type_key_names = nil) ⇒ Object



6
7
8
9
# File 'lib/softlayer/product/order.rb', line 6

def self.check_item_availability(item_prices = nil,  = nil, availability_type_key_names = nil)
  message = {item_prices: item_prices, account_id: , availability_type_key_names: availability_type_key_names}
  request(:check_item_availability, Boolean, message)
end

.check_item_availability_for_image_template(image_template_id = nil, account_id = nil, package_id = nil, availability_type_key_names = nil) ⇒ Object



11
12
13
14
# File 'lib/softlayer/product/order.rb', line 11

def self.check_item_availability_for_image_template(image_template_id = nil,  = nil, package_id = nil, availability_type_key_names = nil)
  message = {image_template_id: image_template_id, account_id: , package_id: package_id, availability_type_key_names: availability_type_key_names}
  request(:check_item_availability_for_image_template, Boolean, message)
end

.check_item_conflicts(item_prices = nil) ⇒ Object



16
17
18
19
# File 'lib/softlayer/product/order.rb', line 16

def self.check_item_conflicts(item_prices = nil)
  message = {item_prices: item_prices}
  request(:check_item_conflicts, Boolean, message)
end

.get_external_payment_authorization_receipt(token = nil, payer_id = nil) ⇒ Object



21
22
23
24
# File 'lib/softlayer/product/order.rb', line 21

def self.get_external_payment_authorization_receipt(token = nil, payer_id = nil)
  message = {token: token, payer_id: payer_id}
  request(:get_external_payment_authorization_receipt, Softlayer::Container::Product::Order::Receipt, message)
end

.get_networks(location_id = nil, package_id = nil, account_id = nil) ⇒ Object



26
27
28
29
# File 'lib/softlayer/product/order.rb', line 26

def self.get_networks(location_id = nil, package_id = nil,  = nil)
  message = {location_id: location_id, package_id: package_id, account_id: }
  request(:get_networks, Array[Softlayer::Container::Product::Order::Network], message)
end

.get_reseller_order(order_container = nil) ⇒ Object



31
32
33
34
# File 'lib/softlayer/product/order.rb', line 31

def self.get_reseller_order(order_container = nil)
  message = {order_container: order_container}
  request(:get_reseller_order, Softlayer::Container::Product::Order, message)
end

.get_tax_calculation_result(order_hash = nil) ⇒ Object



36
37
38
39
# File 'lib/softlayer/product/order.rb', line 36

def self.get_tax_calculation_result(order_hash = nil)
  message = {order_hash: order_hash}
  request(:get_tax_calculation_result, Softlayer::Container::Tax::Cache, message)
end

.get_vlans(location_id = nil, package_id = nil, selected_items = nil, vlan_ids = nil, subnet_ids = nil, account_id = nil) ⇒ Object



41
42
43
44
# File 'lib/softlayer/product/order.rb', line 41

def self.get_vlans(location_id = nil, package_id = nil, selected_items = nil, vlan_ids = nil, subnet_ids = nil,  = nil)
  message = {location_id: location_id, package_id: package_id, selected_items: selected_items, vlan_ids: vlan_ids, subnet_ids: subnet_ids, account_id: }
  request(:get_vlans, Softlayer::Container::Product::Order::Network::Vlans, message)
end

.place_order(order_data = nil, save_as_quote = nil) ⇒ Object



46
47
48
49
# File 'lib/softlayer/product/order.rb', line 46

def self.place_order(order_data = nil, save_as_quote = nil)
  message = {order_data: order_data, save_as_quote: save_as_quote}
  request(:place_order, Softlayer::Container::Product::Order::Receipt, message)
end

.place_quote(order_data = nil) ⇒ Object



51
52
53
54
# File 'lib/softlayer/product/order.rb', line 51

def self.place_quote(order_data = nil)
  message = {order_data: order_data}
  request(:place_quote, Softlayer::Container::Product::Order::Receipt, message)
end

.process_external_payment_authorization(token = nil, payer_id = nil) ⇒ Object



56
57
58
59
# File 'lib/softlayer/product/order.rb', line 56

def self.process_external_payment_authorization(token = nil, payer_id = nil)
  message = {token: token, payer_id: payer_id}
  request(:process_external_payment_authorization, Softlayer::Container::Product::Order, message)
end

.required_items(item_prices = nil) ⇒ Object



61
62
63
64
# File 'lib/softlayer/product/order.rb', line 61

def self.required_items(item_prices = nil)
  message = {item_prices: item_prices}
  request(:required_items, Array[Softlayer::Product::Item], message)
end

.verify_order(order_data = nil) ⇒ Object



66
67
68
69
# File 'lib/softlayer/product/order.rb', line 66

def self.verify_order(order_data = nil)
  message = {order_data: order_data}
  request(:verify_order, Softlayer::Container::Product::Order, message)
end