Skip to content

Instantly share code, notes, and snippets.

@alexanderfrankel
Last active July 31, 2020 18:28
Show Gist options
  • Save alexanderfrankel/6c4604d77f18d7d1b881de5d4b21a5f5 to your computer and use it in GitHub Desktop.
Save alexanderfrankel/6c4604d77f18d7d1b881de5d4b21a5f5 to your computer and use it in GitHub Desktop.

Revisions

  1. alexanderfrankel revised this gist Jul 31, 2020. 1 changed file with 36 additions and 15 deletions.
    51 changes: 36 additions & 15 deletions generate_bills_request.rb
    Original file line number Diff line number Diff line change
    @@ -1,35 +1,56 @@
    {
    "occupancy_id" => "123",
    "preview" => "1",
    "zuora_building" => "false",
    "billing_type" => "zuora",
    "payers" => [
    {
    "id" => "123",
    "name" "asd"
    "email" "[email protected]",
    "split_percentage" "50",
    "security_deposit_amount_cents" "1000_00"
    "name" => "asd",
    "email" => "[email protected]"
    },
    {
    "id" => "456",
    "name" "fgh"
    "email" "[email protected]",
    "split_percentage" "50",
    "security_deposit_amount_cents" "750_00"
    "name" => "fgh",
    "email" => "[email protected]"
    },
    {
    "id" => "789",
    "name" => "GOV",
    "email" => "[email protected]"
    }
    ],
    "fees" => [
    "collateral_fee" => {
    "type" => "security_deposit",
    "payer_amounts" => [
    {
    "payer_email" => "[email protected]",
    "amount_cents" => "750_00"
    },
    {
    "payer_email" => "[email protected]",
    "amount_cents" => "750_00"
    },
    {
    "payer_email" => "[email protected]",
    "amount_cents" => "0"
    }
    ]
    },
    "recurring_fees" => [
    {
    "id" => "123",
    "type" => "occupancy_fee",
    "amount" => "1500_00", # comes from inventory rent data
    "split_percentages" => [
    "payer_amounts" => [
    {
    "payer_email" => "[email protected]",
    "split_percentage" => "50" # comes from payer split
    "amount_cents" => "250_00"
    },
    {
    "payer_email" => "[email protected]",
    "split_percentage" => "50" # comes from payer split
    "amount_cents" => "250_00"
    },
    {
    "payer_email" => "[email protected]",
    "amount_cents" => "1000_00"
    }
    ]
    }
  2. alexanderfrankel created this gist Jul 31, 2020.
    37 changes: 37 additions & 0 deletions generate_bills_request.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    {
    "occupancy_id" => "123",
    "preview" => "1",
    "zuora_building" => "false",
    "payers" => [
    {
    "id" => "123",
    "name" "asd"
    "email" "[email protected]",
    "split_percentage" "50",
    "security_deposit_amount_cents" "1000_00"
    },
    {
    "id" => "456",
    "name" "fgh"
    "email" "[email protected]",
    "split_percentage" "50",
    "security_deposit_amount_cents" "750_00"
    }
    ],
    "fees" => [
    {
    "type" => "occupancy_fee",
    "amount" => "1500_00", # comes from inventory rent data
    "split_percentages" => [
    {
    "payer_email" => "[email protected]",
    "split_percentage" => "50" # comes from payer split
    },
    {
    "payer_email" => "[email protected]",
    "split_percentage" => "50" # comes from payer split
    }
    ]
    }
    ]
    }