-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change partner ruby client to return Sift::Response (#11)
Change partner ruby client to return response
- Loading branch information
1 parent
8125c9c
commit 460ba24
Showing
6 changed files
with
32 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,13 +31,17 @@ Alternatively, you can install the gem from Rubyforge: | |
partner_client = SiftPartner::Client.new(partner_api_key, partner_acct_id) | ||
|
||
# create a new account for a given merchant | ||
merchant_account = partner_client.new_account( | ||
merchant_account_response = partner_client.new_account( | ||
"merchantsite.com", # the url for the merchant's site | ||
"[email protected]", # an email belonging to the merchant | ||
"[email protected]", # an email used to log in to Sift | ||
"s0m3l0ngp455w0rd" # password associated with that log in | ||
) | ||
|
||
merchant_account_response.ok? # returns true or false | ||
merchant_account_response.body # API response body | ||
merchant_account_response.http_status_code # HTTP response code, 200 is ok. | ||
|
||
# get a listing of all your accounts | ||
all_accounts = partner_client.get_accounts | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
module SiftPartner | ||
VERSION = "0.0.4" | ||
VERSION = "0.1.0" | ||
API_VERSION = "3" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters