Skip to content

Instantly share code, notes, and snippets.

@mbeale
mbeale / gist:2731920
Created May 19, 2012 18:46
GO and XML sample2
//Account struct
type Account struct{
XMLName xml.Name `xml:"account"`
AccountCode string `xml:"account_code"`
Username string `xml:"username"`
Email string `xml:"email"`
State string `xml:"state,omitempty"`
FirstName string `xml:"first_name"`
LastName string `xml:"last_name"`
CompanyName string `xml:"company_name"`
@mbeale
mbeale / gist:2731904
Created May 19, 2012 18:42
GO and XML sample1
//Account struct
type Account struct{
account_code, username,email, state, first_name string
last_name, company_name, accept_language string
hosted_login_token, created_at string
}
@mbeale
mbeale / gist:2473165
Created April 23, 2012 19:11
PHP v2 recurly upgrade subscription add_on
$subscription = Recurly_Subscription::get('17caaca1716f33572edc8146e0aaefde');
$add_on = new Recurly_SubscriptionAddOn();
$add_on->quantity = 2;
$add_on->add_on_code = 'extraip';
$subscription->subscription_add_ons[] = $add_on;
$subscription->updateImmediately();
@mbeale
mbeale / gist:2361290
Created April 11, 2012 18:41
recurly sub sample
subscription = Recurly::Subscription.create(
:plan_code => 'standard',
:currency => 'USD',
:add_ons => [{
:add_on => {
:add_on_code => 'extraip',
:quantity => 1
}
}],
:account => {