-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from noir04/Add-invoice-booking-functionality
Add invoice booking functionality
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php namespace LasseRafn\Dinero\Builders; | ||
|
||
use LasseRafn\Dinero\Models\Book; | ||
use LasseRafn\Dinero\Responses\ListResponse; | ||
use LasseRafn\Dinero\Utils\Request; | ||
|
||
class BookingBuilder extends Builder | ||
{ | ||
protected $entity = 'book'; | ||
protected $model = Book::class; | ||
protected $collectionName = 'Book'; | ||
protected $responseClass = ListResponse::class; | ||
|
||
public function __construct( Request $request, $entity ) { | ||
$this->entity = $entity; | ||
parent::__construct( $request ); | ||
} | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php namespace LasseRafn\Dinero\Models; | ||
|
||
use LasseRafn\Dinero\Utils\Model; | ||
|
||
class Book extends Model | ||
{ | ||
protected $entity = 'book'; | ||
protected $primaryKey = 'Guid'; | ||
|
||
public $Guid; | ||
public $Number; | ||
public $Timestamp; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php namespace LasseRafn\Dinero\Requests; | ||
|
||
use LasseRafn\Dinero\Builders\Builder; | ||
use LasseRafn\Dinero\Utils\RequestBuilder; | ||
|
||
class BookingRequestBuilder extends RequestBuilder | ||
{ | ||
public function __construct( Builder $builder ) | ||
{ | ||
$this->parameters['fields'] = 'Guid,Number,Timestamp'; | ||
|
||
parent::__construct( $builder ); | ||
} | ||
} |