Skip to content

Instantly share code, notes, and snippets.

@geermc4
Created August 20, 2012 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geermc4/3408096 to your computer and use it in GitHub Desktop.
Save geermc4/3408096 to your computer and use it in GitHub Desktop.
sample job
c.add_job('test') do
api = Quickbooks::API[:qb]
h = {
"customer_add"=> {
"name"=>"German",
"is_active"=>"true",
#"parent_ref"=> {
# "list_id"=>"",
# "full_name"=>""
#},
"company_name"=>"3D Robotics",
"salutation"=>"",
"first_name"=>"German",
"middle_name"=>"",
"last_name"=>"Garcia Rodriguez",
"suffix"=>"",
"bill_address"=>{
"addr1"=>"7170 Convoy Ct",
"addr2"=>"",
"addr3"=>"",
"addr4"=>"",
"addr5"=>"",
"city"=>" San Diego",
"state"=>"CA",
"postal_code"=>"92111",
"country"=>"US",
"note"=>""
},
"ship_address"=>{
"addr1"=>"7170 Convoy Ct",
"addr2"=>"",
"addr3"=>"",
"addr4"=>"",
"addr5"=>"",
"city"=>"San Diego",
"state"=>"CA",
"postal_code"=>"92111",
"country"=>"US",
"note"=>""
},
# "print_as"=>"",
# "phone"=>"",
# "mobile"=>"",
# "pager"=>"",
# "alt_phone"=>"",
# "fax"=>"",
"email"=>"german@3drobotics.com",
# "contact"=>"",
# "alt_contact"=>"",
# "customer_type_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "terms_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "sales_rep_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
"open_balance"=>"20",
"open_balance_date"=>"8/17/2012",
# "sales_tax_code_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "item_sales_tax_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "sales_tax_country"=>"",
# "resale_number"=>"",
"account_number"=>"123",
"credit_limit"=>"10",
# "preferred_payment_method_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "credit_card_info"=>{
# "credit_card_number"=>"",
# "expiration_month"=>"Fixnum",
# "expiration_year"=>"Fixnum",
# "name_on_card"=>"",
# "credit_card_address"=>"",
# "credit_card_postal_code"=>""
# },
# "job_status"=>"",
# "job_start_date"=>"",
# "job_projected_end_date"=>"",
# "job_end_date"=>"",
# "job_desc"=>"",
# "job_type_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# },
# "notes"=>"",
# "is_statement_with_parent"=>"FalseClass",
# "delivery_method"=>"",
# "price_level_ref"=>{
# "list_id"=>"",
# "full_name"=>""
# }
},
# "include_ret_element"=>""
}
a.hash_to_qbxml(h)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment