| @@ 6-41 (lines=36) @@ | ||
| 3 | use Moip; |
|
| 4 | use Illuminate\Console\Command; |
|
| 5 | ||
| 6 | class MoipCreditCardCommand extends Command { |
|
| 7 | ||
| 8 | /** |
|
| 9 | * The console command name. |
|
| 10 | * |
|
| 11 | * @var string |
|
| 12 | */ |
|
| 13 | protected $name = 'moip:creditcard'; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * The console command description. |
|
| 17 | * |
|
| 18 | * @var string |
|
| 19 | */ |
|
| 20 | protected $description = 'Cred Card settings.'; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Create a new command instance. |
|
| 24 | */ |
|
| 25 | public function __construct() |
|
| 26 | { |
|
| 27 | parent::__construct(); |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Execute the console command. |
|
| 32 | * |
|
| 33 | * @return void |
|
| 34 | */ |
|
| 35 | public function fire() |
|
| 36 | { |
|
| 37 | $moip = Moip::first(); |
|
| 38 | $moip->creditCard = $this->confirm('Cartao de credido ativo? [yes|no]'); |
|
| 39 | $moip->save(); |
|
| 40 | } |
|
| 41 | } |
|
| 42 | ||
| @@ 6-43 (lines=38) @@ | ||
| 3 | use Moip; |
|
| 4 | use Illuminate\Console\Command; |
|
| 5 | ||
| 6 | class MoipDebitCardCommand extends Command { |
|
| 7 | ||
| 8 | /** |
|
| 9 | * The console command name. |
|
| 10 | * |
|
| 11 | * @var string |
|
| 12 | */ |
|
| 13 | protected $name = 'moip:debitcard'; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * The console command description. |
|
| 17 | * |
|
| 18 | * @var string |
|
| 19 | */ |
|
| 20 | protected $description = 'Debit Card settings.'; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Create a new command instance. |
|
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | public function __construct() |
|
| 28 | { |
|
| 29 | parent::__construct(); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Execute the console command. |
|
| 34 | * |
|
| 35 | * @return mixed |
|
| 36 | */ |
|
| 37 | public function fire() |
|
| 38 | { |
|
| 39 | $moip = Moip::first(); |
|
| 40 | $moip->creditCard = $this->confirm('Cartao de debito ativado? [yes|no]'); |
|
| 41 | $moip->save(); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 6-43 (lines=38) @@ | ||
| 3 | use Moip; |
|
| 4 | use Illuminate\Console\Command; |
|
| 5 | ||
| 6 | class MoipDebitCommand extends Command { |
|
| 7 | ||
| 8 | /** |
|
| 9 | * The console command name. |
|
| 10 | * |
|
| 11 | * @var string |
|
| 12 | */ |
|
| 13 | protected $name = 'moip:debit'; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * The console command description. |
|
| 17 | * |
|
| 18 | * @var string |
|
| 19 | */ |
|
| 20 | protected $description = 'Debit settings.'; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Create a new command instance. |
|
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | public function __construct() |
|
| 28 | { |
|
| 29 | parent::__construct(); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Execute the console command. |
|
| 34 | * |
|
| 35 | * @return mixed |
|
| 36 | */ |
|
| 37 | public function fire() |
|
| 38 | { |
|
| 39 | $moip = Moip::first(); |
|
| 40 | $moip->debitCard = $this->confirm('Debito ativado? [yes|no]'); |
|
| 41 | $moip->save(); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||
| @@ 6-43 (lines=38) @@ | ||
| 3 | use Moip; |
|
| 4 | use Illuminate\Console\Command; |
|
| 5 | ||
| 6 | class MoipFinancingCommand extends Command { |
|
| 7 | ||
| 8 | /** |
|
| 9 | * The console command name. |
|
| 10 | * |
|
| 11 | * @var string |
|
| 12 | */ |
|
| 13 | protected $name = 'moip:financing'; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * The console command description. |
|
| 17 | * |
|
| 18 | * @var string |
|
| 19 | */ |
|
| 20 | protected $description = 'Financing settings.'; |
|
| 21 | ||
| 22 | /** |
|
| 23 | * Create a new command instance. |
|
| 24 | * |
|
| 25 | * @return void |
|
| 26 | */ |
|
| 27 | public function __construct() |
|
| 28 | { |
|
| 29 | parent::__construct(); |
|
| 30 | } |
|
| 31 | ||
| 32 | /** |
|
| 33 | * Execute the console command. |
|
| 34 | * |
|
| 35 | * @return mixed |
|
| 36 | */ |
|
| 37 | public function fire() |
|
| 38 | { |
|
| 39 | $moip = Moip::first(); |
|
| 40 | $moip->financing = $this->confirm('Ficanciamento ativado? [yes|no]'); |
|
| 41 | $moip->save(); |
|
| 42 | } |
|
| 43 | } |
|
| 44 | ||