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

Simplify writable attributes #267

Merged
merged 1 commit into from
Aug 12, 2016
Merged

Simplify writable attributes #267

merged 1 commit into from
Aug 12, 2016

Conversation

drewish
Copy link

@drewish drewish commented Aug 12, 2016

Right now we've got a lot of overhead setting up static $_writeableAttributes and $_requiredAttributes variable that are only used by accessor functions. We can remove a lot of boilerplate code by just having the accessors return the arrays directly.

@drewish drewish force-pushed the simplify-writable-attributes branch from 7b50fc8 to f35865c Compare August 12, 2016 17:43
Recurly_BillingInfo::$_writeableAttributes = array(
'first_name','last_name','name_on_account','ip_address',
'address1','address2','city','state','country','zip','phone','vat_number',
'number','month','year','verification_value','start_year','start_month','issue_number',
Copy link
Author

Choose a reason for hiding this comment

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

I'll call out that I'm dropping some unused fields here: 'start_year','start_month','issue_number',

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@bhelx
Copy link
Contributor

bhelx commented Aug 12, 2016

👍

@bhelx bhelx merged commit 3ae251b into master Aug 12, 2016
@bhelx bhelx deleted the simplify-writable-attributes branch August 12, 2016 22:12
@bhelx bhelx added the V2 V2 Client label Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants