-
Notifications
You must be signed in to change notification settings - Fork 30
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 #503 from razorpay/rzp-sdk-2.8.7
new sdk 2.8.7 changes
- Loading branch information
Showing
11 changed files
with
227 additions
and
11 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,62 @@ | ||
<?php | ||
|
||
namespace Razorpay\Api; | ||
|
||
class Account extends Entity | ||
{ | ||
|
||
public function create($attributes = array()) | ||
{ | ||
$entityUrl = $this->getEntityUrl(); | ||
|
||
return $this->request('POST', $entityUrl, $attributes, 'v2'); | ||
} | ||
|
||
public function fetch($id) | ||
{ | ||
$entityUrl = $this->getEntityUrl(); | ||
|
||
return $this->request('GET', $entityUrl . $id, null, 'v2'); | ||
} | ||
|
||
public function delete() | ||
{ | ||
$entityUrl = $this->getEntityUrl(); | ||
|
||
return $this->request('DELETE', $entityUrl . $this->id, null, 'v2'); | ||
} | ||
|
||
public function edit($attributes = array()) | ||
{ | ||
$url = $this->getEntityUrl() . $this->id; | ||
|
||
return $this->request('PATCH', $url, $attributes, 'v2'); | ||
} | ||
|
||
public function stakeholders() | ||
{ | ||
$stakeholder = new Stakeholder(); | ||
|
||
$stakeholder['account_id'] = $this->id; | ||
|
||
return $stakeholder; | ||
} | ||
|
||
public function products() | ||
{ | ||
$product = new Product(); | ||
|
||
$product['account_id'] = $this->id; | ||
|
||
return $product; | ||
} | ||
|
||
public function webhooks() | ||
{ | ||
$webhook = new Webhook(); | ||
|
||
$webhook['account_id'] = $this->id; | ||
|
||
return $webhook; | ||
} | ||
} |
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
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,11 @@ | ||
<?php | ||
|
||
namespace Razorpay\Api; | ||
|
||
class Iin extends Entity | ||
{ | ||
public function fetch($id) | ||
{ | ||
return parent::fetch($id); | ||
} | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace Razorpay\Api; | ||
|
||
class Product extends Entity | ||
{ | ||
public function requestProductConfiguration($attributes = array()) | ||
{ | ||
$url = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl(); | ||
|
||
return $this->request('POST', $url, $attributes, 'v2'); | ||
} | ||
|
||
public function fetch($id) | ||
{ | ||
$entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id; | ||
|
||
return $this->request('GET', $entityUrl, null, 'v2'); | ||
} | ||
|
||
public function edit($id, $attributes = array()) | ||
{ | ||
$entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id; | ||
|
||
return $this->request('PATCH', $entityUrl, $attributes, 'v2'); | ||
} | ||
|
||
public function fetchTnc($product_name) | ||
{ | ||
$entityUrl = $this->getEntityUrl().'/'.$product_name.'/tnc'; | ||
|
||
return $this->request('GET', $entityUrl,null , 'v2'); | ||
} | ||
} |
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,34 @@ | ||
<?php | ||
|
||
namespace Razorpay\Api; | ||
|
||
class Stakeholder extends Entity | ||
{ | ||
public function create($attributes = array()) | ||
{ | ||
$url = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl(); | ||
|
||
return $this->request('POST', $url, $attributes, 'v2'); | ||
} | ||
|
||
public function fetch($id) | ||
{ | ||
$entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id; | ||
|
||
return $this->request('GET', $entityUrl, null, 'v2'); | ||
} | ||
|
||
public function all($options = array()) | ||
{ | ||
$relativeUrl = 'accounts/'.$this->account_id.'/'.$this->getEntityUrl(); | ||
|
||
return $this->request('GET', $relativeUrl, $options, 'v2'); | ||
} | ||
|
||
public function edit($id, $attributes = array()) | ||
{ | ||
$entityUrl = 'accounts/'.$this->account_id .'/'.$this->getEntityUrl().'/'.$id; | ||
|
||
return $this->request('PATCH', $entityUrl, $attributes, 'v2'); | ||
} | ||
} |
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