Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wip] Instantiated services #766

Closed
wants to merge 1 commit into from
Closed

[wip] Instantiated services #766

wants to merge 1 commit into from

Conversation

ob-stripe
Copy link
Contributor

@ob-stripe ob-stripe commented Oct 17, 2019

cc @remi-stripe

Pretty experimental yet, but it works. I will polish this up and split it into smaller PRs.

Sample syntax:

require_once('vendor/autoload.php');

// Instantiate client
$stripe = new \Stripe\StripeClient("sk_test_123");

// Retrieve method
$coupon = $stripe->coupons->retrieve("mycoupon");

// Create method, namespaced resource
$issuingCard = $stripe->issuing->cards->create(["authorization_controls" => ["max_amount" => 123]]);

// Custom method, namespaced resource
$details = $stripe->issuing->cards->details("ic_123");

// Update method, nested polymorphic resource
$updatedPaymentSource = $stripe->paymentSources->update("cus_123", " card_123", ["metadata" => ["key" => "value"]]);

@ob-stripe ob-stripe mentioned this pull request Oct 18, 2019
@ob-stripe
Copy link
Contributor Author

Closing in favor of #771.

@ob-stripe ob-stripe closed this Mar 25, 2020
@ob-stripe ob-stripe deleted the ob-services-2 branch March 25, 2020 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant