Class: Adyen::TerminalOrdersCompanyLevelApi
- Defined in:
- lib/adyen/services/management/terminal_orders_company_level_api.rb
Instance Attribute Summary collapse
-
#service ⇒ Object
Returns the value of attribute service.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Service
Instance Method Summary collapse
- #cancel_order(companyId, orderId, headers: {}) ⇒ Object
- #create_order(request, companyId, headers: {}) ⇒ Object
- #create_shipping_location(request, companyId, headers: {}) ⇒ Object
- #get_order(companyId, orderId, headers: {}) ⇒ Object
-
#initialize(client, version = DEFAULT_VERSION) ⇒ TerminalOrdersCompanyLevelApi
constructor
A new instance of TerminalOrdersCompanyLevelApi.
- #list_billing_entities(companyId, headers: {}, queryParams: {}) ⇒ Object
- #list_orders(companyId, headers: {}, queryParams: {}) ⇒ Object
- #list_shipping_locations(companyId, headers: {}, queryParams: {}) ⇒ Object
- #list_terminal_models(companyId, headers: {}) ⇒ Object
- #list_terminal_products(companyId, headers: {}, queryParams: {}) ⇒ Object
- #update_order(request, companyId, orderId, headers: {}) ⇒ Object
Methods inherited from Service
Constructor Details
#initialize(client, version = DEFAULT_VERSION) ⇒ TerminalOrdersCompanyLevelApi
Returns a new instance of TerminalOrdersCompanyLevelApi.
8 9 10 11 12 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 8 def initialize(client, version = DEFAULT_VERSION) @service = "Management" @client = client @version = version end |
Instance Attribute Details
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 6 def service @service end |
#version ⇒ Object
Returns the value of attribute version.
6 7 8 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 6 def version @version end |
Instance Method Details
#cancel_order(companyId, orderId, headers: {}) ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 122 def cancel_order(companyId, orderId, headers: {} ) """ Cancel an order """ endpoint = "/companies/{companyId}/terminalOrders/{orderId}/cancel".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId,orderId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#create_order(request, companyId, headers: {}) ⇒ Object
110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 110 def create_order(request, companyId, headers: {} ) """ Create an order """ endpoint = "/companies/{companyId}/terminalOrders".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#create_shipping_location(request, companyId, headers: {}) ⇒ Object
98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 98 def create_shipping_location(request, companyId, headers: {} ) """ Create a shipping location """ endpoint = "/companies/{companyId}/shippingLocations".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] action = { method: "post", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |
#get_order(companyId, orderId, headers: {}) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 62 def get_order(companyId, orderId, headers: {} ) """ Get an order """ endpoint = "/companies/{companyId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId,orderId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#list_billing_entities(companyId, headers: {}, queryParams: {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 14 def list_billing_entities(companyId, headers: {} , queryParams: {}) """ Get a list of billing entities """ endpoint = "/companies/{companyId}/billingEntities".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#list_orders(companyId, headers: {}, queryParams: {}) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 50 def list_orders(companyId, headers: {} , queryParams: {}) """ Get a list of orders """ endpoint = "/companies/{companyId}/terminalOrders".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#list_shipping_locations(companyId, headers: {}, queryParams: {}) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 26 def list_shipping_locations(companyId, headers: {} , queryParams: {}) """ Get a list of shipping locations """ endpoint = "/companies/{companyId}/shippingLocations".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#list_terminal_models(companyId, headers: {}) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 38 def list_terminal_models(companyId, headers: {} ) """ Get a list of terminal models """ endpoint = "/companies/{companyId}/terminalModels".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#list_terminal_products(companyId, headers: {}, queryParams: {}) ⇒ Object
74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 74 def list_terminal_products(companyId, headers: {} , queryParams: {}) """ Get a list of terminal products """ endpoint = "/companies/{companyId}/terminalProducts".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId] endpoint = endpoint + create_query_string(queryParams) action = { method: "get", url: endpoint} @client.call_adyen_api(@service, action, {}, headers, @version) end |
#update_order(request, companyId, orderId, headers: {}) ⇒ Object
86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/adyen/services/management/terminal_orders_company_level_api.rb', line 86 def update_order(request, companyId, orderId, headers: {} ) """ Update an order """ endpoint = "/companies/{companyId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(/^\//, "") endpoint = endpoint % [companyId,orderId] action = { method: "patch", url: endpoint} @client.call_adyen_api(@service, action, request, headers, @version) end |