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

Element: fix bug with billing address email #4644

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

jcreiff
Copy link
Contributor

@jcreiff jcreiff commented Dec 7, 2022

Enables the add_address method to successfully find email whether it is nested at the top level of the options hash or within the billing_address object

CER-330

LOCAL
5411 tests, 76919 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
756 files inspected, no offenses detected

REMOTE
29 tests, 82 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed

@jcreiff jcreiff requested a review from a team December 7, 2022 20:19
Copy link
Contributor

@rachelkirk rachelkirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for the delay, errythang looks good!

@@ -248,6 +248,7 @@ def add_echeck(xml, payment)

def add_address(xml, options)
if address = options[:billing_address] || options[:address]
address[:email] ||= options[:email]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to google the ||= operator, first time i remember seeing it! :the_more_you_know:

Enables the `add_address` method to successfully find `email` whether it is nested at the top level of the `options` hash or within the `billing_address` object

CER-330
@jcreiff jcreiff force-pushed the CER-330_element_billing_email branch from 3dc489c to 8214fb8 Compare December 9, 2022 20:48
@jcreiff jcreiff merged commit 8214fb8 into master Dec 9, 2022
@jcreiff jcreiff deleted the CER-330_element_billing_email branch December 9, 2022 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants