square_connect 2.0.2.69 → 2.1.0.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +133 -21
- data/docs/ChargeRequest.md +1 -1
- data/docs/CheckoutApi.md +8 -6
- data/docs/CustomersApi.md +389 -0
- data/docs/Device.md +11 -0
- data/docs/LocationsApi.md +55 -0
- data/docs/TransactionsApi.md +417 -0
- data/docs/V1AdjustInventoryRequest.md +12 -0
- data/docs/V1BankAccount.md +17 -0
- data/docs/V1CashDrawerEvent.md +15 -0
- data/docs/V1CashDrawerShift.md +28 -0
- data/docs/V1Category.md +11 -0
- data/docs/V1CreateRefundRequest.md +14 -0
- data/docs/V1Discount.md +16 -0
- data/docs/V1Employee.md +21 -0
- data/docs/V1EmployeeRole.md +15 -0
- data/docs/V1EmployeesApi.md +915 -0
- data/docs/V1Fee.md +18 -0
- data/docs/V1InventoryEntry.md +11 -0
- data/docs/V1Item.md +23 -0
- data/docs/V1ItemImage.md +11 -0
- data/docs/V1ItemsApi.md +2297 -0
- data/docs/V1LocationApi.md +102 -0
- data/docs/V1LocationsApi.md +102 -0
- data/docs/V1Merchant.md +26 -0
- data/docs/V1MerchantLocationDetails.md +12 -0
- data/docs/V1ModifierList.md +13 -0
- data/docs/V1ModifierOption.md +15 -0
- data/docs/V1Money.md +13 -0
- data/docs/V1Order.md +34 -0
- data/docs/V1OrderHistoryEntry.md +11 -0
- data/docs/V1Page.md +13 -0
- data/docs/V1PageCell.md +15 -0
- data/docs/V1Payment.md +33 -0
- data/docs/V1PaymentDiscount.md +12 -0
- data/docs/V1PaymentItemDetail.md +13 -0
- data/docs/V1PaymentItemization.md +23 -0
- data/docs/V1PaymentModifier.md +12 -0
- data/docs/V1PaymentTax.md +15 -0
- data/docs/V1PhoneNumber.md +13 -0
- data/docs/V1Refund.md +16 -0
- data/docs/V1Settlement.md +15 -0
- data/docs/V1SettlementEntry.md +13 -0
- data/docs/V1Tender.md +22 -0
- data/docs/V1Timecard.md +20 -0
- data/docs/V1TimecardEvent.md +14 -0
- data/docs/V1TransactionsApi.md +650 -0
- data/docs/V1UpdateModifierListRequest.md +11 -0
- data/docs/V1UpdateOrderRequest.md +14 -0
- data/docs/V1Variation.md +20 -0
- data/lib/.DS_Store +0 -0
- data/lib/square_connect.rb +46 -5
- data/lib/square_connect/.DS_Store +0 -0
- data/lib/square_connect/api/checkout_api.rb +4 -9
- data/lib/square_connect/api/{customer_api.rb → customers_api.rb} +150 -61
- data/lib/square_connect/api/{location_api.rb → locations_api.rb} +7 -12
- data/lib/square_connect/api/{transaction_api.rb → transactions_api.rb} +169 -65
- data/lib/square_connect/api/v1_employees_api.rb +974 -0
- data/lib/square_connect/api/v1_items_api.rb +2365 -0
- data/lib/square_connect/api/v1_locations_api.rb +118 -0
- data/lib/square_connect/api/v1_transactions_api.rb +707 -0
- data/lib/square_connect/api_client.rb +1 -1
- data/lib/square_connect/models/charge_request.rb +1 -1
- data/lib/square_connect/models/device.rb +196 -0
- data/lib/square_connect/models/v1_adjust_inventory_request.rb +206 -0
- data/lib/square_connect/models/v1_bank_account.rb +289 -0
- data/lib/square_connect/models/v1_cash_drawer_event.rb +269 -0
- data/lib/square_connect/models/v1_cash_drawer_shift.rb +403 -0
- data/lib/square_connect/models/v1_category.rb +196 -0
- data/lib/square_connect/models/v1_create_refund_request.rb +274 -0
- data/lib/square_connect/models/v1_discount.rb +291 -0
- data/lib/square_connect/models/v1_employee.rb +323 -0
- data/lib/square_connect/models/v1_employee_role.rb +269 -0
- data/lib/square_connect/models/v1_fee.rb +335 -0
- data/lib/square_connect/models/v1_inventory_entry.rb +196 -0
- data/lib/square_connect/models/v1_item.rb +379 -0
- data/lib/square_connect/models/v1_item_image.rb +196 -0
- data/lib/square_connect/models/v1_merchant.rb +372 -0
- data/lib/square_connect/models/v1_merchant_location_details.rb +186 -0
- data/lib/square_connect/models/v1_modifier_list.rb +251 -0
- data/lib/square_connect/models/v1_modifier_option.rb +236 -0
- data/lib/square_connect/models/v1_money.rb +229 -0
- data/lib/square_connect/models/v1_order.rb +463 -0
- data/lib/square_connect/models/v1_order_history_entry.rb +229 -0
- data/lib/square_connect/models/v1_page.rb +218 -0
- data/lib/square_connect/models/v1_page_cell.rb +261 -0
- data/lib/square_connect/models/v1_payment.rb +423 -0
- data/lib/square_connect/models/v1_payment_discount.rb +206 -0
- data/lib/square_connect/models/v1_payment_item_detail.rb +216 -0
- data/lib/square_connect/models/v1_payment_itemization.rb +355 -0
- data/lib/square_connect/models/v1_payment_modifier.rb +206 -0
- data/lib/square_connect/models/v1_payment_tax.rb +271 -0
- data/lib/square_connect/models/v1_phone_number.rb +206 -0
- data/lib/square_connect/models/v1_refund.rb +279 -0
- data/lib/square_connect/models/v1_settlement.rb +271 -0
- data/lib/square_connect/models/v1_settlement_entry.rb +249 -0
- data/lib/square_connect/models/v1_tender.rb +363 -0
- data/lib/square_connect/models/v1_timecard.rb +271 -0
- data/lib/square_connect/models/v1_timecard_event.rb +259 -0
- data/lib/square_connect/models/v1_update_modifier_list_request.rb +229 -0
- data/lib/square_connect/models/v1_update_order_request.rb +264 -0
- data/lib/square_connect/models/v1_variation.rb +331 -0
- data/lib/square_connect/version.rb +1 -1
- data/spec/.DS_Store +0 -0
- data/spec/api/checkout_api_spec.rb +4 -12
- data/spec/api/{customer_api_spec.rb → customers_api_spec.rb} +39 -41
- data/spec/api/{location_api_spec.rb → locations_api_spec.rb} +9 -15
- data/spec/api/{transaction_api_spec.rb → transactions_api_spec.rb} +43 -41
- data/spec/api/v1_employees_api_spec.rb +250 -0
- data/spec/api/v1_items_api_spec.rb +568 -0
- data/spec/api/v1_locations_api_spec.rb +54 -0
- data/spec/api/v1_transactions_api_spec.rb +186 -0
- data/spec/models/address_spec.rb +22 -81
- data/spec/models/capture_transaction_request_spec.rb +3 -6
- data/spec/models/capture_transaction_response_spec.rb +4 -11
- data/spec/models/card_brand_spec.rb +3 -6
- data/spec/models/card_spec.rb +14 -41
- data/spec/models/charge_request_spec.rb +14 -61
- data/spec/models/charge_response_spec.rb +5 -16
- data/spec/models/checkout_spec.rb +12 -51
- data/spec/models/country_spec.rb +3 -6
- data/spec/models/create_checkout_request_spec.rb +10 -41
- data/spec/models/create_checkout_response_spec.rb +5 -16
- data/spec/models/create_customer_card_request_spec.rb +6 -21
- data/spec/models/create_customer_card_response_spec.rb +5 -16
- data/spec/models/create_customer_request_spec.rb +12 -51
- data/spec/models/create_customer_response_spec.rb +5 -16
- data/spec/models/create_order_request_line_item_spec.rb +6 -21
- data/spec/models/create_order_request_order_spec.rb +5 -16
- data/spec/models/create_order_request_spec.rb +5 -16
- data/spec/models/create_refund_request_spec.rb +7 -26
- data/spec/models/create_refund_response_spec.rb +5 -16
- data/spec/models/currency_spec.rb +3 -6
- data/spec/models/customer_group_info_spec.rb +5 -16
- data/spec/models/customer_preferences_spec.rb +4 -11
- data/spec/models/customer_spec.rb +18 -81
- data/spec/models/delete_customer_card_request_spec.rb +3 -6
- data/spec/models/delete_customer_card_response_spec.rb +4 -11
- data/spec/models/delete_customer_request_spec.rb +3 -6
- data/spec/models/delete_customer_response_spec.rb +4 -11
- data/spec/models/device_spec.rb +45 -0
- data/spec/models/error_category_spec.rb +3 -6
- data/spec/models/error_code_spec.rb +3 -6
- data/spec/models/error_spec.rb +15 -26
- data/spec/models/list_customers_request_spec.rb +4 -11
- data/spec/models/list_customers_response_spec.rb +6 -21
- data/spec/models/list_locations_request_spec.rb +3 -6
- data/spec/models/list_locations_response_spec.rb +5 -16
- data/spec/models/list_refunds_request_spec.rb +11 -26
- data/spec/models/list_refunds_response_spec.rb +6 -21
- data/spec/models/list_transactions_request_spec.rb +11 -26
- data/spec/models/list_transactions_response_spec.rb +6 -21
- data/spec/models/location_capability_spec.rb +3 -6
- data/spec/models/location_spec.rb +12 -31
- data/spec/models/money_spec.rb +9 -16
- data/spec/models/order_line_item_spec.rb +8 -31
- data/spec/models/order_spec.rb +8 -31
- data/spec/models/refund_spec.rb +16 -51
- data/spec/models/refund_status_spec.rb +3 -6
- data/spec/models/retrieve_customer_request_spec.rb +3 -6
- data/spec/models/retrieve_customer_response_spec.rb +5 -16
- data/spec/models/retrieve_transaction_request_spec.rb +3 -6
- data/spec/models/retrieve_transaction_response_spec.rb +5 -16
- data/spec/models/sort_order_spec.rb +3 -6
- data/spec/models/tender_card_details_entry_method_spec.rb +3 -6
- data/spec/models/tender_card_details_spec.rb +14 -21
- data/spec/models/tender_card_details_status_spec.rb +3 -6
- data/spec/models/tender_cash_details_spec.rb +5 -16
- data/spec/models/tender_spec.rb +18 -61
- data/spec/models/tender_type_spec.rb +3 -6
- data/spec/models/transaction_product_spec.rb +3 -6
- data/spec/models/transaction_spec.rb +17 -56
- data/spec/models/update_customer_request_spec.rb +12 -51
- data/spec/models/update_customer_response_spec.rb +5 -16
- data/spec/models/v1_adjust_inventory_request_spec.rb +51 -0
- data/spec/models/v1_bank_account_spec.rb +85 -0
- data/spec/models/v1_cash_drawer_event_spec.rb +73 -0
- data/spec/models/v1_cash_drawer_shift_spec.rb +151 -0
- data/spec/models/v1_category_spec.rb +45 -0
- data/spec/models/v1_create_refund_request_spec.rb +67 -0
- data/spec/models/v1_discount_spec.rb +83 -0
- data/spec/models/v1_employee_role_spec.rb +73 -0
- data/spec/models/v1_employee_spec.rb +97 -0
- data/spec/models/v1_fee_spec.rb +103 -0
- data/spec/models/v1_inventory_entry_spec.rb +45 -0
- data/spec/models/v1_item_image_spec.rb +45 -0
- data/spec/models/v1_item_spec.rb +129 -0
- data/spec/models/v1_merchant_location_details_spec.rb +39 -0
- data/spec/models/v1_merchant_spec.rb +131 -0
- data/spec/models/v1_modifier_list_spec.rb +61 -0
- data/spec/models/v1_modifier_option_spec.rb +69 -0
- data/spec/models/v1_money_spec.rb +49 -0
- data/spec/models/v1_order_history_entry_spec.rb +49 -0
- data/spec/models/v1_order_spec.rb +187 -0
- data/spec/models/v1_page_cell_spec.rb +77 -0
- data/spec/models/v1_page_spec.rb +57 -0
- data/spec/models/v1_payment_discount_spec.rb +51 -0
- data/spec/models/v1_payment_item_detail_spec.rb +57 -0
- data/spec/models/v1_payment_itemization_spec.rb +121 -0
- data/spec/models/v1_payment_modifier_spec.rb +51 -0
- data/spec/models/v1_payment_spec.rb +177 -0
- data/spec/models/v1_payment_tax_spec.rb +73 -0
- data/spec/models/v1_phone_number_spec.rb +45 -0
- data/spec/models/v1_refund_spec.rb +79 -0
- data/spec/models/v1_settlement_entry_spec.rb +61 -0
- data/spec/models/v1_settlement_spec.rb +73 -0
- data/spec/models/v1_tender_spec.rb +123 -0
- data/spec/models/v1_timecard_event_spec.rb +67 -0
- data/spec/models/v1_timecard_spec.rb +87 -0
- data/spec/models/v1_update_modifier_list_request_spec.rb +49 -0
- data/spec/models/v1_update_order_request_spec.rb +67 -0
- data/spec/models/v1_variation_spec.rb +107 -0
- data/spec/models/void_transaction_request_spec.rb +3 -6
- data/spec/models/void_transaction_response_spec.rb +4 -11
- data/spec/spec_helper.rb +10 -0
- data/square_connect-2.0.2.gem +0 -0
- data/square_connect-2.1.0.gem +0 -0
- data/square_connect-2.1.0beta.gem +0 -0
- data/square_connect.gemspec +1 -1
- data/travis-ci/accounts.enc +0 -0
- metadata +197 -26
- data/docs/CustomerApi.md +0 -267
- data/docs/CustomerCardApi.md +0 -116
- data/docs/LocationApi.md +0 -56
- data/docs/RefundApi.md +0 -126
- data/docs/TransactionApi.md +0 -285
- data/lib/square_connect/api/customer_card_api.rb +0 -144
- data/lib/square_connect/api/refund_api.rb +0 -159
- data/spec/api/customer_card_api_spec.rb +0 -71
- data/spec/api/refund_api_spec.rb +0 -75
|
@@ -0,0 +1,974 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Square Connect API
|
|
3
|
+
|
|
4
|
+
OpenAPI spec version: 2.0
|
|
5
|
+
Contact: developers@squareup.com
|
|
6
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
7
|
+
|
|
8
|
+
=end
|
|
9
|
+
|
|
10
|
+
require "uri"
|
|
11
|
+
|
|
12
|
+
module SquareConnect
|
|
13
|
+
class V1EmployeesApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(api_client = ApiClient.default)
|
|
17
|
+
@api_client = api_client
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Creates an employee for a business.
|
|
21
|
+
# Creates an employee for a business.
|
|
22
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @return [V1Employee]
|
|
25
|
+
def create_employee(body, opts = {})
|
|
26
|
+
data, _status_code, _headers = create_employee_with_http_info(body, opts)
|
|
27
|
+
return data
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Creates an employee for a business.
|
|
31
|
+
# Creates an employee for a business.
|
|
32
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(V1Employee, Fixnum, Hash)>] V1Employee data, response status code and response headers
|
|
35
|
+
def create_employee_with_http_info(body, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.create_employee ..."
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'body' is set
|
|
40
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V1EmployeesApi.create_employee" if body.nil?
|
|
41
|
+
# resource path
|
|
42
|
+
local_var_path = "/v1/me/employees".sub('{format}','json')
|
|
43
|
+
|
|
44
|
+
# query parameters
|
|
45
|
+
query_params = {}
|
|
46
|
+
|
|
47
|
+
# header parameters
|
|
48
|
+
header_params = {}
|
|
49
|
+
# HTTP header 'Accept' (if needed)
|
|
50
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
51
|
+
# HTTP header 'Content-Type'
|
|
52
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = @api_client.object_to_http_body(body)
|
|
59
|
+
auth_names = ['oauth2']
|
|
60
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
61
|
+
:header_params => header_params,
|
|
62
|
+
:query_params => query_params,
|
|
63
|
+
:form_params => form_params,
|
|
64
|
+
:body => post_body,
|
|
65
|
+
:auth_names => auth_names,
|
|
66
|
+
:return_type => 'V1Employee')
|
|
67
|
+
if @api_client.config.debugging
|
|
68
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#create_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
69
|
+
end
|
|
70
|
+
return data, status_code, headers
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Creates an employee role you can then assign to employees.
|
|
74
|
+
# Creates an employee role you can then assign to employees.
|
|
75
|
+
# @param employee_role An EmployeeRole object with a name and permissions, and an optional owner flag.
|
|
76
|
+
# @param [Hash] opts the optional parameters
|
|
77
|
+
# @return [V1EmployeeRole]
|
|
78
|
+
def create_employee_role(employee_role, opts = {})
|
|
79
|
+
data, _status_code, _headers = create_employee_role_with_http_info(employee_role, opts)
|
|
80
|
+
return data
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Creates an employee role you can then assign to employees.
|
|
84
|
+
# Creates an employee role you can then assign to employees.
|
|
85
|
+
# @param employee_role An EmployeeRole object with a name and permissions, and an optional owner flag.
|
|
86
|
+
# @param [Hash] opts the optional parameters
|
|
87
|
+
# @return [Array<(V1EmployeeRole, Fixnum, Hash)>] V1EmployeeRole data, response status code and response headers
|
|
88
|
+
def create_employee_role_with_http_info(employee_role, opts = {})
|
|
89
|
+
if @api_client.config.debugging
|
|
90
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.create_employee_role ..."
|
|
91
|
+
end
|
|
92
|
+
# verify the required parameter 'employee_role' is set
|
|
93
|
+
fail ArgumentError, "Missing the required parameter 'employee_role' when calling V1EmployeesApi.create_employee_role" if employee_role.nil?
|
|
94
|
+
# resource path
|
|
95
|
+
local_var_path = "/v1/me/roles".sub('{format}','json')
|
|
96
|
+
|
|
97
|
+
# query parameters
|
|
98
|
+
query_params = {}
|
|
99
|
+
|
|
100
|
+
# header parameters
|
|
101
|
+
header_params = {}
|
|
102
|
+
# HTTP header 'Accept' (if needed)
|
|
103
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
104
|
+
# HTTP header 'Content-Type'
|
|
105
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
106
|
+
|
|
107
|
+
# form parameters
|
|
108
|
+
form_params = {}
|
|
109
|
+
|
|
110
|
+
# http body (model)
|
|
111
|
+
post_body = @api_client.object_to_http_body(employee_role)
|
|
112
|
+
auth_names = ['oauth2']
|
|
113
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
114
|
+
:header_params => header_params,
|
|
115
|
+
:query_params => query_params,
|
|
116
|
+
:form_params => form_params,
|
|
117
|
+
:body => post_body,
|
|
118
|
+
:auth_names => auth_names,
|
|
119
|
+
:return_type => 'V1EmployeeRole')
|
|
120
|
+
if @api_client.config.debugging
|
|
121
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#create_employee_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
122
|
+
end
|
|
123
|
+
return data, status_code, headers
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Creates a timecard for an employee. Each timecard corresponds to a single shift.
|
|
127
|
+
# Creates a timecard for an employee. Each timecard corresponds to a single shift.
|
|
128
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
129
|
+
# @param [Hash] opts the optional parameters
|
|
130
|
+
# @return [V1Timecard]
|
|
131
|
+
def create_timecard(body, opts = {})
|
|
132
|
+
data, _status_code, _headers = create_timecard_with_http_info(body, opts)
|
|
133
|
+
return data
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Creates a timecard for an employee. Each timecard corresponds to a single shift.
|
|
137
|
+
# Creates a timecard for an employee. Each timecard corresponds to a single shift.
|
|
138
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [Array<(V1Timecard, Fixnum, Hash)>] V1Timecard data, response status code and response headers
|
|
141
|
+
def create_timecard_with_http_info(body, opts = {})
|
|
142
|
+
if @api_client.config.debugging
|
|
143
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.create_timecard ..."
|
|
144
|
+
end
|
|
145
|
+
# verify the required parameter 'body' is set
|
|
146
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V1EmployeesApi.create_timecard" if body.nil?
|
|
147
|
+
# resource path
|
|
148
|
+
local_var_path = "/v1/me/timecards".sub('{format}','json')
|
|
149
|
+
|
|
150
|
+
# query parameters
|
|
151
|
+
query_params = {}
|
|
152
|
+
|
|
153
|
+
# header parameters
|
|
154
|
+
header_params = {}
|
|
155
|
+
# HTTP header 'Accept' (if needed)
|
|
156
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
157
|
+
# HTTP header 'Content-Type'
|
|
158
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
159
|
+
|
|
160
|
+
# form parameters
|
|
161
|
+
form_params = {}
|
|
162
|
+
|
|
163
|
+
# http body (model)
|
|
164
|
+
post_body = @api_client.object_to_http_body(body)
|
|
165
|
+
auth_names = ['oauth2']
|
|
166
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
167
|
+
:header_params => header_params,
|
|
168
|
+
:query_params => query_params,
|
|
169
|
+
:form_params => form_params,
|
|
170
|
+
:body => post_body,
|
|
171
|
+
:auth_names => auth_names,
|
|
172
|
+
:return_type => 'V1Timecard')
|
|
173
|
+
if @api_client.config.debugging
|
|
174
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#create_timecard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
175
|
+
end
|
|
176
|
+
return data, status_code, headers
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Deletes a timecard. Deleted timecards are still accessible from Connect API endpoints, but the value of their deleted field is set to true. See Handling deleted timecards for more information.
|
|
180
|
+
# Deletes a timecard. Deleted timecards are still accessible from Connect API endpoints, but the value of their deleted field is set to true. See Handling deleted timecards for more information.
|
|
181
|
+
# @param timecard_id The ID of the timecard to delete.
|
|
182
|
+
# @param [Hash] opts the optional parameters
|
|
183
|
+
# @return [Object]
|
|
184
|
+
def delete_timecard(timecard_id, opts = {})
|
|
185
|
+
data, _status_code, _headers = delete_timecard_with_http_info(timecard_id, opts)
|
|
186
|
+
return data
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Deletes a timecard. Deleted timecards are still accessible from Connect API endpoints, but the value of their deleted field is set to true. See Handling deleted timecards for more information.
|
|
190
|
+
# Deletes a timecard. Deleted timecards are still accessible from Connect API endpoints, but the value of their deleted field is set to true. See Handling deleted timecards for more information.
|
|
191
|
+
# @param timecard_id The ID of the timecard to delete.
|
|
192
|
+
# @param [Hash] opts the optional parameters
|
|
193
|
+
# @return [Array<(Object, Fixnum, Hash)>] Object data, response status code and response headers
|
|
194
|
+
def delete_timecard_with_http_info(timecard_id, opts = {})
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.delete_timecard ..."
|
|
197
|
+
end
|
|
198
|
+
# verify the required parameter 'timecard_id' is set
|
|
199
|
+
fail ArgumentError, "Missing the required parameter 'timecard_id' when calling V1EmployeesApi.delete_timecard" if timecard_id.nil?
|
|
200
|
+
# resource path
|
|
201
|
+
local_var_path = "/v1/me/timecards/{timecard_id}".sub('{format}','json').sub('{' + 'timecard_id' + '}', timecard_id.to_s)
|
|
202
|
+
|
|
203
|
+
# query parameters
|
|
204
|
+
query_params = {}
|
|
205
|
+
|
|
206
|
+
# header parameters
|
|
207
|
+
header_params = {}
|
|
208
|
+
# HTTP header 'Accept' (if needed)
|
|
209
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
210
|
+
# HTTP header 'Content-Type'
|
|
211
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
212
|
+
|
|
213
|
+
# form parameters
|
|
214
|
+
form_params = {}
|
|
215
|
+
|
|
216
|
+
# http body (model)
|
|
217
|
+
post_body = nil
|
|
218
|
+
auth_names = ['oauth2']
|
|
219
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
|
220
|
+
:header_params => header_params,
|
|
221
|
+
:query_params => query_params,
|
|
222
|
+
:form_params => form_params,
|
|
223
|
+
:body => post_body,
|
|
224
|
+
:auth_names => auth_names,
|
|
225
|
+
:return_type => 'Object')
|
|
226
|
+
if @api_client.config.debugging
|
|
227
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#delete_timecard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
228
|
+
end
|
|
229
|
+
return data, status_code, headers
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
|
|
233
|
+
# Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
|
|
234
|
+
# @param location_id The ID of the location to list cash drawer shifts for.
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @option opts [String] :order The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC
|
|
237
|
+
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days.
|
|
238
|
+
# @option opts [String] :end_time The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time.
|
|
239
|
+
# @return [Array<V1CashDrawerShift>]
|
|
240
|
+
def list_cash_drawer_shifts(location_id, opts = {})
|
|
241
|
+
data, _status_code, _headers = list_cash_drawer_shifts_with_http_info(location_id, opts)
|
|
242
|
+
return data
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
|
|
246
|
+
# Provides the details for all of a location's cash drawer shifts during a date range. The date range you specify cannot exceed 90 days.
|
|
247
|
+
# @param location_id The ID of the location to list cash drawer shifts for.
|
|
248
|
+
# @param [Hash] opts the optional parameters
|
|
249
|
+
# @option opts [String] :order The order in which cash drawer shifts are listed in the response, based on their created_at field. Default value: ASC
|
|
250
|
+
# @option opts [String] :begin_time The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time minus 90 days.
|
|
251
|
+
# @option opts [String] :end_time The beginning of the requested reporting period, in ISO 8601 format. Default value: The current time.
|
|
252
|
+
# @return [Array<(Array<V1CashDrawerShift>, Fixnum, Hash)>] Array<V1CashDrawerShift> data, response status code and response headers
|
|
253
|
+
def list_cash_drawer_shifts_with_http_info(location_id, opts = {})
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.list_cash_drawer_shifts ..."
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'location_id' is set
|
|
258
|
+
fail ArgumentError, "Missing the required parameter 'location_id' when calling V1EmployeesApi.list_cash_drawer_shifts" if location_id.nil?
|
|
259
|
+
if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
|
|
260
|
+
fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
|
|
261
|
+
end
|
|
262
|
+
# resource path
|
|
263
|
+
local_var_path = "/v1/{location_id}/cash-drawer-shifts".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s)
|
|
264
|
+
|
|
265
|
+
# query parameters
|
|
266
|
+
query_params = {}
|
|
267
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
268
|
+
query_params[:'begin_time'] = opts[:'begin_time'] if !opts[:'begin_time'].nil?
|
|
269
|
+
query_params[:'end_time'] = opts[:'end_time'] if !opts[:'end_time'].nil?
|
|
270
|
+
|
|
271
|
+
# header parameters
|
|
272
|
+
header_params = {}
|
|
273
|
+
# HTTP header 'Accept' (if needed)
|
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
275
|
+
# HTTP header 'Content-Type'
|
|
276
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
277
|
+
|
|
278
|
+
# form parameters
|
|
279
|
+
form_params = {}
|
|
280
|
+
|
|
281
|
+
# http body (model)
|
|
282
|
+
post_body = nil
|
|
283
|
+
auth_names = ['oauth2']
|
|
284
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
285
|
+
:header_params => header_params,
|
|
286
|
+
:query_params => query_params,
|
|
287
|
+
:form_params => form_params,
|
|
288
|
+
:body => post_body,
|
|
289
|
+
:auth_names => auth_names,
|
|
290
|
+
:return_type => 'Array<V1CashDrawerShift>')
|
|
291
|
+
if @api_client.config.debugging
|
|
292
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#list_cash_drawer_shifts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
293
|
+
end
|
|
294
|
+
return data, status_code, headers
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# Provides summary information for all of a business's employee roles.
|
|
298
|
+
# Provides summary information for all of a business's employee roles.
|
|
299
|
+
# @param [Hash] opts the optional parameters
|
|
300
|
+
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
|
301
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
302
|
+
# @option opts [String] :cursor A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
|
303
|
+
# @return [Array<V1EmployeeRole>]
|
|
304
|
+
def list_employee_roles(opts = {})
|
|
305
|
+
data, _status_code, _headers = list_employee_roles_with_http_info(opts)
|
|
306
|
+
return data
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Provides summary information for all of a business's employee roles.
|
|
310
|
+
# Provides summary information for all of a business's employee roles.
|
|
311
|
+
# @param [Hash] opts the optional parameters
|
|
312
|
+
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field.Default value: ASC
|
|
313
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
314
|
+
# @option opts [String] :cursor A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
|
315
|
+
# @return [Array<(Array<V1EmployeeRole>, Fixnum, Hash)>] Array<V1EmployeeRole> data, response status code and response headers
|
|
316
|
+
def list_employee_roles_with_http_info(opts = {})
|
|
317
|
+
if @api_client.config.debugging
|
|
318
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.list_employee_roles ..."
|
|
319
|
+
end
|
|
320
|
+
if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
|
|
321
|
+
fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
|
|
322
|
+
end
|
|
323
|
+
if !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
324
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1EmployeesApi.list_employee_roles, must be smaller than or equal to 200.'
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# resource path
|
|
328
|
+
local_var_path = "/v1/me/roles".sub('{format}','json')
|
|
329
|
+
|
|
330
|
+
# query parameters
|
|
331
|
+
query_params = {}
|
|
332
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
333
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
334
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
335
|
+
|
|
336
|
+
# header parameters
|
|
337
|
+
header_params = {}
|
|
338
|
+
# HTTP header 'Accept' (if needed)
|
|
339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
340
|
+
# HTTP header 'Content-Type'
|
|
341
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
342
|
+
|
|
343
|
+
# form parameters
|
|
344
|
+
form_params = {}
|
|
345
|
+
|
|
346
|
+
# http body (model)
|
|
347
|
+
post_body = nil
|
|
348
|
+
auth_names = ['oauth2']
|
|
349
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
350
|
+
:header_params => header_params,
|
|
351
|
+
:query_params => query_params,
|
|
352
|
+
:form_params => form_params,
|
|
353
|
+
:body => post_body,
|
|
354
|
+
:auth_names => auth_names,
|
|
355
|
+
:return_type => 'Array<V1EmployeeRole>')
|
|
356
|
+
if @api_client.config.debugging
|
|
357
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#list_employee_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
358
|
+
end
|
|
359
|
+
return data, status_code, headers
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Provides summary information for all of a business's employees.
|
|
363
|
+
# Provides summary information for all of a business's employees.
|
|
364
|
+
# @param [Hash] opts the optional parameters
|
|
365
|
+
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field. Default value: ASC
|
|
366
|
+
# @option opts [String] :begin_updated_at If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format
|
|
367
|
+
# @option opts [String] :end_updated_at If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
368
|
+
# @option opts [String] :begin_created_at If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
369
|
+
# @option opts [String] :end_created_at If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
370
|
+
# @option opts [String] :status If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE).
|
|
371
|
+
# @option opts [String] :external_id If provided, the endpoint returns only employee entities with the specified external_id.
|
|
372
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
373
|
+
# @return [Array<V1Employee>]
|
|
374
|
+
def list_employees(opts = {})
|
|
375
|
+
data, _status_code, _headers = list_employees_with_http_info(opts)
|
|
376
|
+
return data
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Provides summary information for all of a business's employees.
|
|
380
|
+
# Provides summary information for all of a business's employees.
|
|
381
|
+
# @param [Hash] opts the optional parameters
|
|
382
|
+
# @option opts [String] :order The order in which employees are listed in the response, based on their created_at field. Default value: ASC
|
|
383
|
+
# @option opts [String] :begin_updated_at If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format
|
|
384
|
+
# @option opts [String] :end_updated_at If filtering results by there updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
385
|
+
# @option opts [String] :begin_created_at If filtering results by their created_at field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
386
|
+
# @option opts [String] :end_created_at If filtering results by their created_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
387
|
+
# @option opts [String] :status If provided, the endpoint returns only employee entities with the specified status (ACTIVE or INACTIVE).
|
|
388
|
+
# @option opts [String] :external_id If provided, the endpoint returns only employee entities with the specified external_id.
|
|
389
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
390
|
+
# @return [Array<(Array<V1Employee>, Fixnum, Hash)>] Array<V1Employee> data, response status code and response headers
|
|
391
|
+
def list_employees_with_http_info(opts = {})
|
|
392
|
+
if @api_client.config.debugging
|
|
393
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.list_employees ..."
|
|
394
|
+
end
|
|
395
|
+
if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
|
|
396
|
+
fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
|
|
397
|
+
end
|
|
398
|
+
if opts[:'status'] && !['ACTIVE', 'INACTIVE'].include?(opts[:'status'])
|
|
399
|
+
fail ArgumentError, 'invalid value for "status", must be one of ACTIVE, INACTIVE'
|
|
400
|
+
end
|
|
401
|
+
if !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
402
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1EmployeesApi.list_employees, must be smaller than or equal to 200.'
|
|
403
|
+
end
|
|
404
|
+
|
|
405
|
+
# resource path
|
|
406
|
+
local_var_path = "/v1/me/employees".sub('{format}','json')
|
|
407
|
+
|
|
408
|
+
# query parameters
|
|
409
|
+
query_params = {}
|
|
410
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
411
|
+
query_params[:'begin_updated_at'] = opts[:'begin_updated_at'] if !opts[:'begin_updated_at'].nil?
|
|
412
|
+
query_params[:'end_updated_at'] = opts[:'end_updated_at'] if !opts[:'end_updated_at'].nil?
|
|
413
|
+
query_params[:'begin_created_at'] = opts[:'begin_created_at'] if !opts[:'begin_created_at'].nil?
|
|
414
|
+
query_params[:'end_created_at'] = opts[:'end_created_at'] if !opts[:'end_created_at'].nil?
|
|
415
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
|
416
|
+
query_params[:'external_id'] = opts[:'external_id'] if !opts[:'external_id'].nil?
|
|
417
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
418
|
+
|
|
419
|
+
# header parameters
|
|
420
|
+
header_params = {}
|
|
421
|
+
# HTTP header 'Accept' (if needed)
|
|
422
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
423
|
+
# HTTP header 'Content-Type'
|
|
424
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
425
|
+
|
|
426
|
+
# form parameters
|
|
427
|
+
form_params = {}
|
|
428
|
+
|
|
429
|
+
# http body (model)
|
|
430
|
+
post_body = nil
|
|
431
|
+
auth_names = ['oauth2']
|
|
432
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
433
|
+
:header_params => header_params,
|
|
434
|
+
:query_params => query_params,
|
|
435
|
+
:form_params => form_params,
|
|
436
|
+
:body => post_body,
|
|
437
|
+
:auth_names => auth_names,
|
|
438
|
+
:return_type => 'Array<V1Employee>')
|
|
439
|
+
if @api_client.config.debugging
|
|
440
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#list_employees\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
441
|
+
end
|
|
442
|
+
return data, status_code, headers
|
|
443
|
+
end
|
|
444
|
+
|
|
445
|
+
# Provides summary information for all events associated with a particular timecard.
|
|
446
|
+
# Provides summary information for all events associated with a particular timecard.
|
|
447
|
+
# @param timecard_id The ID of the timecard to list events for.
|
|
448
|
+
# @param [Hash] opts the optional parameters
|
|
449
|
+
# @return [Array<V1TimecardEvent>]
|
|
450
|
+
def list_timecard_events(timecard_id, opts = {})
|
|
451
|
+
data, _status_code, _headers = list_timecard_events_with_http_info(timecard_id, opts)
|
|
452
|
+
return data
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
# Provides summary information for all events associated with a particular timecard.
|
|
456
|
+
# Provides summary information for all events associated with a particular timecard.
|
|
457
|
+
# @param timecard_id The ID of the timecard to list events for.
|
|
458
|
+
# @param [Hash] opts the optional parameters
|
|
459
|
+
# @return [Array<(Array<V1TimecardEvent>, Fixnum, Hash)>] Array<V1TimecardEvent> data, response status code and response headers
|
|
460
|
+
def list_timecard_events_with_http_info(timecard_id, opts = {})
|
|
461
|
+
if @api_client.config.debugging
|
|
462
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.list_timecard_events ..."
|
|
463
|
+
end
|
|
464
|
+
# verify the required parameter 'timecard_id' is set
|
|
465
|
+
fail ArgumentError, "Missing the required parameter 'timecard_id' when calling V1EmployeesApi.list_timecard_events" if timecard_id.nil?
|
|
466
|
+
# resource path
|
|
467
|
+
local_var_path = "/v1/me/timecards/{timecard_id}/events".sub('{format}','json').sub('{' + 'timecard_id' + '}', timecard_id.to_s)
|
|
468
|
+
|
|
469
|
+
# query parameters
|
|
470
|
+
query_params = {}
|
|
471
|
+
|
|
472
|
+
# header parameters
|
|
473
|
+
header_params = {}
|
|
474
|
+
# HTTP header 'Accept' (if needed)
|
|
475
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
476
|
+
# HTTP header 'Content-Type'
|
|
477
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
478
|
+
|
|
479
|
+
# form parameters
|
|
480
|
+
form_params = {}
|
|
481
|
+
|
|
482
|
+
# http body (model)
|
|
483
|
+
post_body = nil
|
|
484
|
+
auth_names = ['oauth2']
|
|
485
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
486
|
+
:header_params => header_params,
|
|
487
|
+
:query_params => query_params,
|
|
488
|
+
:form_params => form_params,
|
|
489
|
+
:body => post_body,
|
|
490
|
+
:auth_names => auth_names,
|
|
491
|
+
:return_type => 'Array<V1TimecardEvent>')
|
|
492
|
+
if @api_client.config.debugging
|
|
493
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#list_timecard_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
494
|
+
end
|
|
495
|
+
return data, status_code, headers
|
|
496
|
+
end
|
|
497
|
+
|
|
498
|
+
# Provides summary information for all of a business's employee timecards.
|
|
499
|
+
# Provides summary information for all of a business's employee timecards.
|
|
500
|
+
# @param [Hash] opts the optional parameters
|
|
501
|
+
# @option opts [String] :order The order in which timecards are listed in the response, based on their created_at field.
|
|
502
|
+
# @option opts [String] :employee_id If provided, the endpoint returns only timecards for the employee with the specified ID.
|
|
503
|
+
# @option opts [String] :begin_clockin_time If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
504
|
+
# @option opts [String] :end_clockin_time If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format.
|
|
505
|
+
# @option opts [String] :begin_clockout_time If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
506
|
+
# @option opts [String] :end_clockout_time If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format.
|
|
507
|
+
# @option opts [String] :begin_updated_at If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
508
|
+
# @option opts [String] :end_updated_at If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
509
|
+
# @option opts [BOOLEAN] :deleted If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned.
|
|
510
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
511
|
+
# @option opts [String] :cursor A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
|
512
|
+
# @return [Array<V1Timecard>]
|
|
513
|
+
def list_timecards(opts = {})
|
|
514
|
+
data, _status_code, _headers = list_timecards_with_http_info(opts)
|
|
515
|
+
return data
|
|
516
|
+
end
|
|
517
|
+
|
|
518
|
+
# Provides summary information for all of a business's employee timecards.
|
|
519
|
+
# Provides summary information for all of a business's employee timecards.
|
|
520
|
+
# @param [Hash] opts the optional parameters
|
|
521
|
+
# @option opts [String] :order The order in which timecards are listed in the response, based on their created_at field.
|
|
522
|
+
# @option opts [String] :employee_id If provided, the endpoint returns only timecards for the employee with the specified ID.
|
|
523
|
+
# @option opts [String] :begin_clockin_time If filtering results by their clockin_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
524
|
+
# @option opts [String] :end_clockin_time If filtering results by their clockin_time field, the end of the requested reporting period, in ISO 8601 format.
|
|
525
|
+
# @option opts [String] :begin_clockout_time If filtering results by their clockout_time field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
526
|
+
# @option opts [String] :end_clockout_time If filtering results by their clockout_time field, the end of the requested reporting period, in ISO 8601 format.
|
|
527
|
+
# @option opts [String] :begin_updated_at If filtering results by their updated_at field, the beginning of the requested reporting period, in ISO 8601 format.
|
|
528
|
+
# @option opts [String] :end_updated_at If filtering results by their updated_at field, the end of the requested reporting period, in ISO 8601 format.
|
|
529
|
+
# @option opts [BOOLEAN] :deleted If true, only deleted timecards are returned. If false, only valid timecards are returned.If you don't provide this parameter, both valid and deleted timecards are returned.
|
|
530
|
+
# @option opts [Integer] :limit The maximum integer number of employee entities to return in a single response. Default 100, maximum 200.
|
|
531
|
+
# @option opts [String] :cursor A pagination cursor to retrieve the next set of results for your original query to the endpoint.
|
|
532
|
+
# @return [Array<(Array<V1Timecard>, Fixnum, Hash)>] Array<V1Timecard> data, response status code and response headers
|
|
533
|
+
def list_timecards_with_http_info(opts = {})
|
|
534
|
+
if @api_client.config.debugging
|
|
535
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.list_timecards ..."
|
|
536
|
+
end
|
|
537
|
+
if opts[:'order'] && !['ASC', 'DESC'].include?(opts[:'order'])
|
|
538
|
+
fail ArgumentError, 'invalid value for "order", must be one of ASC, DESC'
|
|
539
|
+
end
|
|
540
|
+
if !opts[:'limit'].nil? && opts[:'limit'] > 200
|
|
541
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling V1EmployeesApi.list_timecards, must be smaller than or equal to 200.'
|
|
542
|
+
end
|
|
543
|
+
|
|
544
|
+
# resource path
|
|
545
|
+
local_var_path = "/v1/me/timecards".sub('{format}','json')
|
|
546
|
+
|
|
547
|
+
# query parameters
|
|
548
|
+
query_params = {}
|
|
549
|
+
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
|
550
|
+
query_params[:'employee_id'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
|
|
551
|
+
query_params[:'begin_clockin_time'] = opts[:'begin_clockin_time'] if !opts[:'begin_clockin_time'].nil?
|
|
552
|
+
query_params[:'end_clockin_time'] = opts[:'end_clockin_time'] if !opts[:'end_clockin_time'].nil?
|
|
553
|
+
query_params[:'begin_clockout_time'] = opts[:'begin_clockout_time'] if !opts[:'begin_clockout_time'].nil?
|
|
554
|
+
query_params[:'end_clockout_time'] = opts[:'end_clockout_time'] if !opts[:'end_clockout_time'].nil?
|
|
555
|
+
query_params[:'begin_updated_at'] = opts[:'begin_updated_at'] if !opts[:'begin_updated_at'].nil?
|
|
556
|
+
query_params[:'end_updated_at'] = opts[:'end_updated_at'] if !opts[:'end_updated_at'].nil?
|
|
557
|
+
query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil?
|
|
558
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
|
559
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
|
560
|
+
|
|
561
|
+
# header parameters
|
|
562
|
+
header_params = {}
|
|
563
|
+
# HTTP header 'Accept' (if needed)
|
|
564
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
565
|
+
# HTTP header 'Content-Type'
|
|
566
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
567
|
+
|
|
568
|
+
# form parameters
|
|
569
|
+
form_params = {}
|
|
570
|
+
|
|
571
|
+
# http body (model)
|
|
572
|
+
post_body = nil
|
|
573
|
+
auth_names = ['oauth2']
|
|
574
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
575
|
+
:header_params => header_params,
|
|
576
|
+
:query_params => query_params,
|
|
577
|
+
:form_params => form_params,
|
|
578
|
+
:body => post_body,
|
|
579
|
+
:auth_names => auth_names,
|
|
580
|
+
:return_type => 'Array<V1Timecard>')
|
|
581
|
+
if @api_client.config.debugging
|
|
582
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#list_timecards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
583
|
+
end
|
|
584
|
+
return data, status_code, headers
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
# Provides the details for a single cash drawer shift, including all events that occurred during the shift.
|
|
588
|
+
# Provides the details for a single cash drawer shift, including all events that occurred during the shift.
|
|
589
|
+
# @param location_id The ID of the location to list cash drawer shifts for.
|
|
590
|
+
# @param shift_id The shift's ID.
|
|
591
|
+
# @param [Hash] opts the optional parameters
|
|
592
|
+
# @return [V1CashDrawerShift]
|
|
593
|
+
def retrieve_cash_drawer_shift(location_id, shift_id, opts = {})
|
|
594
|
+
data, _status_code, _headers = retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts)
|
|
595
|
+
return data
|
|
596
|
+
end
|
|
597
|
+
|
|
598
|
+
# Provides the details for a single cash drawer shift, including all events that occurred during the shift.
|
|
599
|
+
# Provides the details for a single cash drawer shift, including all events that occurred during the shift.
|
|
600
|
+
# @param location_id The ID of the location to list cash drawer shifts for.
|
|
601
|
+
# @param shift_id The shift's ID.
|
|
602
|
+
# @param [Hash] opts the optional parameters
|
|
603
|
+
# @return [Array<(V1CashDrawerShift, Fixnum, Hash)>] V1CashDrawerShift data, response status code and response headers
|
|
604
|
+
def retrieve_cash_drawer_shift_with_http_info(location_id, shift_id, opts = {})
|
|
605
|
+
if @api_client.config.debugging
|
|
606
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.retrieve_cash_drawer_shift ..."
|
|
607
|
+
end
|
|
608
|
+
# verify the required parameter 'location_id' is set
|
|
609
|
+
fail ArgumentError, "Missing the required parameter 'location_id' when calling V1EmployeesApi.retrieve_cash_drawer_shift" if location_id.nil?
|
|
610
|
+
# verify the required parameter 'shift_id' is set
|
|
611
|
+
fail ArgumentError, "Missing the required parameter 'shift_id' when calling V1EmployeesApi.retrieve_cash_drawer_shift" if shift_id.nil?
|
|
612
|
+
# resource path
|
|
613
|
+
local_var_path = "/v1/{location_id}/cash-drawer-shifts/{shift_id}".sub('{format}','json').sub('{' + 'location_id' + '}', location_id.to_s).sub('{' + 'shift_id' + '}', shift_id.to_s)
|
|
614
|
+
|
|
615
|
+
# query parameters
|
|
616
|
+
query_params = {}
|
|
617
|
+
|
|
618
|
+
# header parameters
|
|
619
|
+
header_params = {}
|
|
620
|
+
# HTTP header 'Accept' (if needed)
|
|
621
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
622
|
+
# HTTP header 'Content-Type'
|
|
623
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
624
|
+
|
|
625
|
+
# form parameters
|
|
626
|
+
form_params = {}
|
|
627
|
+
|
|
628
|
+
# http body (model)
|
|
629
|
+
post_body = nil
|
|
630
|
+
auth_names = ['oauth2']
|
|
631
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
632
|
+
:header_params => header_params,
|
|
633
|
+
:query_params => query_params,
|
|
634
|
+
:form_params => form_params,
|
|
635
|
+
:body => post_body,
|
|
636
|
+
:auth_names => auth_names,
|
|
637
|
+
:return_type => 'V1CashDrawerShift')
|
|
638
|
+
if @api_client.config.debugging
|
|
639
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#retrieve_cash_drawer_shift\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
640
|
+
end
|
|
641
|
+
return data, status_code, headers
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
# Provides the details for a single employee.
|
|
645
|
+
# Provides the details for a single employee.
|
|
646
|
+
# @param employee_id The employee's ID.
|
|
647
|
+
# @param [Hash] opts the optional parameters
|
|
648
|
+
# @return [V1Employee]
|
|
649
|
+
def retrieve_employee(employee_id, opts = {})
|
|
650
|
+
data, _status_code, _headers = retrieve_employee_with_http_info(employee_id, opts)
|
|
651
|
+
return data
|
|
652
|
+
end
|
|
653
|
+
|
|
654
|
+
# Provides the details for a single employee.
|
|
655
|
+
# Provides the details for a single employee.
|
|
656
|
+
# @param employee_id The employee's ID.
|
|
657
|
+
# @param [Hash] opts the optional parameters
|
|
658
|
+
# @return [Array<(V1Employee, Fixnum, Hash)>] V1Employee data, response status code and response headers
|
|
659
|
+
def retrieve_employee_with_http_info(employee_id, opts = {})
|
|
660
|
+
if @api_client.config.debugging
|
|
661
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.retrieve_employee ..."
|
|
662
|
+
end
|
|
663
|
+
# verify the required parameter 'employee_id' is set
|
|
664
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling V1EmployeesApi.retrieve_employee" if employee_id.nil?
|
|
665
|
+
# resource path
|
|
666
|
+
local_var_path = "/v1/me/employees/{employee_id}".sub('{format}','json').sub('{' + 'employee_id' + '}', employee_id.to_s)
|
|
667
|
+
|
|
668
|
+
# query parameters
|
|
669
|
+
query_params = {}
|
|
670
|
+
|
|
671
|
+
# header parameters
|
|
672
|
+
header_params = {}
|
|
673
|
+
# HTTP header 'Accept' (if needed)
|
|
674
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
675
|
+
# HTTP header 'Content-Type'
|
|
676
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
677
|
+
|
|
678
|
+
# form parameters
|
|
679
|
+
form_params = {}
|
|
680
|
+
|
|
681
|
+
# http body (model)
|
|
682
|
+
post_body = nil
|
|
683
|
+
auth_names = ['oauth2']
|
|
684
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
685
|
+
:header_params => header_params,
|
|
686
|
+
:query_params => query_params,
|
|
687
|
+
:form_params => form_params,
|
|
688
|
+
:body => post_body,
|
|
689
|
+
:auth_names => auth_names,
|
|
690
|
+
:return_type => 'V1Employee')
|
|
691
|
+
if @api_client.config.debugging
|
|
692
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#retrieve_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
693
|
+
end
|
|
694
|
+
return data, status_code, headers
|
|
695
|
+
end
|
|
696
|
+
|
|
697
|
+
# Provides the details for a single employee role.
|
|
698
|
+
# Provides the details for a single employee role.
|
|
699
|
+
# @param role_id The role's ID.
|
|
700
|
+
# @param [Hash] opts the optional parameters
|
|
701
|
+
# @return [V1EmployeeRole]
|
|
702
|
+
def retrieve_employee_role(role_id, opts = {})
|
|
703
|
+
data, _status_code, _headers = retrieve_employee_role_with_http_info(role_id, opts)
|
|
704
|
+
return data
|
|
705
|
+
end
|
|
706
|
+
|
|
707
|
+
# Provides the details for a single employee role.
|
|
708
|
+
# Provides the details for a single employee role.
|
|
709
|
+
# @param role_id The role's ID.
|
|
710
|
+
# @param [Hash] opts the optional parameters
|
|
711
|
+
# @return [Array<(V1EmployeeRole, Fixnum, Hash)>] V1EmployeeRole data, response status code and response headers
|
|
712
|
+
def retrieve_employee_role_with_http_info(role_id, opts = {})
|
|
713
|
+
if @api_client.config.debugging
|
|
714
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.retrieve_employee_role ..."
|
|
715
|
+
end
|
|
716
|
+
# verify the required parameter 'role_id' is set
|
|
717
|
+
fail ArgumentError, "Missing the required parameter 'role_id' when calling V1EmployeesApi.retrieve_employee_role" if role_id.nil?
|
|
718
|
+
# resource path
|
|
719
|
+
local_var_path = "/v1/me/roles/{role_id}".sub('{format}','json').sub('{' + 'role_id' + '}', role_id.to_s)
|
|
720
|
+
|
|
721
|
+
# query parameters
|
|
722
|
+
query_params = {}
|
|
723
|
+
|
|
724
|
+
# header parameters
|
|
725
|
+
header_params = {}
|
|
726
|
+
# HTTP header 'Accept' (if needed)
|
|
727
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
728
|
+
# HTTP header 'Content-Type'
|
|
729
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
730
|
+
|
|
731
|
+
# form parameters
|
|
732
|
+
form_params = {}
|
|
733
|
+
|
|
734
|
+
# http body (model)
|
|
735
|
+
post_body = nil
|
|
736
|
+
auth_names = ['oauth2']
|
|
737
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
738
|
+
:header_params => header_params,
|
|
739
|
+
:query_params => query_params,
|
|
740
|
+
:form_params => form_params,
|
|
741
|
+
:body => post_body,
|
|
742
|
+
:auth_names => auth_names,
|
|
743
|
+
:return_type => 'V1EmployeeRole')
|
|
744
|
+
if @api_client.config.debugging
|
|
745
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#retrieve_employee_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
746
|
+
end
|
|
747
|
+
return data, status_code, headers
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
# Provides the details for a single timecard.
|
|
751
|
+
# Provides the details for a single timecard.
|
|
752
|
+
# @param timecard_id The timecard's ID.
|
|
753
|
+
# @param [Hash] opts the optional parameters
|
|
754
|
+
# @return [V1Timecard]
|
|
755
|
+
def retrieve_timecard(timecard_id, opts = {})
|
|
756
|
+
data, _status_code, _headers = retrieve_timecard_with_http_info(timecard_id, opts)
|
|
757
|
+
return data
|
|
758
|
+
end
|
|
759
|
+
|
|
760
|
+
# Provides the details for a single timecard.
|
|
761
|
+
# Provides the details for a single timecard.
|
|
762
|
+
# @param timecard_id The timecard's ID.
|
|
763
|
+
# @param [Hash] opts the optional parameters
|
|
764
|
+
# @return [Array<(V1Timecard, Fixnum, Hash)>] V1Timecard data, response status code and response headers
|
|
765
|
+
def retrieve_timecard_with_http_info(timecard_id, opts = {})
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.retrieve_timecard ..."
|
|
768
|
+
end
|
|
769
|
+
# verify the required parameter 'timecard_id' is set
|
|
770
|
+
fail ArgumentError, "Missing the required parameter 'timecard_id' when calling V1EmployeesApi.retrieve_timecard" if timecard_id.nil?
|
|
771
|
+
# resource path
|
|
772
|
+
local_var_path = "/v1/me/timecards/{timecard_id}".sub('{format}','json').sub('{' + 'timecard_id' + '}', timecard_id.to_s)
|
|
773
|
+
|
|
774
|
+
# query parameters
|
|
775
|
+
query_params = {}
|
|
776
|
+
|
|
777
|
+
# header parameters
|
|
778
|
+
header_params = {}
|
|
779
|
+
# HTTP header 'Accept' (if needed)
|
|
780
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
781
|
+
# HTTP header 'Content-Type'
|
|
782
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
783
|
+
|
|
784
|
+
# form parameters
|
|
785
|
+
form_params = {}
|
|
786
|
+
|
|
787
|
+
# http body (model)
|
|
788
|
+
post_body = nil
|
|
789
|
+
auth_names = ['oauth2']
|
|
790
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
791
|
+
:header_params => header_params,
|
|
792
|
+
:query_params => query_params,
|
|
793
|
+
:form_params => form_params,
|
|
794
|
+
:body => post_body,
|
|
795
|
+
:auth_names => auth_names,
|
|
796
|
+
:return_type => 'V1Timecard')
|
|
797
|
+
if @api_client.config.debugging
|
|
798
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#retrieve_timecard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
799
|
+
end
|
|
800
|
+
return data, status_code, headers
|
|
801
|
+
end
|
|
802
|
+
|
|
803
|
+
# V1 UpdateEmployee
|
|
804
|
+
#
|
|
805
|
+
# @param employee_id The ID of the role to modify.
|
|
806
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
807
|
+
# @param [Hash] opts the optional parameters
|
|
808
|
+
# @return [V1Employee]
|
|
809
|
+
def update_employee(employee_id, body, opts = {})
|
|
810
|
+
data, _status_code, _headers = update_employee_with_http_info(employee_id, body, opts)
|
|
811
|
+
return data
|
|
812
|
+
end
|
|
813
|
+
|
|
814
|
+
# V1 UpdateEmployee
|
|
815
|
+
#
|
|
816
|
+
# @param employee_id The ID of the role to modify.
|
|
817
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
818
|
+
# @param [Hash] opts the optional parameters
|
|
819
|
+
# @return [Array<(V1Employee, Fixnum, Hash)>] V1Employee data, response status code and response headers
|
|
820
|
+
def update_employee_with_http_info(employee_id, body, opts = {})
|
|
821
|
+
if @api_client.config.debugging
|
|
822
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.update_employee ..."
|
|
823
|
+
end
|
|
824
|
+
# verify the required parameter 'employee_id' is set
|
|
825
|
+
fail ArgumentError, "Missing the required parameter 'employee_id' when calling V1EmployeesApi.update_employee" if employee_id.nil?
|
|
826
|
+
# verify the required parameter 'body' is set
|
|
827
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V1EmployeesApi.update_employee" if body.nil?
|
|
828
|
+
# resource path
|
|
829
|
+
local_var_path = "/v1/me/employees/{employee_id}".sub('{format}','json').sub('{' + 'employee_id' + '}', employee_id.to_s)
|
|
830
|
+
|
|
831
|
+
# query parameters
|
|
832
|
+
query_params = {}
|
|
833
|
+
|
|
834
|
+
# header parameters
|
|
835
|
+
header_params = {}
|
|
836
|
+
# HTTP header 'Accept' (if needed)
|
|
837
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
838
|
+
# HTTP header 'Content-Type'
|
|
839
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
840
|
+
|
|
841
|
+
# form parameters
|
|
842
|
+
form_params = {}
|
|
843
|
+
|
|
844
|
+
# http body (model)
|
|
845
|
+
post_body = @api_client.object_to_http_body(body)
|
|
846
|
+
auth_names = ['oauth2']
|
|
847
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
848
|
+
:header_params => header_params,
|
|
849
|
+
:query_params => query_params,
|
|
850
|
+
:form_params => form_params,
|
|
851
|
+
:body => post_body,
|
|
852
|
+
:auth_names => auth_names,
|
|
853
|
+
:return_type => 'V1Employee')
|
|
854
|
+
if @api_client.config.debugging
|
|
855
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#update_employee\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
856
|
+
end
|
|
857
|
+
return data, status_code, headers
|
|
858
|
+
end
|
|
859
|
+
|
|
860
|
+
# Modifies the details of an employee role.
|
|
861
|
+
# Modifies the details of an employee role.
|
|
862
|
+
# @param role_id The ID of the role to modify.
|
|
863
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
864
|
+
# @param [Hash] opts the optional parameters
|
|
865
|
+
# @return [V1EmployeeRole]
|
|
866
|
+
def update_employee_role(role_id, body, opts = {})
|
|
867
|
+
data, _status_code, _headers = update_employee_role_with_http_info(role_id, body, opts)
|
|
868
|
+
return data
|
|
869
|
+
end
|
|
870
|
+
|
|
871
|
+
# Modifies the details of an employee role.
|
|
872
|
+
# Modifies the details of an employee role.
|
|
873
|
+
# @param role_id The ID of the role to modify.
|
|
874
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
875
|
+
# @param [Hash] opts the optional parameters
|
|
876
|
+
# @return [Array<(V1EmployeeRole, Fixnum, Hash)>] V1EmployeeRole data, response status code and response headers
|
|
877
|
+
def update_employee_role_with_http_info(role_id, body, opts = {})
|
|
878
|
+
if @api_client.config.debugging
|
|
879
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.update_employee_role ..."
|
|
880
|
+
end
|
|
881
|
+
# verify the required parameter 'role_id' is set
|
|
882
|
+
fail ArgumentError, "Missing the required parameter 'role_id' when calling V1EmployeesApi.update_employee_role" if role_id.nil?
|
|
883
|
+
# verify the required parameter 'body' is set
|
|
884
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V1EmployeesApi.update_employee_role" if body.nil?
|
|
885
|
+
# resource path
|
|
886
|
+
local_var_path = "/v1/me/roles/{role_id}".sub('{format}','json').sub('{' + 'role_id' + '}', role_id.to_s)
|
|
887
|
+
|
|
888
|
+
# query parameters
|
|
889
|
+
query_params = {}
|
|
890
|
+
|
|
891
|
+
# header parameters
|
|
892
|
+
header_params = {}
|
|
893
|
+
# HTTP header 'Accept' (if needed)
|
|
894
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
895
|
+
# HTTP header 'Content-Type'
|
|
896
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
897
|
+
|
|
898
|
+
# form parameters
|
|
899
|
+
form_params = {}
|
|
900
|
+
|
|
901
|
+
# http body (model)
|
|
902
|
+
post_body = @api_client.object_to_http_body(body)
|
|
903
|
+
auth_names = ['oauth2']
|
|
904
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
905
|
+
:header_params => header_params,
|
|
906
|
+
:query_params => query_params,
|
|
907
|
+
:form_params => form_params,
|
|
908
|
+
:body => post_body,
|
|
909
|
+
:auth_names => auth_names,
|
|
910
|
+
:return_type => 'V1EmployeeRole')
|
|
911
|
+
if @api_client.config.debugging
|
|
912
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#update_employee_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
913
|
+
end
|
|
914
|
+
return data, status_code, headers
|
|
915
|
+
end
|
|
916
|
+
|
|
917
|
+
# Modifies a timecard's details. This creates an API_EDIT event for the timecard. You can view a timecard's event history with the List Timecard Events endpoint.
|
|
918
|
+
# Modifies a timecard's details. This creates an API_EDIT event for the timecard. You can view a timecard's event history with the List Timecard Events endpoint.
|
|
919
|
+
# @param timecard_id TThe ID of the timecard to modify.
|
|
920
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
921
|
+
# @param [Hash] opts the optional parameters
|
|
922
|
+
# @return [V1Timecard]
|
|
923
|
+
def update_timecard(timecard_id, body, opts = {})
|
|
924
|
+
data, _status_code, _headers = update_timecard_with_http_info(timecard_id, body, opts)
|
|
925
|
+
return data
|
|
926
|
+
end
|
|
927
|
+
|
|
928
|
+
# Modifies a timecard's details. This creates an API_EDIT event for the timecard. You can view a timecard's event history with the List Timecard Events endpoint.
|
|
929
|
+
# Modifies a timecard's details. This creates an API_EDIT event for the timecard. You can view a timecard's event history with the List Timecard Events endpoint.
|
|
930
|
+
# @param timecard_id TThe ID of the timecard to modify.
|
|
931
|
+
# @param body An object containing the fields to POST for the request. See the corresponding object definition for field details.
|
|
932
|
+
# @param [Hash] opts the optional parameters
|
|
933
|
+
# @return [Array<(V1Timecard, Fixnum, Hash)>] V1Timecard data, response status code and response headers
|
|
934
|
+
def update_timecard_with_http_info(timecard_id, body, opts = {})
|
|
935
|
+
if @api_client.config.debugging
|
|
936
|
+
@api_client.config.logger.debug "Calling API: V1EmployeesApi.update_timecard ..."
|
|
937
|
+
end
|
|
938
|
+
# verify the required parameter 'timecard_id' is set
|
|
939
|
+
fail ArgumentError, "Missing the required parameter 'timecard_id' when calling V1EmployeesApi.update_timecard" if timecard_id.nil?
|
|
940
|
+
# verify the required parameter 'body' is set
|
|
941
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling V1EmployeesApi.update_timecard" if body.nil?
|
|
942
|
+
# resource path
|
|
943
|
+
local_var_path = "/v1/me/timecards/{timecard_id}".sub('{format}','json').sub('{' + 'timecard_id' + '}', timecard_id.to_s)
|
|
944
|
+
|
|
945
|
+
# query parameters
|
|
946
|
+
query_params = {}
|
|
947
|
+
|
|
948
|
+
# header parameters
|
|
949
|
+
header_params = {}
|
|
950
|
+
# HTTP header 'Accept' (if needed)
|
|
951
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
952
|
+
# HTTP header 'Content-Type'
|
|
953
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
954
|
+
|
|
955
|
+
# form parameters
|
|
956
|
+
form_params = {}
|
|
957
|
+
|
|
958
|
+
# http body (model)
|
|
959
|
+
post_body = @api_client.object_to_http_body(body)
|
|
960
|
+
auth_names = ['oauth2']
|
|
961
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
|
962
|
+
:header_params => header_params,
|
|
963
|
+
:query_params => query_params,
|
|
964
|
+
:form_params => form_params,
|
|
965
|
+
:body => post_body,
|
|
966
|
+
:auth_names => auth_names,
|
|
967
|
+
:return_type => 'V1Timecard')
|
|
968
|
+
if @api_client.config.debugging
|
|
969
|
+
@api_client.config.logger.debug "API called: V1EmployeesApi#update_timecard\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
970
|
+
end
|
|
971
|
+
return data, status_code, headers
|
|
972
|
+
end
|
|
973
|
+
end
|
|
974
|
+
end
|