Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jhalickman on github.
  • I am jhalickman (https://keybase.io/jhalickman) on keybase.
  • I have a public key whose fingerprint is 4316 3B7C 9285 2E19 473A 7774 0072 35E4 7F4B B4DF

To claim this, I am signing this object:

diff --git a/DwollaOAuth/DwollaOAuthEngine.h b/DwollaOAuth/DwollaOAuthEngine.h
index d65a068..6203dc4 100644
--- a/DwollaOAuth/DwollaOAuthEngine.h
+++ b/DwollaOAuth/DwollaOAuthEngine.h
@@ -108,6 +108,12 @@ extern NSString *const DwollaEngineTokenKey;
withFundsSource:(NSString *) fundSource
withFacilitatorAmount:(NSDecimalNumber *) facilitatorAmount;
+- (DwollaConnectionID *)requestMoneyWithPin:(NSString *) pin
+ withSourceId:(NSString *) sourceId
hplib/REST/ORMFormatter/Filter.php
@@ -99,8 +99,7 @@ protected function convertCurrencyFields($record,$filtered_record, $fields, $fro
try {
$target_currency = $currency_lookup->getCurrency($to_currency_code);
} catch (Exception_CurrencyNotFound $e) {
- throw new REST_Exception_BadRequest($to_currency_code." is not a valid currency");
- return;
+ return $filtered_record;
}
hplib/REST/ORMFormatter/Filter.php
@@ -99,8 +99,7 @@ protected function convertCurrencyFields($record,$filtered_record, $fields, $fro
try {
$target_currency = $currency_lookup->getCurrency($to_currency_code);
} catch (Exception_CurrencyNotFound $e) {
- throw new REST_Exception_BadRequest($to_currency_code." is not a valid currency");
- return;
+ return $filtered_record;
}
NSLog(@"appFinishedLaunching: %@", aNotification);
gistSender = [[GistSender alloc] init];
gistSender.success = ^(NSURL *url) {
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
[pasteboard setString:[url absoluteString] forType:NSPasteboardTypeString];
[self pushGistToHistoryQueue:url];
};
All error objects have resource and field properties so that your client can tell what the problem is. There’s also an error code to let you know what is wrong with the field. These are the possible validation error codes:
missing
This means a resource does not exist.
missing_field
This means a required field on a resource has not been set.
invalid
This means the formatting of a field is invalid. The documentation for that resource should be able to give you more specific information.
already_exists
This means another resource has the same value as this field. This can happen in resources that must have some unique key (such as Label names).
gistSender.success = ^(NSURL *url) {
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
[pasteboard setString:[url absoluteString] forType:NSPasteboardTypeString];
[self pushGistToHistoryQueue:url];
};
gistSender.fail = ^(NSString *message) {
NSAlert *alert = [NSAlert alertWithMessageText:message defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@""];
[alert runModal];
gistSender.success = ^(NSURL *url) {
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
[pasteboard clearContents];
[pasteboard setString:[url absoluteString] forType:NSPasteboardTypeString];
[self pushGistToHistoryQueue:url];
};
gistSender.fail = ^(NSString *message) {
NSAlert *alert = [NSAlert alertWithMessageText:message defaultButton:@"OK" alternateButton:nil otherButton:nil informativeTextWithFormat:@""];
[alert runModal];
NSString *safeGist = (NSString*)CFURLCreateStringByAddingPercentEscapes(NULL,
(CFStringRef)gist,
NULL,
(CFStringRef)@";/?:@&=+$,",
kCFStringEncodingUTF8);
NSString *body = [NSString stringWithFormat:@"file_contents[gistfile1]=%@&file_ext[gistfile1]=%@", safeGist, ext];
[safeGist release];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *urlString = [NSString stringWithFormat:@"%@/gists", [defaults stringForKey:@"GIST_URL"]];
NSString *safeGist = (NSString*)CFURLCreateStringByAddingPercentEscapes(NULL,
(CFStringRef)gist,
NULL,
(CFStringRef)@";/?:@&=+$,",
kCFStringEncodingUTF8);
NSString *body = [NSString stringWithFormat:@"file_contents[gistfile1]=%@&file_ext[gistfile1]=%@", safeGist, ext];
[safeGist release];
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSString *urlString = [NSString stringWithFormat:@"%@/gists", [defaults stringForKey:@"GIST_URL"]];