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
require 'stripe' | |
require 'easypost' | |
Stripe.api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
EasyPost.api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" | |
SHIPPING_ORIGIN_ADDRESS = { | |
company: "EasyPost", | |
street1: "417 Montgomery St", | |
street2: "5 FL", |
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
<?php | |
require_once("../lib/easypost.php"); | |
\EasyPost\EasyPost::setApiKey('cueqNZUb3ldeWTNX7MU3Mel8UXtaAMUi'); | |
$base_params = array( | |
"start_datetime" => "2015-07-01", | |
"end_datetime" => "2015-08-01", | |
"purchased" => false, // actually means only_purchased? | |
"page_size" => 10 |
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
package com.easypost; | |
import com.easypost.model.*; | |
import org.junit.BeforeClass; | |
import org.junit.Test; | |
import org.junit.Rule; | |
import org.junit.rules.ExpectedException; | |
import java.text.ParseException; | |
import java.util.HashMap; |
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 program will take swag.csv and create a batch of USPS | |
# shipping labels in one PDF file for easy printing using | |
# the EasyPost simple shipping API. | |
# | |
# If you have any questions about EasyPost or want help | |
# modifying this script for other carriers or a non-US | |
# source address please email us anytime at contact@easypost.com | |
# | |
# Usage: | |
# easypost_batch_from_csv.rb |