Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Change Log

## Version 2.20190313.1 (2019-03-21)

### Bug Fix: Connect v1

* Change `timecard_id` as path parameter for `ListTimecardEvents` endpoint
* Change `ended_at` to string type for `V1CashDrawerShift` type

## Version 2.20190313.0 (2019-03-13)

## New API: Labor API
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for the specification and template files we used to generate this.
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2.0
- Package version: 2.20190313.0
- Package version: 2.20190313.1
- Build package: io.swagger.codegen.languages.RubyClientCodegen

For more information, please visit [https://squareup.com/developers](https://squareup.com/developers)
Expand Down
2 changes: 1 addition & 1 deletion docs/V1CashDrawerShift.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Name | Type | Description | Notes
**id** | **String** | The shift's unique ID. | [optional]
**event_type** | **String** | The shift's current state. See [V1CashDrawerShiftEventType](#type-v1cashdrawershifteventtype) for possible values | [optional]
**opened_at** | **String** | The time when the shift began, in ISO 8601 format. | [optional]
**ended_at** | **BOOLEAN** | The time when the shift ended, in ISO 8601 format. | [optional]
**ended_at** | **String** | The time when the shift ended, in ISO 8601 format. | [optional]
**closed_at** | **String** | The time when the shift was closed, in ISO 8601 format. | [optional]
**employee_ids** | **Array<String>** | The IDs of all employees that were logged into Square Register at some point during the cash drawer shift. | [optional]
**opening_employee_id** | **String** | The ID of the employee that started the cash drawer shift. | [optional]
Expand Down
1 change: 0 additions & 1 deletion docs/V1ListTimecardEventsRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**timecard_id** | **String** | The ID of the timecard to list events for. |


3 changes: 1 addition & 2 deletions lib/square_connect/api/v1_employees_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,10 @@ def list_timecard_events_with_http_info(timecard_id, opts = {})
# verify the required parameter 'timecard_id' is set
fail ArgumentError, "Missing the required parameter 'timecard_id' when calling V1EmployeesApi.list_timecard_events" if timecard_id.nil?
# resource path
local_var_path = "/v1/me/timecards/{timecard_id}/events".sub('{format}','json')
local_var_path = "/v1/me/timecards/{timecard_id}/events".sub('{format}','json').sub('{' + 'timecard_id' + '}', timecard_id.to_s)

# query parameters
query_params = {}
query_params[:'timecard_id'] = timecard_id

# header parameters
header_params = {}
Expand Down
2 changes: 1 addition & 1 deletion lib/square_connect/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def initialize(config = Configuration.default)
@config = config

# Construct user agent string. Returns slightly different string for JRuby
@user_agent = "Square-Connect-Ruby/2.20190313.0"
@user_agent = "Square-Connect-Ruby/2.20190313.1"

@default_headers = {
'Content-Type' => "application/json",
Expand Down
2 changes: 1 addition & 1 deletion lib/square_connect/models/v1_cash_drawer_shift.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def self.swagger_types
:'id' => :'String',
:'event_type' => :'String',
:'opened_at' => :'String',
:'ended_at' => :'BOOLEAN',
:'ended_at' => :'String',
:'closed_at' => :'String',
:'employee_ids' => :'Array<String>',
:'opening_employee_id' => :'String',
Expand Down
19 changes: 2 additions & 17 deletions lib/square_connect/models/v1_list_timecard_events_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@
module SquareConnect
#
class V1ListTimecardEventsRequest
# The ID of the timecard to list events for.
attr_accessor :timecard_id


# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'timecard_id' => :'timecard_id'
}
end

# Attribute type mapping.
def self.swagger_types
{
:'timecard_id' => :'String'
}
end

Expand All @@ -38,36 +33,26 @@ def initialize(attributes = {})
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}

if attributes.has_key?(:'timecard_id')
self.timecard_id = attributes[:'timecard_id']
end

end

# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properies with the reasons
def list_invalid_properties
invalid_properties = Array.new
if @timecard_id.nil?
invalid_properties.push("invalid value for 'timecard_id', timecard_id cannot be nil.")
end

return invalid_properties
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
return false if @timecard_id.nil?
return true
end

# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
timecard_id == o.timecard_id
self.class == o.class
end

# @see the `==` method
Expand All @@ -79,7 +64,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
[timecard_id].hash
[].hash
end

# Builds the object from hash
Expand Down
2 changes: 1 addition & 1 deletion lib/square_connect/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
=end

module SquareConnect
VERSION = "2.20190313.0"
VERSION = "2.20190313.1"
end