Class: BandwidthIris::ImportTnOrders
- Inherits:
-
Object
- Object
- BandwidthIris::ImportTnOrders
show all
- Extended by:
- ClientWrapper
- Includes:
- ApiItem
- Defined in:
- lib/bandwidth-iris/import_tn_orders.rb
Class Method Summary
collapse
-
.create_import_tn_order(client, import_tn_order) ⇒ Object
-
.delete_loa_file(client, order_id, file_id) ⇒ Object
-
.delete_loa_file_metadata(client, order_id, file_id) ⇒ Object
-
.download_loa_file(client, order_id, file_id) ⇒ Object
-
.get_import_tn_order(client, order_id) ⇒ Object
-
.get_import_tn_order_history(client, order_id) ⇒ Object
-
.get_import_tn_orders(client, query = nil) ⇒ Object
-
.get_loa_file_metadata(client, order_id, file_id) ⇒ Object
-
.get_loa_files(client, order_id) ⇒ Object
-
.replace_loa_file(client, order_id, file_id, file_contents, mime_type) ⇒ Object
-
.update_loa_file_metadata(client, order_id, file_id, file_metadata) ⇒ Object
-
.upload_loa_file(client, order_id, file_contents, mime_type) ⇒ Object
wrap_client_arg
Methods included from ApiItem
#[], #[]=, #initialize, #to_data
Class Method Details
.create_import_tn_order(client, import_tn_order) ⇒ Object
26
27
28
29
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 26
def self.create_import_tn_order(client, import_tn_order)
data = client.make_request(:post, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}"), {:import_tn_order => import_tn_order})
return data
end
|
.delete_loa_file(client, order_id, file_id) ⇒ Object
54
55
56
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 54
def self.delete_loa_file(client, order_id, file_id)
client.make_request(:delete, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}"))
end
|
70
71
72
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 70
def self.delete_loa_file_metadata(client, order_id, file_id)
client.make_request(:delete, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}/metadata"))
end
|
.download_loa_file(client, order_id, file_id) ⇒ Object
43
44
45
46
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 43
def self.download_loa_file(client, order_id, file_id)
data = client.make_request_file_download(:get, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}"))
return data
end
|
.get_import_tn_order(client, order_id) ⇒ Object
14
15
16
17
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 14
def self.get_import_tn_order(client, order_id)
data = client.make_request(:get, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}"))
return data
end
|
.get_import_tn_order_history(client, order_id) ⇒ Object
20
21
22
23
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 20
def self.get_import_tn_order_history(client, order_id)
data = client.make_request(:get, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/history"))
return data
end
|
.get_import_tn_orders(client, query = nil) ⇒ Object
8
9
10
11
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 8
def self.get_import_tn_orders(client, query = nil)
data = client.make_request(:get, client.concat_account_path(IMPORT_TN_ORDERS_PATH), query)
return data
end
|
59
60
61
62
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 59
def self.get_loa_file_metadata(client, order_id, file_id)
data = client.make_request(:get, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}/metadata"))
return data
end
|
.get_loa_files(client, order_id) ⇒ Object
32
33
34
35
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 32
def self.get_loa_files(client, order_id)
data = client.make_request(:get, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}"))
return data
end
|
.replace_loa_file(client, order_id, file_id, file_contents, mime_type) ⇒ Object
49
50
51
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 49
def self.replace_loa_file(client, order_id, file_id, file_contents, mime_type)
data = client.make_request_file_upload(:put, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}"), file_contents, mime_type)
end
|
65
66
67
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 65
def self.update_loa_file_metadata(client, order_id, file_id, file_metadata)
client.make_request(:put, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}/#{file_id}/metadata"), {:file_meta_data => file_metadata})
end
|
.upload_loa_file(client, order_id, file_contents, mime_type) ⇒ Object
38
39
40
|
# File 'lib/bandwidth-iris/import_tn_orders.rb', line 38
def self.upload_loa_file(client, order_id, file_contents, mime_type)
client.make_request_file_upload(:post, client.concat_account_path("#{IMPORT_TN_ORDERS_PATH}/#{order_id}/#{LOAS_PATH}"), file_contents, mime_type)
end
|