Class: SwaggerClient::PayrollApi
- Inherits:
-
Object
- Object
- SwaggerClient::PayrollApi
- Defined in:
- lib/swagger_client/api/payroll_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ PayrollApi
constructor
A new instance of PayrollApi.
-
#payroll_get_class_payroll(site_id, version, opts = {}) ⇒ GetClassPayrollResponse
Get class payroll for staff members.
-
#payroll_get_class_payroll_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassPayrollResponse, Fixnum, Hash)>
Get class payroll for staff members.
-
#payroll_get_time_clock(site_id, version, opts = {}) ⇒ GetTimeClockResponse
Get time card payroll for staff members.
-
#payroll_get_time_clock_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetTimeClockResponse, Fixnum, Hash)>
Get time card payroll for staff members.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PayrollApi
Returns a new instance of PayrollApi.
19 20 21 |
# File 'lib/swagger_client/api/payroll_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/swagger_client/api/payroll_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#payroll_get_class_payroll(site_id, version, opts = {}) ⇒ GetClassPayrollResponse
Get class payroll for staff members. A staff authorization token is not required for this endpoint, but if one is passed, its permissions are honored. Depending on the access permissions configured for the staff member whose token is passed, the endpoint returns either only the payroll information for that staff member or it returns the payroll information for all staff members. Note that if a staff member is not paid for a class, earnings of zero are returned by this endpoint. Note that this endpoint calculates both bonus and no-reg rates for assistants.These rates are not supported by the Payroll report in the web interface. Note that this endpoint returns both the teacher’s adjusted rate and the assistant’s pay rate when the assistant is paid by the teacher.The Payroll report in the web interface only returns the teacher’s adjusted rate.
35 36 37 38 |
# File 'lib/swagger_client/api/payroll_api.rb', line 35 def payroll_get_class_payroll(site_id, version, opts = {}) data, _status_code, _headers = payroll_get_class_payroll_with_http_info(site_id, version, opts) data end |
#payroll_get_class_payroll_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetClassPayrollResponse, Fixnum, Hash)>
Get class payroll for staff members. A staff authorization token is not required for this endpoint, but if one is passed, its permissions are honored. Depending on the access permissions configured for the staff member whose token is passed, the endpoint returns either only the payroll information for that staff member or it returns the payroll information for all staff members. Note that if a staff member is not paid for a class, earnings of zero are returned by this endpoint. Note that this endpoint calculates both bonus and no-reg rates for assistants.These rates are not supported by the Payroll report in the web interface. Note that this endpoint returns both the teacher’s adjusted rate and the assistant’s pay rate when the assistant is paid by the teacher.The Payroll report in the web interface only returns the teacher’s adjusted rate.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/swagger_client/api/payroll_api.rb', line 53 def payroll_get_class_payroll_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayrollApi.payroll_get_class_payroll ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling PayrollApi.payroll_get_class_payroll" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling PayrollApi.payroll_get_class_payroll" end # resource path local_var_path = '/public/v{version}/payroll/classes'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil? query_params[:'request.includeInactiveStaff'] = opts[:'request_include_inactive_staff'] if !opts[:'request_include_inactive_staff'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil? query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetClassPayrollResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayrollApi#payroll_get_class_payroll\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#payroll_get_time_clock(site_id, version, opts = {}) ⇒ GetTimeClockResponse
Get time card payroll for staff members.
114 115 116 117 |
# File 'lib/swagger_client/api/payroll_api.rb', line 114 def payroll_get_time_clock(site_id, version, opts = {}) data, _status_code, _headers = payroll_get_time_clock_with_http_info(site_id, version, opts) data end |
#payroll_get_time_clock_with_http_info(site_id, version, opts = {}) ⇒ Array<(GetTimeClockResponse, Fixnum, Hash)>
Get time card payroll for staff members.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/swagger_client/api/payroll_api.rb', line 131 def payroll_get_time_clock_with_http_info(site_id, version, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PayrollApi.payroll_get_time_clock ...' end # verify the required parameter 'site_id' is set if @api_client.config.client_side_validation && site_id.nil? fail ArgumentError, "Missing the required parameter 'site_id' when calling PayrollApi.payroll_get_time_clock" end # verify the required parameter 'version' is set if @api_client.config.client_side_validation && version.nil? fail ArgumentError, "Missing the required parameter 'version' when calling PayrollApi.payroll_get_time_clock" end # resource path local_var_path = '/public/v{version}/payroll/timeclock'.sub('{' + 'version' + '}', version.to_s) # query parameters query_params = {} query_params[:'request.endDateTime'] = opts[:'request_end_date_time'] if !opts[:'request_end_date_time'].nil? query_params[:'request.includeInactiveStaff'] = opts[:'request_include_inactive_staff'] if !opts[:'request_include_inactive_staff'].nil? query_params[:'request.limit'] = opts[:'request_limit'] if !opts[:'request_limit'].nil? query_params[:'request.offset'] = opts[:'request_offset'] if !opts[:'request_offset'].nil? query_params[:'request.staffId'] = opts[:'request_staff_id'] if !opts[:'request_staff_id'].nil? query_params[:'request.startDateTime'] = opts[:'request_start_date_time'] if !opts[:'request_start_date_time'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml', 'multipart/form-data']) header_params[:'siteId'] = site_id header_params[:'authorization'] = opts[:'authorization'] if !opts[:'authorization'].nil? # form parameters form_params = {} # http body (model) post_body = nil auth_names = [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GetTimeClockResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: PayrollApi#payroll_get_time_clock\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |