Skip to content

Client object creation is odd for at least dates #105

@Seanstoppable

Description

@Seanstoppable

Creating a client model with dates looks like:

IrisHub::Models::PlannedShipment.new(:datetime => '2014-01-01')

Note that this is a string. A user can not just pass a valid date object as it throws an error

IrisHub::Models::PlannedShipment.new(:datetime => Time.now)
NoMethodError: private method `gsub!' called for Thu Jul 24 12:23:10 -0400 2014:Time

This seems wrong that a user needs to coerce a date into a string so it can be turned into a date so it can be serialized as a string.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions