{
"account" => {
"v1" => {
"token" => {
"type" => "object",
"required" => [],
"properties" => {
"expire" => {
"type" => "integer",
"minimum" => 0,
},
},
},
},
},
"call" => common_schema.clone,
"hlr" => common_schema.clone,
"whois" => {
"v1" => {
"lookup" => {
"type" => "object",
"required" => ["to"],
"properties" => {
"to" => to_schema,
},
},
},
},
"general" => {},
"voice" => common_schema.clone.deep_merge(
{
"v1" => {
"send" => {
"type" => "object",
"required" => ["txt"],
"properties" => {
"txt" => {
"type" => "string",
"minlength" => 1,
"maxlength" => 5,
"pattern" => "^[0-9]+",
},
"lang" => {
"type" => "string",
},
},
},
},
}
),
"pay" => common_schema.clone.deep_merge({
"v1" => {
"send" => {
"type" => "object",
"required" => ["amount"],
"properties" => {
"amount" => {
"type" => "number",
"min" => 1,
},
"tag" => {
"type" => "string",
},
},
},
},
}),
"sms" => common_schema.clone.deep_merge(
{
"v1" => {
"send" => {
"type" => "object",
"required" => ["txt"],
"properties" => {
"txt" => {
"type" => "string",
"minlength" => 1,
},
"from" => {
"type" => "string",
},
"tag" => {
"type" => "string",
},
"hidden" => {
"type" => "string",
},
},
},
},
}
),
"viber" => common_schema.clone.deep_merge(
{
"v1" => {
"send" => {
"type" => "object",
"required" => ["txt"],
"properties" => {
"txt" => {
"type" => "string",
"minlength" => 1,
},
"from" => {
"type" => "string",
},
"cascade" => {
"type" => "string",
"allowed" => ["sms", "voice"],
},
},
},
},
}
),
"social" => common_schema.clone.deep_merge(
{
"v1" => {
"send" => {
"type" => "object",
"required" => ["txt"],
"properties" => {
"txt" => {
"type" => "string",
"minlength" => 1,
},
"from" => {
"type" => "string",
},
"tag" => {
"type" => "string",
},
"hidden" => {
"type" => "string",
},
},
},
},
}
),
}
{
"account" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["account"],
"versions" => {
"v1" => {
"balance" => {
"args" => nil,
"method" => "GET",
},
"token" => {
"args" => ["params"],
"method" => "POST",
},
"tariff" => {
"args" => nil,
"method" => "GET",
},
},
},
},
"general" => {
"schema" => {},
"static" => true,
"versions" => {
"v1" => {
"status" => {
"args" => nil,
"method" => "GET",
},
},
},
},
"call" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["call"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"whois" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["whois"],
"versions" => {
"v1" => {
"lookup" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"voice" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["voice"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"pay" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["pay"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"hlr" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["hlr"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"sms" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["sms"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"viber" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["viber"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
"social" => {
"schema" => GreenSMS::VALIDATION_SCHEMA["social"],
"versions" => {
"v1" => {
"send" => {
"args" => ["params"],
"method" => "POST",
},
"status" => {
"args" => ["params"],
"method" => "GET",
},
},
},
},
}