dnsimple 12.2.0 → 12.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f407171557923f494c7021338188386bc8960ce0f4b5d8d054a599370e1c9bb
4
- data.tar.gz: 9770d96251d504107ce14afcedf3cade478902ac1533f1836103fca8cf4fe584
3
+ metadata.gz: 176d457ef2f2139f4d96bd77f46103eee392defaa98317be2342b018bf98a5e7
4
+ data.tar.gz: 0256d2f5a211fc562a5f5f7262bafa4b07185317a6cf72de2c62e3f42720d86b
5
5
  SHA512:
6
- metadata.gz: 519a34dc4c836058cb9edae0c185abb3c270f1ebac1b5b22202a1b198e148736aff3cc4e002082901656621e71e26a78e0fe5012df6d9421f7129e876e30c6d5
7
- data.tar.gz: d5fad291abd99d373d66158a954780f2b278ccc3d95d01f7552f9689ae8bd5d7f9a91816b127818fc38c1c53f44680c9cce9542cd073f5f4ab8c0c2443543453
6
+ metadata.gz: d648a8ff1c2edabb8fb572fc3572c57de160748ad2952e3bc6cc77188ca27a9cf73a0a98749d9631efa3141f5a4580608c05435faa169ef81ef70c1b58d01d51
7
+ data.tar.gz: e13e9227237d6e94b9c3f7d31983bc00c5a46940440e6b656ba76e0933c15f344c9857e2f8d4687e77b14008d0003b22a644c13585ec2df0706a7ab2151cf16f
@@ -17,3 +17,10 @@ updates:
17
17
  labels:
18
18
  - task
19
19
  - dependencies
20
+ cooldown:
21
+ default-days: 3
22
+ groups:
23
+ actions-patch-minor:
24
+ update-types:
25
+ - patch
26
+ - minor
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
13
  - name: Wait for CI to pass
14
- uses: lewagon/wait-on-check-action@v1.5.0
14
+ uses: lewagon/wait-on-check-action@v1.6.0
15
15
  with:
16
16
  ref: ${{ github.sha }}
17
17
  running-workflow-name: Wait for CI
@@ -19,7 +19,7 @@ jobs:
19
19
  rsync -a --delete "$TMP_DIR/dnsimple-developer-main/fixtures/v2/api/" test/fixtures.http/
20
20
  echo "now=$(date +'%Y-%m-%d %H:%M:%S')" >> "$GITHUB_OUTPUT"
21
21
  - name: Create PR with synced fixtures
22
- uses: peter-evans/create-pull-request@v7
22
+ uses: peter-evans/create-pull-request@v8
23
23
  with:
24
24
  sign-commits: true
25
25
  add-paths: test/fixtures.http
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  This project uses [Semantic Versioning 2.0.0](http://semver.org/), the format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## 12.3.0 - 2026-04-15
6
+
7
+ ### Added
8
+
9
+ - Added `new_account_identifier` option to `initiate_push` for initiating domain pushes by account identifier. (#462)
10
+ - Added `name` to `Account`. (#462)
11
+ - Added support for trustee service in domain transfers. (#464)
12
+
13
+ ### Deprecated
14
+
15
+ - Deprecated `new_account_email` option in `initiate_push`. Use `new_account_identifier` instead. (#462)
16
+
5
17
  ## 12.2.0 - 2026-03-23
6
18
 
7
19
  ### Added
@@ -7,19 +7,22 @@ module Dnsimple
7
7
  #
8
8
  # @see https://developer.dnsimple.com/v2/domains/pushes/#initiate
9
9
  #
10
- # @example Initiate a domain pushe for example.com:
10
+ # @example Initiate a domain push for example.com using a domain push identifier:
11
+ # client.domains.initiate_push(1010, "example.com", new_account_identifier: "abc123")
12
+ #
13
+ # @example Initiate a domain push for example.com using an account email (deprecated):
11
14
  # client.domains.initiate_push(1010, "example.com", new_account_email: "admin@target-account.test")
12
15
  #
13
16
  # @param account_id [Integer] the account ID
14
17
  # @param domain_id [#to_s] The domain ID or domain name
15
18
  # @param attributes [Hash]
16
- # @option attributes [String] :new_account_email the target account email (mandatory)
19
+ # @option attributes [String] :new_account_identifier the target account identifier
20
+ # @option attributes [String] :new_account_email the target account email (deprecated, use :new_account_identifier instead)
17
21
  # @param options [Hash]
18
22
  # @return [Dnsimple::Response<Dnsimple::Struct::DomainPush>]
19
23
  #
20
24
  # @raise [Dnsimple::RequestError]
21
25
  def initiate_push(account_id, domain_id, attributes, options = {})
22
- Extra.validate_mandatory_attributes(attributes, [:new_account_email])
23
26
  response = client.post(Client.versioned("/%s/domains/%s/pushes" % [account_id, domain_id]), attributes, options)
24
27
 
25
28
  Dnsimple::Response.new(response, Struct::DomainPush.new(response["data"]))
@@ -9,6 +9,9 @@ module Dnsimple
9
9
  # @return [String] The account email.
10
10
  attr_accessor :email
11
11
 
12
+ # @return [String] The account name.
13
+ attr_accessor :name
14
+
12
15
  # @return [String] The identifier of the plan the account is subscribed to.
13
16
  attr_accessor :plan_identifier
14
17
  end
@@ -21,6 +21,9 @@ module Dnsimple
21
21
  # @return [Bool] True if the domain WHOIS privacy was requested.
22
22
  attr_accessor :whois_privacy
23
23
 
24
+ # @return [Bool] True if the domain Trustee service was requested.
25
+ attr_accessor :trustee_service
26
+
24
27
  # @return [String,nil] The reason if transfer failed.
25
28
  attr_accessor :status_description
26
29
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dnsimple
4
- VERSION = "12.2.0"
4
+ VERSION = "12.3.0"
5
5
  end
@@ -30,4 +30,15 @@ class AccountsTest < Minitest::Test
30
30
  assert_kind_of(Dnsimple::Struct::Account, result.first)
31
31
  assert_kind_of(Dnsimple::Struct::Account, result.last)
32
32
  end
33
+
34
+ test "returns the account name" do
35
+ stub_request(:get, %r{/v2/accounts$})
36
+ .to_return(read_http_fixture("listAccounts/success-account.http"))
37
+
38
+ response = @subject.accounts
39
+
40
+ result = response.data.first
41
+
42
+ assert_equal("John", result.name)
43
+ end
33
44
  end
@@ -36,6 +36,18 @@ class DomainsPushesTest < Minitest::Test
36
36
  assert_kind_of(Integer, result.id)
37
37
  end
38
38
 
39
+ test "initiate push with account identifier builds correct request" do
40
+ stub_request(:post, %r{/v2/#{@account_id}/domains/#{@domain_id}/pushes$})
41
+ .to_return(read_http_fixture("initiatePush/success.http"))
42
+
43
+ attributes = { new_account_identifier: "abc123" }
44
+ @subject.initiate_push(@account_id, @domain_id, attributes)
45
+
46
+ assert_requested(:post, "https://api.dnsimple.test/v2/#{@account_id}/domains/#{@domain_id}/pushes",
47
+ body: attributes,
48
+ headers: { "Accept" => "application/json" })
49
+ end
50
+
39
51
  test "pushes builds correct request" do
40
52
  stub_request(:get, %r{/v2/2020/pushes})
41
53
  .to_return(read_http_fixture("listPushes/success.http"))
@@ -211,7 +211,7 @@ class RegistrarTest < Minitest::Test
211
211
  stub_request(:post, %r{/v2/#{@account_id}/registrar/domains/.+/transfers$})
212
212
  .to_return(read_http_fixture("transferDomain/success.http"))
213
213
 
214
- attributes = { registrant_id: "10", auth_code: "x1y2z3" }
214
+ attributes = { registrant_id: "10", auth_code: "x1y2z3", trustee_service: true }
215
215
  @subject.transfer_domain(@account_id, domain_name = "example.com", attributes)
216
216
 
217
217
  assert_requested(:post, "https://api.dnsimple.test/v2/#{@account_id}/registrar/domains/#{domain_name}/transfers",
@@ -233,6 +233,7 @@ class RegistrarTest < Minitest::Test
233
233
  assert_kind_of(Dnsimple::Struct::DomainTransfer, result)
234
234
  assert_kind_of(Integer, result.id)
235
235
  assert_kind_of(Integer, result.domain_id)
236
+ refute(result.trustee_service)
236
237
  end
237
238
 
238
239
  test "transfer domain when attributes are incomplete raises argument error" do
@@ -288,6 +289,7 @@ class RegistrarTest < Minitest::Test
288
289
  assert_equal("cancelled", result.state)
289
290
  refute(result.auto_renew)
290
291
  refute(result.whois_privacy)
292
+ refute(result.trustee_service)
291
293
  assert_equal("Canceled by customer", result.status_description)
292
294
  assert_equal("2020-06-05T18:08:00Z", result.created_at)
293
295
  assert_equal("2020-06-05T18:10:01Z", result.updated_at)
@@ -321,6 +323,7 @@ class RegistrarTest < Minitest::Test
321
323
  assert_equal("transferring", result.state)
322
324
  refute(result.auto_renew)
323
325
  refute(result.whois_privacy)
326
+ refute(result.trustee_service)
324
327
  assert_nil(result.status_description)
325
328
  assert_equal("2020-06-05T18:08:00Z", result.created_at)
326
329
  assert_equal("2020-06-05T18:08:04Z", result.updated_at)
@@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
17
17
  x-xss-protection: 1; mode=block
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]}
20
+ {"data":[{"id":123,"email":"john@example.com","name":"John","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]}
@@ -17,5 +17,5 @@ x-permitted-cross-domain-policies: none
17
17
  x-xss-protection: 1; mode=block
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"teams-v1-monthly","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
20
+ {"data":[{"id":123,"email":"john@example.com","name":"John","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","name":"Ops Company","plan_identifier":"teams-v1-monthly","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
21
21
 
@@ -15,4 +15,4 @@ x-xss-protection: 1; mode=block
15
15
  x-download-options: noopen
16
16
  x-permitted-cross-domain-policies: none
17
17
 
18
- {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
18
+ {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":null,"created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:08:04Z"}}
@@ -17,4 +17,4 @@ x-download-options: noopen
17
17
  x-permitted-cross-domain-policies: none
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
20
+ {"data":{"id":361,"domain_id":182245,"registrant_id":2715,"state":"cancelled","auto_renew":false,"whois_privacy":false,"trustee_service":false,"status_description":"Canceled by customer","created_at":"2020-06-05T18:08:00Z","updated_at":"2020-06-05T18:10:01Z"}}
@@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
17
17
  x-xss-protection: 1; mode=block
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]}
20
+ {"data":[{"id":123,"email":"john@example.com","name":"John","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"}]}
@@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
17
17
  x-xss-protection: 1; mode=block
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":[{"id":123,"email":"john@example.com","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","plan_identifier":"teams-v1-monthly","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
20
+ {"data":[{"id":123,"email":"john@example.com","name":"John","plan_identifier":"dnsimple-personal","created_at":"2011-09-11T17:15:58Z","updated_at":"2016-06-03T15:02:26Z"},{"id":456,"email":"ops@company.com","name":"Ops Company","plan_identifier":"teams-v1-monthly","created_at":"2012-03-16T16:02:54Z","updated_at":"2016-06-14T11:23:16Z"}]}
@@ -17,4 +17,4 @@ x-permitted-cross-domain-policies: none
17
17
  x-xss-protection: 1; mode=block
18
18
  strict-transport-security: max-age=31536000
19
19
 
20
- {"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}}
20
+ {"data":{"id":1,"domain_id":999,"registrant_id":2,"state":"transferring","auto_renew":false,"whois_privacy":false,"trustee_service":false,"created_at":"2016-12-09T19:43:41Z","updated_at":"2016-12-09T19:43:43Z"}}
@@ -12,4 +12,4 @@ x-request-id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd
12
12
  x-runtime: 0.141588
13
13
  strict-transport-security: max-age=31536000
14
14
 
15
- {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
15
+ {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","name":"Example Account","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
@@ -12,4 +12,4 @@ x-request-id: 15a7f3a5-7ee5-4e36-ac5a-8c21c2e1fffd
12
12
  x-runtime: 0.141588
13
13
  strict-transport-security: max-age=31536000
14
14
 
15
- {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
15
+ {"data":{"user":null,"account":{"id":1,"email":"example-account@example.com","name":"Example Account","plan_identifier":"teams-v1-monthly","created_at":"2015-09-18T23:04:37Z","updated_at":"2016-06-09T20:03:39Z"}}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsimple
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.2.0
4
+ version: 12.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - DNSimple
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-23 00:00:00.000000000 Z
11
+ date: 2026-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty