Module: Tamara::JsonSchemas::MerchantUrl
- Defined in:
- lib/tamara/json_schemas/merchant_url.rb
Class Method Summary collapse
Class Method Details
.schema(allows_null: false) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/tamara/json_schemas/merchant_url.rb', line 4 def self.schema(allows_null: false) { "$schema": "http://json-schema.org/draft-06/schema", type: ["object", (allows_null ? "null" : nil)].compact, properties: { cancel: Types::Url.schema, failure: Types::Url.schema, success: Types::Url.schema, notification: Types::Url.schema(allows_null: true) }, required: %w[cancel failure success] } end |