Skip to content

Commit

Permalink
Adding controllers for ARBGetSubscription and GetCustomerPaymentProfi…
Browse files Browse the repository at this point in the history
…leList

Adds the necessary yml and controllers for

* ARBGetSubscription
* GetCustomerPaymentProfileList

Signed-off-by: Srijan Misra <[email protected]>
  • Loading branch information
srmisra committed Nov 20, 2015
1 parent 81bbfa1 commit a313c67
Show file tree
Hide file tree
Showing 10 changed files with 300 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/net/authorize/api/controller/ARBGetSubscriptionController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
namespace net\authorize\api\controller;

use net\authorize\api\contract\v1\AnetApiRequestType;
use net\authorize\api\controller\base\ApiOperationBase;

class ARBGetSubscriptionController extends ApiOperationBase
{
public function __construct(AnetApiRequestType $request)
{
$responseType = 'net\authorize\api\contract\v1\ARBGetSubscriptionResponse';
parent::__construct($request, $responseType);
}

protected function validateRequest()
{
//validate required fields of $this->apiRequest->

//validate non-required fields of $this->apiRequest->
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
namespace net\authorize\api\controller;

use net\authorize\api\contract\v1\AnetApiRequestType;
use net\authorize\api\controller\base\ApiOperationBase;

class GetCustomerPaymentProfileListController extends ApiOperationBase
{
public function __construct(AnetApiRequestType $request)
{
$responseType = 'net\authorize\api\contract\v1\GetCustomerPaymentProfileListResponse';
parent::__construct($request, $responseType);
}

protected function validateRequest()
{
//validate required fields of $this->apiRequest->

//validate non-required fields of $this->apiRequest->
}
}
14 changes: 14 additions & 0 deletions lib/net/authorize/api/yml/v1/ARBGetSubscriptionRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
net\authorize\api\contract\v1\ARBGetSubscriptionRequest:
xml_root_name: ARBGetSubscriptionRequest
xml_root_namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
properties:
subscriptionId:
expose: true
access_type: public_method
serialized_name: subscriptionId
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getSubscriptionId
setter: setSubscriptionId
type: string
14 changes: 14 additions & 0 deletions lib/net/authorize/api/yml/v1/ARBGetSubscriptionResponse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
net\authorize\api\contract\v1\ARBGetSubscriptionResponse:
xml_root_name: ARBGetSubscriptionResponse
xml_root_namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
properties:
subscription:
expose: true
access_type: public_method
serialized_name: subscription
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getSubscription
setter: setSubscription
type: net\authorize\api\contract\v1\ARBSubscriptionMaskedType
72 changes: 72 additions & 0 deletions lib/net/authorize/api/yml/v1/ARBSubscriptionMaskedType.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
net\authorize\api\contract\v1\ARBSubscriptionMaskedType:
properties:
name:
expose: true
access_type: public_method
serialized_name: name
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getName
setter: setName
type: string
paymentSchedule:
expose: true
access_type: public_method
serialized_name: paymentSchedule
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getPaymentSchedule
setter: setPaymentSchedule
type: net\authorize\api\contract\v1\PaymentScheduleType
amount:
expose: true
access_type: public_method
serialized_name: amount
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getAmount
setter: setAmount
type: float
trialAmount:
expose: true
access_type: public_method
serialized_name: trialAmount
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getTrialAmount
setter: setTrialAmount
type: float
status:
expose: true
access_type: public_method
serialized_name: status
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getStatus
setter: setStatus
type: string
profile:
expose: true
access_type: public_method
serialized_name: profile
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getProfile
setter: setProfile
type: net\authorize\api\contract\v1\SubscriptionCustomerProfileType
order:
expose: true
access_type: public_method
serialized_name: order
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getOrder
setter: setOrder
type: net\authorize\api\contract\v1\OrderType
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
net\authorize\api\contract\v1\CustomerPaymentProfileListItemType:
properties:
customerPaymentProfileId:
expose: true
access_type: public_method
serialized_name: customerPaymentProfileId
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getCustomerPaymentProfileId
setter: setCustomerPaymentProfileId
type: integer
customerProfileId:
expose: true
access_type: public_method
serialized_name: customerProfileId
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getCustomerProfileId
setter: setCustomerProfileId
type: integer
billTo:
expose: true
access_type: public_method
serialized_name: billTo
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getBillTo
setter: setBillTo
type: net\authorize\api\contract\v1\CustomerAddressType
payment:
expose: true
access_type: public_method
serialized_name: payment
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getPayment
setter: setPayment
type: net\authorize\api\contract\v1\PaymentMaskedType
22 changes: 22 additions & 0 deletions lib/net/authorize/api/yml/v1/CustomerPaymentProfileSortingType.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
net\authorize\api\contract\v1\CustomerPaymentProfileSortingType:
properties:
orderBy:
expose: true
access_type: public_method
serialized_name: orderBy
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getOrderBy
setter: setOrderBy
type: string
orderDescending:
expose: true
access_type: public_method
serialized_name: orderDescending
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getOrderDescending
setter: setOrderDescending
type: boolean
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
net\authorize\api\contract\v1\GetCustomerPaymentProfileListRequest:
xml_root_name: getCustomerPaymentProfileListRequest
xml_root_namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
properties:
searchType:
expose: true
access_type: public_method
serialized_name: searchType
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getSearchType
setter: setSearchType
type: string
month:
expose: true
access_type: public_method
serialized_name: month
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getMonth
setter: setMonth
type: string
sorting:
expose: true
access_type: public_method
serialized_name: sorting
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getSorting
setter: setSorting
type: net\authorize\api\contract\v1\CustomerPaymentProfileSortingType
paging:
expose: true
access_type: public_method
serialized_name: paging
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getPaging
setter: setPaging
type: net\authorize\api\contract\v1\PagingType
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
net\authorize\api\contract\v1\GetCustomerPaymentProfileListResponse:
xml_root_name: getCustomerPaymentProfileListResponse
xml_root_namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
properties:
totalNumInResultSet:
expose: true
access_type: public_method
serialized_name: totalNumInResultSet
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getTotalNumInResultSet
setter: setTotalNumInResultSet
type: integer
paymentProfiles:
expose: true
access_type: public_method
serialized_name: paymentProfiles
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getPaymentProfiles
setter: setPaymentProfiles
type: array<net\authorize\api\contract\v1\CustomerPaymentProfileListItemType>
xml_list:
inline: false
entry_name: paymentProfile
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
22 changes: 22 additions & 0 deletions lib/net/authorize/api/yml/v1/SubscriptionCustomerProfileType.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
net\authorize\api\contract\v1\SubscriptionCustomerProfileType:
properties:
paymentProfile:
expose: true
access_type: public_method
serialized_name: paymentProfile
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getPaymentProfile
setter: setPaymentProfile
type: net\authorize\api\contract\v1\CustomerPaymentProfileMaskedType
shippingProfile:
expose: true
access_type: public_method
serialized_name: shippingProfile
xml_element:
namespace: AnetApi/xml/v1/schema/AnetApiSchema.xsd
accessor:
getter: getShippingProfile
setter: setShippingProfile
type: net\authorize\api\contract\v1\CustomerAddressExType

0 comments on commit a313c67

Please sign in to comment.