Last active
July 3, 2020 17:27
-
-
Save NilsonLima/c12770e83a393d1a1e220d34369f7560 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Smartphone::Contract::Change < BaseInteraction | |
| def call | |
| return unless valid_interaction? | |
| persist_models! | |
| change_certificate | |
| end | |
| def valid_interaction? | |
| not_suspended? | |
| && invoices_settled? | |
| && previous_attributes_valid? | |
| && new_attributes_valid? | |
| && suspended_subscription.success? | |
| end | |
| def not_suspended? | |
| # | |
| end | |
| def invoices_settled? | |
| # | |
| end | |
| def previous_attributes_valid? | |
| # | |
| end | |
| def new_attributes_valid? | |
| # | |
| end | |
| def suspended_subscription | |
| # | |
| end | |
| def change_certificate | |
| # | |
| end | |
| def persist_models! | |
| # | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment