<?php
 namespace Stripe; class PaymentMethod extends ApiResource { const OBJECT_NAME = 'payment_method'; use ApiOperations\All; use ApiOperations\Create; use ApiOperations\Retrieve; use ApiOperations\Update; public function attach($params = null, $opts = null) { $url = $this->instanceUrl() . '/attach'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } public function detach($params = null, $opts = null) { $url = $this->instanceUrl() . '/detach'; list($response, $opts) = $this->_request('post', $url, $params, $opts); $this->refreshFrom($response, $opts); return $this; } } 