Skip to content

Commit fa8f566

Browse files
committed
[Customer] Rename dob to date_of_birth #911
1 parent 90b9c43 commit fa8f566

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/code/Magento/CustomerGraphQl/etc/schema.graphqls

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ input CustomerInput {
6161
lastname: String @doc(description: "The customer's family name")
6262
suffix: String @doc(description: "A value such as Sr., Jr., or III")
6363
email: String @doc(description: "The customer's email address. Required")
64-
dob: String @doc(description: "The customer's date of birth")
64+
dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth")
65+
date_of_birth: String @doc(description: "The customer's date of birth")
6566
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
6667
gender: Int @doc(description: "The customer's gender(Male - 1, Female - 2)")
6768
password: String @doc(description: "The customer's password")
@@ -87,7 +88,8 @@ type Customer @doc(description: "Customer defines the customer name and address
8788
email: String @doc(description: "The customer's email address. Required")
8889
default_billing: String @doc(description: "The ID assigned to the billing address")
8990
default_shipping: String @doc(description: "The ID assigned to the shipping address")
90-
dob: String @doc(description: "The customer's date of birth")
91+
dob: @deprecated(reason: "The `dob` is deprecated. Use `date_of_birth` instead.") String @doc(description: "The customer's date of birth")
92+
date_of_birth: String @doc(description: "The customer's date of birth")
9193
taxvat: String @doc(description: "The customer's Tax/VAT number (for corporate customers)")
9294
id: Int @doc(description: "The ID assigned to the customer")
9395
is_subscribed: Boolean @doc(description: "Indicates whether the customer is subscribed to the company's newsletter") @resolver(class: "\\Magento\\CustomerGraphQl\\Model\\Resolver\\IsSubscribed")

dev/tests/api-functional/testsuite/Magento/GraphQl/Customer/UpdateCustomerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testUpdateCustomer()
6969
middlename: "{$newMiddlename}"
7070
lastname: "{$newLastname}"
7171
suffix: "{$newSuffix}"
72-
dob: "{$newDob}"
72+
date_of_birth: "{$newDob}"
7373
taxvat: "{$newTaxVat}"
7474
email: "{$newEmail}"
7575
password: "{$currentPassword}"
@@ -82,7 +82,7 @@ public function testUpdateCustomer()
8282
middlename
8383
lastname
8484
suffix
85-
dob
85+
date_of_birth
8686
taxvat
8787
email
8888
gender
@@ -102,7 +102,7 @@ public function testUpdateCustomer()
102102
$this->assertEquals($newMiddlename, $response['updateCustomer']['customer']['middlename']);
103103
$this->assertEquals($newLastname, $response['updateCustomer']['customer']['lastname']);
104104
$this->assertEquals($newSuffix, $response['updateCustomer']['customer']['suffix']);
105-
$this->assertEquals($newDob, $response['updateCustomer']['customer']['dob']);
105+
$this->assertEquals($newDob, $response['updateCustomer']['customer']['date_of_birth']);
106106
$this->assertEquals($newTaxVat, $response['updateCustomer']['customer']['taxvat']);
107107
$this->assertEquals($newEmail, $response['updateCustomer']['customer']['email']);
108108
$this->assertEquals($newGender, $response['updateCustomer']['customer']['gender']);

0 commit comments

Comments
 (0)