idx
int64
0
60.3k
question
stringlengths
101
6.21k
target
stringlengths
7
803
35,300
public function getByPath ( $ path , $ headers = [ ] ) { $ response = $ this -> httpRequest ( $ path , Requests :: GET , null , $ headers ) ; if ( is_array ( $ response ) ) { $ response = ( object ) $ response ; } return $ this -> populate ( $ response ) ; }
Find by path .
35,301
public function createResource ( $ path ) { $ response = $ this -> httpRequest ( $ path , Requests :: POST , $ this ) ; return $ this -> populate ( $ response ) ; }
Create a new item in Moip .
35,302
public function updateByPath ( $ path ) { $ response = $ this -> httpRequest ( $ path , Requests :: PUT , $ this ) ; return $ this -> populate ( $ response ) ; }
Update an item in Moip .
35,303
public function setTransfers ( $ amount , $ bankNumber , $ agencyNumber , $ agencyCheckNumber , $ accountNumber , $ accountCheckNumber ) { $ this -> data -> amount = $ amount ; $ this -> data -> transferInstrument -> method = self :: METHOD ; $ this -> data -> transferInstrument -> bankAccount -> type = self :: TYPE ; ...
Set info of transfers .
35,304
public function setTransfersToBankAccount ( $ amount , $ bankAccountId ) { $ this -> data -> amount = $ amount ; $ this -> data -> transferInstrument -> method = self :: METHOD ; $ this -> data -> transferInstrument -> bankAccount -> id = $ bankAccountId ; return $ this ; }
Set info of transfers to a saved bank account .
35,305
public function setHolder ( $ fullname , $ taxDocument ) { $ this -> data -> transferInstrument -> bankAccount -> holder -> fullname = $ fullname ; $ this -> data -> transferInstrument -> bankAccount -> holder -> taxDocument -> type = self :: TYPE_HOLD ; $ this -> data -> transferInstrument -> bankAccount -> holder -> ...
Set info of holder .
35,306
public function get ( $ id ) { return $ this -> getByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ id ) ) ; }
Get a Transfer .
35,307
public function getList ( Pagination $ pagination = null , Filters $ filters = null , $ qParam = '' ) { $ transfersList = new TransfersList ( $ this -> moip ) ; return $ transfersList -> get ( $ pagination , $ filters , $ qParam ) ; }
Create a new Transfers list instance .
35,308
public static function parseErrors ( $ json_string ) { $ error_obj = json_decode ( $ json_string ) ; $ errors = [ ] ; if ( ! empty ( $ error_obj -> errors ) ) { foreach ( $ error_obj -> errors as $ error ) { $ errors [ ] = new self ( $ error -> code , $ error -> path , $ error -> description ) ; } } elseif ( ! empty ( ...
Creates an Error array from a json string .
35,309
public function execute ( ) { if ( $ this -> order !== null ) { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , Orders :: PATH , $ this -> order -> getId ( ) , self :: PATH ) ; } else { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , Multiorders :: PATH , $ this -> multiorder -> getId ( ) , ...
Create a new payment in api MoIP .
35,310
public function get ( $ id_moip ) { if ( $ this -> isMultipayment ( $ id_moip ) ) { return $ this -> getByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: MULTI_PAYMENTS_PATH , $ id_moip ) ) ; } return $ this -> getByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ id_moip ) ) ;...
Get an payment and multipayment in MoIP .
35,311
protected function populate ( stdClass $ response ) { $ payment = clone $ this ; $ payment -> data -> id = $ this -> getIfSet ( 'id' , $ response ) ; $ payment -> data -> status = $ this -> getIfSet ( 'status' , $ response ) ; $ payment -> data -> delayCapture = $ this -> getIfSet ( 'delayCapture' , $ response ) ; $ pa...
Mount payment structure .
35,312
public function setBoleto ( $ expirationDate , $ logoUri , array $ instructionLines = [ ] ) { $ keys = [ 'first' , 'second' , 'third' ] ; if ( empty ( $ instructionLines ) ) { $ instructionLines = [ '' , '' , '' ] ; } if ( $ expirationDate instanceof \ DateTime ) { $ expirationDate = $ expirationDate -> format ( 'Y-m-d...
Set billet .
35,313
public function setCreditCardHash ( $ hash , Holder $ holder , $ store = true ) { $ this -> data -> fundingInstrument -> method = self :: METHOD_CREDIT_CARD ; $ this -> data -> fundingInstrument -> creditCard = new stdClass ( ) ; $ this -> data -> fundingInstrument -> creditCard -> hash = $ hash ; $ this -> data -> fun...
Set credit cardHash .
35,314
public function setCreditCard ( $ expirationMonth , $ expirationYear , $ number , $ cvc , Holder $ holder , $ store = true ) { $ this -> data -> fundingInstrument -> method = self :: METHOD_CREDIT_CARD ; $ this -> data -> fundingInstrument -> creditCard = new stdClass ( ) ; $ this -> data -> fundingInstrument -> credit...
Set credit card Credit card used in a payment . The card when returned within a parent resource is presented in its minimum representation .
35,315
public function setCreditCardSaved ( $ creditCardId , $ cvc ) { $ this -> data -> fundingInstrument = new stdClass ( ) ; $ this -> data -> fundingInstrument -> method = self :: METHOD_CREDIT_CARD ; $ this -> data -> fundingInstrument -> creditCard = new stdClass ( ) ; $ this -> data -> fundingInstrument -> creditCard -...
Sets data from a previously saved credit card Credit card used in a payment . Used when the credit card was saved with the customer and the payment made in a future date .
35,316
public function setOnlineBankDebit ( $ bankNumber , $ expirationDate , $ returnUri ) { if ( $ expirationDate instanceof \ DateTime ) { $ expirationDate = $ expirationDate -> format ( 'Y-m-d' ) ; } $ this -> data -> fundingInstrument -> method = self :: METHOD_ONLINE_BANK_DEBIT ; $ this -> data -> fundingInstrument -> o...
Set payment means made available by banks .
35,317
public function setEscrow ( $ description ) { $ this -> data -> escrow = new stdClass ( ) ; $ this -> data -> escrow -> description = $ description ; return $ this ; }
Set escrow to a payment .
35,318
public function capture ( ) { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ this -> getId ( ) , 'capture' ) ; if ( $ this -> isMultipayment ( $ this -> getId ( ) ) ) { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , self :: MULTI_PAYMENTS_PATH , $ this -> getId ( ) , 'capt...
Capture a pre - authorized amount on a credit card payment .
35,319
public function between ( $ field , $ value1 , $ value2 ) { $ this -> filters [ ] = sprintf ( '%s::bt(%s,%s)' , $ field , $ value1 , $ value2 ) ; }
Set filter to compare if field is between both values .
35,320
protected function populate ( stdClass $ response ) { $ account = clone $ this ; $ account -> data -> events = $ this -> getIfSet ( 'events' , $ response ) ; $ account -> data -> target = $ this -> getIfSet ( 'target' , $ response ) ; $ account -> data -> media = $ this -> getIfSet ( 'media' , $ response ) ; $ account ...
Mount the notification preference structure .
35,321
public function release ( ) { $ path = sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ this -> getId ( ) , 'release' ) ; $ response = $ this -> httpRequest ( $ path , Requests :: POST , [ ] ) ; return $ this -> populate ( $ response ) ; }
Release a escrow payment .
35,322
protected function populate ( stdClass $ response ) { $ escrow = clone $ this ; $ escrow -> data -> id = $ this -> getIfSet ( 'id' , $ response ) ; $ escrow -> data -> status = $ this -> getIfSet ( 'status' , $ response ) ; $ escrow -> data -> description = $ this -> getIfSet ( 'description' , $ response ) ; $ escrow -...
Mount escrow structure .
35,323
protected function populate ( stdClass $ response ) { $ keys = clone $ this ; $ resp = $ response -> keys ; $ keys -> data -> basicAuth = $ this -> getIfSet ( 'basicAuth' , $ resp ) ; $ keys -> data -> encryption = $ this -> getIfSet ( 'encryption' , $ resp ) ; return $ keys ; }
Mount keys structure .
35,324
public function setHolder ( $ fullname , $ number , $ type ) { $ this -> data -> holder -> fullname = $ fullname ; $ this -> data -> holder -> taxDocument -> type = $ type ; $ this -> data -> holder -> taxDocument -> number = $ number ; return $ this ; }
Set holder .
35,325
public function get ( $ bank_account_id ) { return $ this -> getByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ bank_account_id ) ) ; }
Get a bank account .
35,326
public function create ( $ account_id ) { return $ this -> createResource ( sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , self :: PATH_ACCOUNT , $ account_id , self :: PATH ) ) ; }
Create a new bank account .
35,327
public function update ( $ bank_account_id = null ) { $ bank_account_id = ( ! empty ( $ bank_account_id ) ? $ bank_account_id : $ this -> getId ( ) ) ; return $ this -> updateByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ bank_account_id ) ) ; }
Update a bank account .
35,328
public function delete ( $ bank_account_id ) { return $ this -> deleteByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ bank_account_id ) ) ; }
Delete a bank account .
35,329
protected function populate ( stdClass $ response ) { $ bank_account = clone $ this ; $ bank_account -> data -> id = $ this -> getIfSet ( 'id' , $ response ) ; $ bank_account -> data -> agencyNumber = $ this -> getIfSet ( 'agencyNumber' , $ response ) ; $ bank_account -> data -> accountNumber = $ this -> getIfSet ( 'ac...
Mount the bank account structure .
35,330
protected function populate ( stdClass $ response ) { $ webhook = clone $ this ; $ webhook -> data = new stdClass ( ) ; $ webhook -> data -> id = $ response -> id ; $ webhook -> data -> event = $ response -> event ; $ webhook -> data -> url = $ response -> url ; $ webhook -> data -> resourceId = $ response -> resourceI...
Mount structure of Webhook .
35,331
public function get ( $ moip_id ) { return $ this -> getByPath ( sprintf ( '/%s/%s/%s' , MoipResource :: VERSION , self :: PATH , $ moip_id ) ) ; }
Find a customer .
35,332
protected function populate ( stdClass $ response ) { $ customer = clone $ this ; $ customer -> data = new stdClass ( ) ; $ customer -> data -> id = $ this -> getIfSet ( 'id' , $ response ) ; $ customer -> data -> ownId = $ this -> getIfSet ( 'ownId' , $ response ) ; $ customer -> data -> fullname = $ this -> getIfSet ...
Mount the buyer structure from customer .
35,333
public function setCreditCard ( $ expirationMonth , $ expirationYear , $ number , $ cvc , Holder $ holder = null ) { if ( $ holder === null ) { $ holder = $ this ; } $ birthdate = $ holder -> getBirthDate ( ) ; if ( $ birthdate instanceof \ DateTime ) { $ birthdate = $ birthdate -> format ( 'Y-m-d' ) ; } $ this -> data...
Set credit card from customer .
35,334
public function addAddress ( $ street , $ number , $ district , $ city , $ state , $ zip , $ complement = null , $ country = self :: ADDRESS_COUNTRY ) { $ address = new stdClass ( ) ; $ address -> street = $ street ; $ address -> streetNumber = $ number ; $ address -> complement = $ complement ; $ address -> district =...
Add a new address to the account .
35,335
public function addAlternativePhone ( $ areaCode , $ number , $ countryCode = 55 ) { $ alternativePhone = new stdClass ( ) ; $ alternativePhone -> countryCode = $ countryCode ; $ alternativePhone -> areaCode = $ areaCode ; $ alternativePhone -> number = $ number ; $ this -> data -> person -> alternativePhones [ ] = $ a...
Add alternative phone to an account .
35,336
public function checkExistence ( $ tax_document ) { try { $ this -> getByPathNoPopulate ( sprintf ( '/%s/%s/%s?tax_document=%s' , MoipResource :: VERSION , self :: PATH , 'exists' , $ tax_document ) ) ; return true ; } catch ( ValidationException $ e ) { if ( $ e -> getStatusCode ( ) != 404 ) { throw new ValidationExce...
Check if an account exists .
35,337
public function getFullname ( ) { return $ this -> getIfSet ( 'name' , $ this -> data -> person ) . ' ' . $ this -> getIfSet ( 'lastName' , $ this -> data -> person ) ; }
Get account fullname .
35,338
public function setPhone ( $ areaCode , $ number , $ countryCode = 55 ) { $ this -> data -> person -> phone = new stdClass ( ) ; $ this -> data -> person -> phone -> countryCode = $ countryCode ; $ this -> data -> person -> phone -> areaCode = $ areaCode ; $ this -> data -> person -> phone -> number = $ number ; return...
Set phone from account .
35,339
public function setIdentityDocument ( $ number , $ issuer , $ issueDate , $ type = 'RG' ) { $ this -> data -> person -> identityDocument = new stdClass ( ) ; $ this -> data -> person -> identityDocument -> type = $ type ; $ this -> data -> person -> identityDocument -> number = $ number ; $ this -> data -> person -> id...
Set identity document from account .
35,340
public function setNationality ( $ nationality = self :: ADDRESS_COUNTRY ) { $ this -> data -> person -> nationality = $ nationality ; return $ this ; }
Set person nationality .
35,341
public function setParentsName ( $ motherName , $ fatherName ) { $ this -> data -> person -> parentsName = new stdClass ( ) ; $ this -> data -> person -> parentsName -> mother = $ motherName ; $ this -> data -> person -> parentsName -> father = $ fatherName ; return $ this ; }
Set parents name .
35,342
public function setCompanyName ( $ name , $ businessName ) { $ this -> initializeCompany ( ) ; $ this -> data -> company -> name = $ name ; $ this -> data -> company -> businessName = $ businessName ; return $ this ; }
Set company name .
35,343
public function setCompanyOpeningDate ( $ openingDate ) { if ( $ openingDate instanceof \ DateTime ) { $ openingDate = $ openingDate -> format ( 'Y-m-d' ) ; } $ this -> initializeCompany ( ) ; $ this -> data -> company -> openingDate = $ openingDate ; return $ this ; }
Set company opening date .
35,344
public function setCompanyAddress ( $ street , $ number , $ district , $ city , $ state , $ zip , $ complement = null , $ country = self :: ADDRESS_COUNTRY ) { $ address = new stdClass ( ) ; $ address -> street = $ street ; $ address -> streetNumber = $ number ; $ address -> complement = $ complement ; $ address -> dis...
Set address to company .
35,345
public function setCompanyPhone ( $ areaCode , $ number , $ countryCode = 55 ) { $ this -> initializeCompany ( ) ; $ this -> data -> company -> phone = new stdClass ( ) ; $ this -> data -> company -> phone -> countryCode = $ countryCode ; $ this -> data -> company -> phone -> areaCode = $ areaCode ; $ this -> data -> c...
Set company phone .
35,346
public function getAuthUrl ( $ endpoint = null ) { if ( $ endpoint !== null ) { $ this -> endpoint = $ endpoint ; } $ query_string = [ 'response_type' => self :: RESPONSE_TYPE , 'client_id' => $ this -> client_id , 'redirect_uri' => $ this -> redirect_uri , 'scope' => implode ( ',' , $ this -> scope ) , ] ; return $ th...
URI of oauth .
35,347
public function authorize ( ) { $ path = $ this -> endpoint . self :: OAUTH_TOKEN ; $ headers = [ 'Content-Type' => 'application/x-www-form-urlencoded' ] ; $ body = [ 'client_id' => $ this -> client_id , 'client_secret' => $ this -> client_secret , 'grant_type' => self :: GRANT_TYPE , 'code' => $ this -> code , 'redire...
With the permission granted you will receive a code that will allow you to retrieve the authentication accessToken and process requests involving another user .
35,348
public function setReceiveFunds ( $ receive_funds ) { if ( ! is_bool ( $ receive_funds ) ) { throw new InvalidArgumentException ( '$receive_funds deve ser boolean, foi passado ' . gettype ( $ receive_funds ) ) ; } if ( $ receive_funds === true ) { $ this -> setScope ( self :: RECEIVE_FUNDS ) ; } return $ this ; }
Permission for creation and consultation of ORDERS PAYMENTS MULTI ORDERS MULTI PAYMENTS CUSTOMERS and consultation of LAUNCHES .
35,349
public function setRefund ( $ refund ) { if ( ! is_bool ( $ refund ) ) { throw new InvalidArgumentException ( '$refund deve ser boolean, foi passado ' . gettype ( $ refund ) ) ; } if ( $ refund === true ) { $ this -> setScope ( self :: REFUND ) ; } return $ this ; }
Permission to create and consult reimbursements ofORDERS PAYMENTS .
35,350
public function setManageAccountInfo ( $ manage_account_info ) { if ( ! is_bool ( $ manage_account_info ) ) { throw new InvalidArgumentException ( '$manage_account_info deve ser boolean, foi passado ' . gettype ( $ manage_account_info ) ) ; } if ( $ manage_account_info === true ) { $ this -> setScope ( self :: MANAGE_A...
Permission to consult ACCOUNTS registration information .
35,351
public function setRetrieveFinancialInfo ( $ retrieve_financial_info ) { if ( ! is_bool ( $ retrieve_financial_info ) ) { throw new InvalidArgumentException ( '$retrieve_financial_info deve ser boolean, foi passado ' . gettype ( $ retrieve_financial_info ) ) ; } if ( $ retrieve_financial_info === true ) { $ this -> set...
Permission to query balance through the ACCOUNTS endpoint .
35,352
public function setTransferFunds ( $ transfer_funds ) { if ( ! is_bool ( $ transfer_funds ) ) { throw new InvalidArgumentException ( '$transfer_funds deve ser boolean, foi passado ' . gettype ( $ transfer_funds ) ) ; } if ( $ transfer_funds === true ) { $ this -> setScope ( self :: TRANSFER_FUNDS ) ; } return $ this ; ...
Permission for bank transfers or for Moip accounts through the TRANSFERS endpoint .
35,353
public function setDefinePreferences ( $ define_preferences ) { if ( ! is_bool ( $ define_preferences ) ) { throw new InvalidArgumentException ( '$define_preferences deve ser boolean, foi passado ' . gettype ( $ define_preferences ) ) ; } if ( $ define_preferences === true ) { $ this -> setScope ( self :: DEFINE_PREFER...
Permission to create change and delete notification preferences through the PREFERENCES endpoint .
35,354
protected function populate ( stdClass $ response ) { $ funding = clone $ this ; $ funding -> data -> method = self :: METHOD_CREDIT_CARD ; $ funding -> data -> creditCard = new stdClass ( ) ; $ funding -> data -> creditCard -> id = $ response -> creditCard -> id ; $ funding -> data -> creditCard -> brand = $ response ...
Mount information of a determined object .
35,355
public function setTaxDocument ( $ type , $ number ) { $ this -> data -> creditCard -> holder -> taxDocument -> type = $ type ; $ this -> data -> creditCard -> holder -> taxDocument -> number = $ number ; return $ this ; }
Documento fiscal .
35,356
public function setPhone ( $ country_code , $ area_code , $ number ) { $ this -> data -> creditCard -> holder -> phone -> countryCode = $ country_code ; $ this -> data -> creditCard -> holder -> phone -> areaCode = $ area_code ; $ this -> data -> creditCard -> holder -> phone -> number = $ number ; return $ this ; }
Telefone do cliente .
35,357
public function addItem ( $ product , $ quantity , $ detail , $ price , $ category = 'OTHER_CATEGORIES' ) { if ( ! is_int ( $ price ) ) { throw new \ UnexpectedValueException ( 'Informe o valor do item como inteiro' ) ; } if ( ! is_int ( $ quantity ) || $ quantity < 1 ) { throw new \ UnexpectedValueException ( 'A quant...
Adds a new item to order .
35,358
public function addReceiver ( $ moipAccount , $ type , $ fixed = null , $ percentual = null , $ feePayor = false ) { $ receiver = new stdClass ( ) ; $ receiver -> moipAccount = new stdClass ( ) ; $ receiver -> moipAccount -> id = $ moipAccount ; if ( ! empty ( $ fixed ) ) { $ receiver -> amount = new stdClass ( ) ; $ r...
Adds a new receiver to order .
35,359
protected function initialize ( ) { $ this -> data = new stdClass ( ) ; $ this -> data -> ownId = null ; $ this -> data -> amount = new stdClass ( ) ; $ this -> data -> amount -> currency = self :: AMOUNT_CURRENCY ; $ this -> data -> amount -> subtotals = new stdClass ( ) ; $ this -> data -> items = [ ] ; $ this -> dat...
Initialize necessary used in some functions .
35,360
private function structure ( stdClass $ response , $ resource , $ class ) { $ structures = [ ] ; foreach ( $ response -> $ resource as $ responseResource ) { $ structure = new $ class ( $ this -> orders -> moip ) ; $ structure -> populate ( $ responseResource ) ; $ structures [ ] = $ structure ; } return $ structures ;...
Structure resource .
35,361
public function getList ( Pagination $ pagination = null , Filters $ filters = null , $ qParam = '' ) { $ orderList = new OrdersList ( $ this -> moip ) ; return $ orderList -> get ( $ pagination , $ filters , $ qParam ) ; }
Create a new Orders list instance .
35,362
public function setAddition ( $ value ) { if ( ! isset ( $ this -> data -> amount -> subtotals ) ) { $ this -> data -> amount -> subtotals = new stdClass ( ) ; } $ this -> data -> amount -> subtotals -> addition = ( float ) $ value ; return $ this ; }
Set additional value to the item will be added to the value of the items .
35,363
public function setCustomerId ( $ id ) { if ( ! isset ( $ this -> data -> customer ) ) { $ this -> data -> customer = new stdClass ( ) ; } $ this -> data -> customer -> id = $ id ; return $ this ; }
Set customer id associated with the order .
35,364
public function setDiscount ( $ value ) { $ this -> data -> amount -> subtotals -> discount = ( float ) $ value ; return $ this ; }
Set discounted value of the item will be subtracted from the total value of the items .
35,365
public function setShippingAmount ( $ value ) { $ this -> data -> amount -> subtotals -> shipping = ( float ) $ value ; return $ this ; }
Set shipping Amount .
35,366
public function addInstallmentCheckoutPreferences ( $ quantity , $ discountValue = 0 , $ additionalValue = 0 ) { $ installmentPreferences = new stdClass ( ) ; $ installmentPreferences -> quantity = $ quantity ; $ installmentPreferences -> discount = $ discountValue ; $ installmentPreferences -> addition = $ additionalV...
Set installment settings for checkout preferences .
35,367
public function get ( $ account_id ) { return $ this -> getByPath ( sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , self :: PATH_ACCOUNT , $ account_id , self :: PATH ) ) ; }
Get a bank accounts list .
35,368
private function execute ( stdClass $ data = null , $ resourceId = null ) { $ body = empty ( $ data ) ? new stdClass ( ) : $ data ; $ response = $ this -> httpRequest ( $ this -> getPath ( $ resourceId ) , Requests :: POST , $ body ) ; return $ this -> populate ( $ response ) ; }
Create a new refund in api MoIP .
35,369
private function getPath ( $ resourceId = null ) { if ( ! is_null ( $ resourceId ) ) { $ endpoint = ( $ this -> isOrder ( $ resourceId ) ? Orders :: PATH : Payment :: PATH ) ; return sprintf ( '/%s/%s/%s/%s' , MoipResource :: VERSION , $ endpoint , $ resourceId , self :: PATH ) ; } if ( $ this -> order !== null ) { ret...
Checks path that will be the request .
35,370
public function bankAccountPartial ( $ amount , $ type , $ bankNumber , $ agencyNumber , $ agencyCheckNumber , $ accountNumber , $ accountCheckNumber , Customer $ holder ) { $ data = $ this -> bankAccountDataCustomer ( $ type , $ bankNumber , $ agencyNumber , $ agencyCheckNumber , $ accountNumber , $ accountCheckNumber...
Making a partial refund in the bank account .
35,371
public function creditCardPartial ( $ amount ) { $ data = new stdClass ( ) ; $ data -> amount = $ amount ; return $ this -> execute ( $ data ) ; }
Making a partial refund in credit card .
35,372
public function getIterator ( ) { $ refunds = [ ] ; $ response = $ this -> httpRequest ( $ this -> getPath ( ) , Requests :: GET ) ; foreach ( $ response -> refunds as $ refund ) { $ refunds [ ] = $ this -> populate ( $ refund ) ; } return new ArrayIterator ( $ refunds ) ; }
Get iterator .
35,373
public function load ( array $ configs , ContainerBuilder $ container ) { $ ezLoader = new Loader \ YamlFileLoader ( $ container , new FileLocator ( __DIR__ . '/../../lib/eZ/settings' ) ) ; $ ezLoader -> load ( 'fieldtypes.yml' ) ; $ ezLoader -> load ( 'fieldtype_services.yml' ) ; $ ezLoader -> load ( 'fieldtype_extern...
Load eZ Platform RichText Field Type Bundle configuration .
35,374
protected function extractTemplateConfiguration ( DOMElement $ template , DOMXPath $ xpath ) { $ configElements = $ xpath -> query ( './docbook:ezconfig' , $ template ) ; if ( 0 === $ configElements -> length ) { return [ ] ; } return $ this -> extractHash ( $ configElements -> item ( 0 ) ) ; }
Extract configuration hash from a template .
35,375
private function addCustomTagsSection ( NodeBuilder $ ezRichTextNode ) { return $ ezRichTextNode -> arrayNode ( 'custom_tags' ) -> useAttributeAsKey ( 'tag' ) -> arrayPrototype ( ) -> children ( ) -> scalarNode ( 'template' ) -> isRequired ( ) -> end ( ) -> scalarNode ( 'icon' ) -> defaultNull ( ) -> end ( ) -> scalarN...
Define RichText Custom Tags Semantic Configuration .
35,376
private function addAlloyEditorSection ( NodeBuilder $ ezRichTextNode ) { return $ ezRichTextNode -> arrayNode ( 'alloy_editor' ) -> children ( ) -> arrayNode ( 'extra_plugins' ) -> example ( [ 'plugin1' , 'plugin2' ] ) -> prototype ( 'scalar' ) -> end ( ) -> end ( ) -> arrayNode ( 'extra_buttons' ) -> arrayPrototype (...
Define RichText AlloyEditor Semantic Configuration .
35,377
protected function extractConfiguration ( DOMElement $ embed ) { $ hash = [ ] ; $ configElements = $ embed -> getElementsByTagName ( 'ezconfig' ) ; if ( $ configElements -> length ) { $ hash = $ this -> extractHash ( $ configElements -> item ( 0 ) ) ; } return $ hash ; }
Extracts configuration hash from embed element .
35,378
protected function extractHash ( DOMNode $ configHash ) { $ hash = [ ] ; foreach ( $ configHash -> childNodes as $ node ) { if ( $ node -> nodeType === XML_ELEMENT_NODE ) { $ hash [ $ node -> getAttribute ( 'key' ) ] = $ this -> extractHash ( $ node ) ; } elseif ( $ node -> nodeType === XML_TEXT_NODE && ! $ node -> isW...
Recursively extracts data from XML hash structure .
35,379
protected function extractLinkParameters ( DOMElement $ embed ) { $ links = $ embed -> getElementsByTagName ( 'ezlink' ) ; if ( $ links -> length !== 1 ) { return null ; } $ link = $ links -> item ( 0 ) ; $ hrefResolved = $ link -> getAttribute ( 'href_resolved' ) ; if ( empty ( $ hrefResolved ) ) { $ this -> logger ->...
Extracts link parameters from embed element .
35,380
protected function isLinkWrapped ( DOMElement $ element ) { $ parentNode = $ element -> parentNode ; if ( $ parentNode instanceof DOMDocument ) { return false ; } elseif ( $ parentNode -> localName === 'link' ) { $ childCount = 0 ; foreach ( $ parentNode -> childNodes as $ node ) { if ( ! ( $ node -> nodeType === XML_T...
Returns boolean signifying if the embed is contained in a link element of not .
35,381
public function getContentIds ( array $ remoteIds ) { $ objectRemoteIdMap = [ ] ; if ( ! empty ( $ remoteIds ) ) { $ q = $ this -> getConnection ( ) -> createSelectQuery ( ) ; $ q -> select ( 'id' , 'remote_id' ) -> from ( 'ezcontentobject' ) -> where ( $ q -> expr -> in ( 'remote_id' , $ remoteIds ) ) ; $ statement = ...
Returns a list of Content ids for a list of remote ids .
35,382
protected function checkContentPermissions ( Content $ content ) { if ( ! $ this -> authorizationChecker -> isGranted ( new AuthorizationAttribute ( 'content' , 'read' , [ 'valueObject' => $ content ] ) ) && ! $ this -> authorizationChecker -> isGranted ( new AuthorizationAttribute ( 'content' , 'view_embed' , [ 'value...
Check embed permissions for the given Content .
35,383
protected function collectErrors ( ) { if ( $ this -> useInternalErrors === null ) { throw new RuntimeException ( 'Error recording not started' ) ; } $ xmlErrors = libxml_get_errors ( ) ; $ errors = [ ] ; foreach ( $ xmlErrors as $ error ) { $ errors [ ] = $ this -> formatLibXmlError ( $ error ) ; } libxml_clear_errors...
Returns formatted errors from libxml error buffer and restores previous setting for libxml error handling .
35,384
private function setupDeprecatedConfiguration ( NodeBuilder $ nodeBuilder ) { $ nodeBuilder -> arrayNode ( 'output_custom_tags' ) -> setDeprecated ( 'DEPRECATED. Configure custom tags using custom_tags node' ) -> info ( 'Custom XSL stylesheets to use for RichText transformation to HTML5. Useful for "custom tags".' ) ->...
Add BC setup for deprecated configuration .
35,385
public function movePackage ( $ package ) { if ( ! empty ( $ package -> dependencies ) ) { foreach ( $ package -> dependencies as $ dependency ) { $ this -> movePackage ( $ dependency ) ; } } $ this -> mover -> movePackage ( $ package ) ; }
Move all the packages over one by one starting on the deepest level of dependencies .
35,386
public function replacePackage ( $ package ) { if ( ! empty ( $ package -> dependencies ) ) { foreach ( $ package -> dependencies as $ dependency ) { $ this -> replacePackage ( $ dependency ) ; } } $ this -> replacer -> replacePackage ( $ package ) ; }
Replace contents of all the packages one by one starting on the deepest level of dependencies .
35,387
private function findPackages ( $ slugs ) { $ packages = [ ] ; foreach ( $ slugs as $ package_slug ) { $ packageDir = $ this -> workingDir . '/vendor/' . $ package_slug . '/' ; if ( ! is_dir ( $ packageDir ) ) { continue ; } $ package = new Package ( $ packageDir ) ; $ package -> findAutoloaders ( ) ; $ config = json_d...
Loops through all dependencies and their dependencies and so on ... will eventually return a list of all packages required by the full tree .
35,388
protected function renderDropdown ( $ itemNumber , & $ items , & $ panes ) { $ itemActive = false ; foreach ( $ items as $ n => & $ item ) { if ( is_string ( $ item ) ) { continue ; } if ( isset ( $ item [ 'visible' ] ) && ! $ item [ 'visible' ] ) { continue ; } if ( ! ( array_key_exists ( 'content' , $ item ) xor arra...
Normalizes dropdown item options by removing tab specific keys content and contentOptions and also configure panes accordingly .
35,389
public function renderControls ( ) { if ( isset ( $ this -> controls [ 0 ] , $ this -> controls [ 1 ] ) ) { return Html :: a ( $ this -> controls [ 0 ] , '#' . $ this -> options [ 'id' ] , [ 'class' => 'left carousel-control' , 'data-slide' => 'prev' , ] ) . "\n" . Html :: a ( $ this -> controls [ 1 ] , '#' . $ this ->...
Renders previous and next control buttons .
35,390
public function get ( $ modelId , $ params = array ( ) ) { $ resource = 'model/' . $ modelId . '.json' ; $ resource .= '?' . $ this -> buildQueryString ( $ params ) ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ getModelResponse = new Models \ ResponseModelGet ( $ response ) ; return $ getModelResponse ...
Get model information
35,391
public function getInfo ( $ modelId , $ params = array ( ) ) { $ resource = 'model/' . $ modelId . '/info.json' ; $ resource .= '?' . $ this -> buildQueryString ( $ params ) ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ getModelInfoResponse = new Models \ ResponseModelInfoGet ( $ response ) ; return $ ...
Get model short information
35,392
public function getOffers ( $ modelId , $ params = array ( ) ) { $ resource = 'model/' . $ modelId . '/offers.json' ; $ resource .= '?' . $ this -> buildQueryString ( $ params ) ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ getOffersResponse = new Models \ ResponseModelOffersGet ( $ response ) ; return...
Get offers in model
35,393
public function getOutlets ( $ modelId , $ params = array ( ) ) { $ resource = 'model/' . $ modelId . '/outlets.json' ; $ resource .= '?' . $ this -> buildQueryString ( $ params ) ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ getOutletsResponse = new Models \ ResponseModelOutletsGet ( $ response ) ; re...
Get outlets of model
35,394
public function getReviews ( $ modelId ) { $ resource = 'model/' . $ modelId . '/reviews.json' ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ getReviewsResponse = new Models \ ResponseModelReviewsGet ( $ response ) ; return $ getReviewsResponse ; }
Get reviews of model
35,395
public function getOpinions ( $ modelId , $ params = array ( ) ) { $ resource = 'model/' . $ modelId . '/opinion.json' ; $ resource .= '?' . $ this -> buildQueryString ( $ params ) ; $ response = $ this -> getServiceResponse ( $ resource ) ; $ modelOpinions = new Models \ ResponseModelOpinionsGet ( $ response ) ; retur...
Get opinions of model
35,396
public function add ( $ geoRegion ) { if ( is_array ( $ geoRegion ) ) { $ this -> collection [ ] = new GeoRegion ( $ geoRegion ) ; } elseif ( is_object ( $ geoRegion ) && $ geoRegion instanceof GeoRegion ) { $ this -> collection [ ] = $ geoRegion ; } return $ this ; }
Add geo region to collection
35,397
protected function sendGetRequest ( $ resource , $ params = [ ] ) { $ response = $ this -> sendRequest ( 'GET' , $ this -> getServiceUrl ( $ resource , $ params ) , [ 'headers' => [ 'Accept' => 'application/x-yametrika+json' , 'Content-Type' => 'application/x-yametrika+json' , 'Authorization' => 'OAuth ' . $ this -> ge...
Send GET request to API resource
35,398
protected function getNextPartOfList ( $ url , $ data = [ ] ) { $ response = $ this -> sendRequest ( 'GET' , $ url , [ 'headers' => [ 'Accept' => 'application/x-yametrika+json' , 'Content-Type' => 'application/x-yametrika+json' , 'Authorization' => 'OAuth ' . $ this -> getAccessToken ( ) , ] ] ) ; $ decodedResponseBody...
Send custom GET request to API resource
35,399
protected function sendPostRequest ( $ resource , $ params ) { $ response = $ this -> sendRequest ( 'POST' , $ this -> getServiceUrl ( $ resource ) , [ 'headers' => [ 'Accept' => 'application/x-yametrika+json' , 'Content-Type' => 'application/x-yametrika+json' , 'Authorization' => 'OAuth ' . $ this -> getAccessToken ( ...
Send POST request to API resource