Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated expires_on attributes #156

Merged
merged 2 commits into from
Apr 21, 2021
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## main

- REMOVED: Deprecated attribute `expires_on` has been rmeoved from `Dnsimple.Domain` (dnsimple/dnsimple-elixir#156)
- CHANGED: Fix warning about ExvcrUtils (dnsimple/dnsimple-elixir#139)
- CHANGED: `Dnsimple.Domain` struct now has `expires_at` (timestamp) to be used in favor of `expires_on` (date only).
(dnsimple/dnsimple-elixir#135)
Expand Down
4 changes: 1 addition & 3 deletions lib/dnsimple/certificate.ex
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ defmodule Dnsimple.Certificate do
- https://developer.dnsimple.com/v2/certificates/#certificate-attributes
"""

@doc "expires_on is deprecated in favor of expires_at"
@type t :: %__MODULE__{
id: integer,
domain_id: integer,
Expand All @@ -28,7 +27,6 @@ defmodule Dnsimple.Certificate do
created_at: String.t,
updated_at: String.t,
expires_at: String.t,
expires_on: String.t,

private_key: String.t,
server: String.t,
Expand All @@ -38,7 +36,7 @@ defmodule Dnsimple.Certificate do

defstruct ~w(id domain_id contact_id
common_name alternate_names years csr state authority_identifier auto_renew
created_at updated_at expires_at expires_on
created_at updated_at expires_at
server root chain private_key)a

end
4 changes: 1 addition & 3 deletions lib/dnsimple/domain.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ defmodule Dnsimple.Domain do
- https://developer.dnsimple.com/v2/domains/#domain-attributes
"""

@doc "expires_on is deprecated in favor of expires_at"
@type t :: %__MODULE__{
id: integer,
account_id: integer,
Expand All @@ -19,11 +18,10 @@ defmodule Dnsimple.Domain do
auto_renew: boolean,
private_whois: boolean,
expires_at: String.t,
expires_on: String.t,
created_at: String.t,
updated_at: String.t,
}

defstruct ~w(id account_id registrant_id name unicode_name token state
auto_renew private_whois expires_at expires_on created_at updated_at)a
auto_renew private_whois expires_at created_at updated_at)a
end
1 change: 0 additions & 1 deletion test/dnsimple/certificates_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ defmodule Dnsimple.CertificatesTest do
assert data.common_name == "www.bingo.pizza"
assert data.alternate_names == []
assert data.auto_renew == false
assert data.expires_on == "2020-09-16"
assert data.expires_at == "2020-09-16T18:10:13Z"
end
end
Expand Down
1 change: 0 additions & 1 deletion test/dnsimple/domains_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ defmodule Dnsimple.DomainsTest do
assert data.auto_renew == false
assert data.private_whois == false
assert data.expires_at == "2021-06-05T02:15:00Z"
assert data.expires_on == "2021-06-05"
assert data.created_at == "2020-06-04T19:15:14Z"
assert data.updated_at == "2020-06-04T19:15:21Z"
end
Expand Down