 Audience > Audience > Audience > Audience > Accounts >. Custom Domain
To complete the branding of your Developer Portal, you’ll probably want to have it appear under your own corporate domain name at a location like or. The most popular option among 3scale customers is developer.mydomain.com.
The 3scale SaaS platform manages the SSL certificate, issued by the Let’s Encrpyt certificate authority, for the custom developer portal domain.
Follow the steps below to change the URL of your Developer Portal to one under your own company domain name.
6.1. Prerequisites
- You must be subscribed to a paid 3scale plan
- You must have a Red Hat account with a valid 3scale entitlement
If you need help with your Red Hat account, contact Red Hat customer service
6.2. Step 1: Add’s not possible to define a redirect from mydomain.3scale.net to your custom domain, so you’ll need to inform your users about the domain change.
It
6.3. Step 2 (Optional): Add a CAA Record to Your DNS Setup.
6.4. Step 3: Contact.
6.5. Step 4: Review Your Developer Portal
Once you receive confirmation from Red Hat support regarding your domain change, review and test your Developer Portal. Ensure any non-relative links to your custom domain are updated.
Chapter_21<<.
Chapter 8..
8
8.2. Credit card notifications
- Credit card expired notification for provider
- Credit Card expired notification for buyer
You can use the following liquid drops:
user_account ⇒ Account
account ⇒ Account
provider_account ⇒ Provider
provider ⇒ Provider
8.3. Limit alerts
- Alert notification for provider (>= 100%)
- Alert notification for buyer (>= 100%)
- Alert notification for provider (< 100%)
- Alert notification for buyer (< 100%)
have access to:
application ⇒ Application
account ⇒ Account
provider ⇒ Provider
service ⇒ Service
alert ⇒ Alert
8
8
8
8.7. Signup
The following email templates…
have access to:
user ⇒ User
provider ⇒ Provider
url ⇒ activate_url
Chapter 9..
9
9 %}
9.4.1.1. Methods
9.4.1.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ account.errors.name | inline_errors }}
9.4.1.1.2. id
Returns the id of the account
9.4.1.1.3. name
Returns the organization name of the developer’s account
9.4.1.1.4. vat_zero_text
Return a text about a vat zero
9.4.1.1.5. vat_rate
Return the vat rate
9.4.1.1.6. unread_messages
Unread messages
9.4.1.1.7. latest_messages
Return the latest messages
9.4.1.1.8. bought_account_plan
Returns the plan the account has contracted
9.4.1.1.9. bought_account_contract
Returns the contract account
9.4.1.1.10. credit_card_display_number
9.4.1.1.11. credit_card_expiration_date
9.4.1.1.12. credit_card_required?
Returns whether the account is required to enter credit card details
9.4.1.1.13. credit_card_stored?
Returns whether the account has credit card details stored
9.4.1.1.14. credit_card_missing?
Returns whether the account has no credit card details stored
9.4.1.1.15. timezone
Returns timezone of this account
9.4.1.1.16. paid?
Returns whether the account has at least a paid contract
9.4.1.1.17. on_trial?
Returns whether the account is on trial period, i.e. all his paid contracts has to be in trial period
9.4.1.1.18. telephone_number
Returns the telephone number of the account
9.4.1.1.19. approval_required?
Returns whether the account requires approval?
9.4.1.1.20. created_at
Returns UNIX timestamp of account creation (signup) Example: Converting timestamp to JavaScript Date
<script> var data = new Date({{ account.created_at }} * 1000); </script>
9.4.1.1.21. full_address
Can be composed by legal address, city and state
9.4.1.1.22. applications
Returns the applications of the account
9.4.1.1.23. subscribed_services
Returns a array with ServiceContract drops
9.4.1.1.24. admin
Returns the admin user of this account
9.4.1.1.25. extra_fields_plain_text
Returns the extra fields defined for the account as plain text
9.4.1.1.26. fields_plain_text
Returns the fields defined for the account as plain text
9.4.1.1.27. extra_fields
Returns only extra fields with values of this account Example: Print all extra fields
{% for field in account.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.1.1.28. fields
Returns all fields with values of this account Example: Print all fields
{% for field in account.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.1.1.29. builtin_fields
9.4.1.1.30. multiple_applications_allowed?
9.4.1.1.31. billing_address
Returns the billing address of this account
9.4.1.1.32. has_billing_address?
Returns whether this account has a billing address or not
9.4.1.1.33. can
Give access to permission methods
{% if account.can.be_deleted? %} <!-- do something --> {% endif %}
9.4.1.1.34. edit_url
9.4.1.1.35. edit_ogone_billing_address_url
9.4.1.1.36. edit_payment_express_billing_address_url
9.4.1.1.37. edit_braintree_blue_credit_card_details_url
9.4.1.1.38. domain
9.4.1.1.39. upgraded?
9.4.1.1.40. requires_credit_card?
9.4.1.1.41. support_email
9.4.1.1.42. finance_support_email
Example: Using account plan drop in liquid
<p class="notice">The examples for plan drop apply here</p>
9.4.2.1. Methods
9.4.2.1.1. selected?
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
9.4.2.1.2. bought?
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
9.4.2.1.3. features
Returns an array of available features
9.4.2.1.4. setup_fee
Returns the setup fee
9.4.2.1.5. name
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
9.4.2.1.6. system_name
Returns the system name of the plan
{% for plan in available_plans %} {% if plan.system_name == 'my_free_plan' %} <p>You will buy our only free plan!</p> {% endif %} {% endfor %}
9.4.2.1.7. id
Returns the plan id
9.4.2.1.8. free?
The plan is free if it is not 'paid' (see the 'paid?' method)
{% if plan.free? %} <p>This plan is free of charge.</p> {% else %} <p>Plan costs</p> Setup fee {{ plan.setup_fee }} Flat cost {{ plan.flat_cost }} {% endif %}
9.4.2.1.9. paid?
The plan is 'paid' when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
9.4.2.1.10. approval_required?
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
9.4.2.1.11. flat_cost
Returns the monthly fixed fee of the plan
Example: Using alert drop in liquid
<h2>Alert details</h2> Level {{ alert.level }} Message {{ alert.message }} Utilization {{ alert.utilization }}
9.4.3.1. Methods
9.4.3.1.1. level
The alert level can be one of 50, 80, 90, 100, 120, 150, 200, 300.
9.4.3.1.2. message
Text message describing the alert, for example 'hits per minute: 5 of 5'
9.4.3.1.3. utilization
Decimal number marking the actual utilization that triggered the alert (1.0 is equal to 100%).
Used by {{ alert.utilization | times: 100 }} percent.
Example: Using application drop in liquid
<h2>Application {{ application.name }} ({{ application.application_id }})</h2> <p>{{ application.description }}</p>
9.4.4.1. Methods
9.4.4.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ application.errors.name | inline_errors }}
9.4.4.1.2. id
Returns the id of the application
9.4.4.1.3. can_change_plan?
Returns 'true' if changing of the application is allowed either directly or by request.
9.4.4.1.4. trial?
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
9.4.4.1.5. live?
9.4.4.1.6. state
There are three possible states:
- pending - live - suspended
9.4.4.1.7. remaining_trial_period_days
Number of day still left in the trial period.
9.4.4.1.8. plan
Returns a plan drop with the plan of the application
9.4.4.1.9. plan_change_permission_name
Returns name of the allowed action
9.4.4.1.10. plan_change_permission_warning
Returns a warning messenger of the allowed action
9.4.4.1.11. contract
9.4.4.1.12. admin_url
Returns the admin_url of the application
9.4.4.1.13. name
Returns the name of the application
9.4.4.1.14. can
9.4.4.1.15. oauth
9.4.4.1.16. pending?
Returns 'true' if application state is pending
9.4.4.1.17. buyer_alerts_enabled?
9.4.4.1.18. description
Returns the description of the application
9.4.4.1.19. redirect_url
Returns the redirect url for the OAuth of the application
9.4.4.1.20. filters_limit
Returns the amount of referrer filters allowed for this application
9.4.4.1.21. keys_limit
Returns the amount of application keys allowed for this application
9.4.4.1.22. referrer_filters
Returns the referrer filters associated with this application
9.4.4.1.23. rejection_reason
Returns the reason for rejecting an application
9.4.4.1.24. user_key
Returns the user_key of application
9.4.4.1.25. application_id
Returns the application_id of an application
9.4.4.1.26. key
Returns the application id or the user key
9.4.4.1.27. url
Returns URL of the builtin detail view for this application.
9.4.4.1.28. edit_url
Returns URL of the builtin edit view for this application.
9.4.4.1.29. update_user_key_url
9.4.4.1.30. log_requests_url
9.4.4.1.31. alerts_url
9.4.4.1.32. application_keys_url
9.4.4.1.33. service
Service to which that application belongs to.
9 %}
9.4.4.1.35. oauth_mode?
9.4.4.1.36. user_key_mode?
9.4.4.1.37. app_id_mode?
9.4.4.1.38. change_plan_url
9.4.4.1.39. log_requests?
9.4.4.1.40. application_keys
9.4.4.1.41. extra_fields
Returns non-hidden extra fields with values for this application Example: Print all extra fields
{% for field in application.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.4.1.42. fields
Returns all builtin and extra fields with values for this application Example: Print all fields
{% for field in application.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.4.1.43. builtin_fields
Returns only builtin fields of the application
9.4.4.1.44. cinstance
9.4.5.1. Methods
9.4.5.1.1. id
9.4.5.1.2. value
9.4.5.1.3. url
9.4.5.1.4. application
9.4.6.1. Methods
9.4.6.1.1. selected?
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
9.4.6.1.2. bought?
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
9.4.6.1.3. features
Returns the visible features of the plan
{% if plan == my_free_plan %} <p>These plans are the same.</p> {% else %} <p>These plans are not the same.</p> {% endif %}
9.4.6.1.4. setup_fee
Returns the setup fee of the plan
9.4.6.1.5. name
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
9.4.6.1.6. system_name
Returns the system name of the plan
{% for plan in available_plans %} {% if plan.system_name == 'my_free_plan' %} <p>You will buy our only free plan!</p> {% endif %} {% endfor %}
9.4.6.1.7. id
Returns the plan id
9.4.6.1.8. free?
The plan is free if it is not 'paid' (see the 'paid?' method)
{% if plan.free? %} <p>This plan is free of charge.</p> {% else %} <p>Plan costs</p> Setup fee {{ plan.setup_fee }} Flat cost {{ plan.flat_cost }} {% endif %}
9.4.6.1.9. paid?
The plan is 'paid' when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
9.4.6.1.10. approval_required?
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
9.4.6.1.11. flat_cost
Returns the monthly fixed fee of the plan
9.4.6.1.12. metrics
Returns the metrics of the plan
9.4.6.1.13. usage_limits
Returns the usage limits of the plan
9.4.6.1.14. service
Returns the service of the plan
9.4.7.1. Methods
9.4.7.1.1. login_url
9.4.7.1.2. user_identified?
9.4.8.1. Methods
9.4.8.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ base.errors.name | inline_errors }}
9.4.8.1.2. title
Returns the title result
9.4.8.1.3. kind
Returns the kind of result, can be 'topic' or 'page'
9.4.8.1.4. url
Returns the resource url of the result
9.4.8.1.5. description
Returns a descriptive string for the result
9.4.9.1. Methods
9.4.9.1.1. input_name
9.4.9.1.2. label
9.4.9.1.3. choices
9.4.9.1.4. errors
9.4.9.1.5. html_id
9.4.9.1.7. visible?
9.4.9.1.8. read_only?
9.4.9.1.9. name
9.4.9.1.10. value
9.4.9.1.11. required
9.4.10.1. Methods
9.4.10.1.1. be_updated?
9.4.10.1.2. add_referrer_filters?
9.4.10.1.3. add_application_keys?
9.4.10.1.4. regenerate_user_key?
9.4.10.1.5. regenerate_oauth_secret?
9.4.10.1.6. manage_keys?
9.4.10.1.7. delete_key?
9.4.11.1. Methods
9.4.11.1.1. change_plan?
9.4.12.1. Methods
9.4.12.1.1. login_url
9.4.12.1.2. user_identified?
Plan of the contract {{ contract.plan.name }}
9.4.13.1. Methods
9.4.13.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ contract.errors.name | inline_errors }}
9.4.13.1.2. id
Returns the id
9.4.13.1.3. can_change_plan?
Returns true if any form of change is possible
9.4.13.1.4. trial?
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
9.4.13.1.5. live?
9.4.13.1.6. state
There are three possible states:
- pending - live - suspended
9.4.13.1.7. remaining_trial_period_days
Number of day still left in the trial period.
9.4.13.1.8. plan
Returns the plan of the contract
9.4.13.1.9. plan_change_permission_name
Returns name of the allowed action
9.4.13.1.10. plan_change_permission_warning
Returns a warning messenger of the allowed action
9.4.13.1.11. contract
9.4.14.1. Methods
9.4.14.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ country.errors.name | inline_errors }}
9.4.14.1.2. to_str
9.4.14.1.3. code
9.4.14.1.4. label
9.4.15.1. Methods
9.4.15.1.1. value
Returns ID of the country
{{ account.fields.country.value }} => 42 compare with: {{ account.fields.country }} => 'United States'
9.4.15.1.2. name
Returns system name of the field
9.4.15.1.3. required
9.4.15.1.6. visible?
9.4.15.1.7. visible
9.4.15.1.8. read_only
9.4.15.1.9. errors
9.4.15.1.10. input_name
9.4.15.1.11. html_id
9.4.15.1.12. label
Returns label of the field
{{ account.fields.country.label }} <!-- => 'Country' -->
9.4.15.1.13. to_str
Returns name of the country
{{ account.fields.country }} => 'United States'
9.4.15.1.14. choices
9.4.16.1. Methods
9.4.16.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ current_user.errors.name | inline_errors }}
9.4.16.1.2. admin?
Returns whether the user is an admin.
{% if user.admin? %} <p>You are an admin of your account.</p> {% endif %}
9.4.16.1.3. username
Returns the username of the user, html escaped.
9.4.16.1.4. account
Returns the account of the user.
9.4.16.1.5. name
Returns the first and surname of the user.
9.4.16.1.6. email
Returns the email of the user.
9.4.16.1.7. password_required?
This method will return
true for users using the builtin Developer Portal authentication mechanisms and
false for those that are authenticated via Janrain, CAS or other single-sign-on method.
{{ if user.password_required? }} {{ endif }}
9.4.16.1.8. sections
Returns the list of sections the user has access to.
{% if user.sections.size > 0 %} <p>You can access following sections of our portal:</p> <ul> {% for section in user.sections %} <li>{{ section }}</li> {% endfor %} </ul> {% endif %}
9.4.16.1.9. role
Returns the role of the user
9.4.16.1.10. roles_collection
Retuns a list of available roles for the user
{% for role in user.roles_collection %} <li> <label for="user_role_{{ role.key }}"> {{ role.text }} </label> </li> {% endfor %}
9.4.16.1.11. url
Return the resource url of the user
{{ 'Delete' | delete_button: user.url }}
9.4.16.1.12. edit_url
Return the url to edit the user
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
9 %}
9.4.16.1.14. extra_fields
Returns non-hidden extra fields with values for this user Example: Print all extra fields
{% for field in user.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.16.1.15. fields
Returns all fields with values for this user Example: Print all fields
{% for field in user.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.16.1.16. builtin_fields
Returns all builtin fields with values for this user
When a form fails to submit because of invalid data, the
errors array will be available on the related model.
9.4.17.1. Methods
9.4.17.1.1. attribute
Returns attribute of the model to this error is related
{{ account.errors.org_name.first.attribute }} <!-- org_name -->
9.4.17.1.2. message
Returns description of the error
{{ account.errors.first.message }} <!-- can't be blank -->
9.4.17.1.3. value
Returns value of the attribute to which the
error is related
{{ account.errors.org_name.first.value }} <!-- => "ACME Co." -->
9.4.17.1.4. to_str
Returns full description of the error (includes the attribute name)
{{ model.errors.first }} <!-- => "Attribute can't be blank" -->
Example: get all errors
{% for error in form.errors %} attribute: {{ error.attribute }} ... {% endfor %}
9.4.18.1. Methods
9.4.18.1.1. empty?
Returns true if there are no errors
{% if form.errors == empty %} Congratulations! You have no errors! {% endif %}
9.4.18.1.2. present?
Returns true if there are some errors
{% if form.errors == present %} Sorry, there were some errors. {% endif %}
9.4.19.1. Methods
9.4.19.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ feature.errors.name | inline_errors }}
9.4.19.1.2. name
Returns the name of the feature
<h2>Feature {{ feature.name }}</h2>
9.4.19.1.3. description
Returns the description of the feature
9.4.19.1.4. has_description?
Returns whether the feature has description
{% if feature.has_description? %} {{ feature.description }} {% else %} This feature has no description. {% endif %}
9.4.20.1. Methods
9.4.20.1.1. value
Returns value if the field
Name: {{ account.fields.first_name.value }}
9.4.20.1.2. name
Returns system name of the field
9.4.20.1.3. required
9.4.20.1.6. visible?
9.4.20.1.7. visible
9.4.20.1.8. read_only
9.4.20.1.9. errors
9.4.20.1.10. input_name
Returns name for the HTML input that is expected when the form is submitted.
<!-- the 'name' attribute will be 'account[country]' -->
9.4.20.1.11. html_id
Returns a unique field identifier that is commonly used as HTML ID attribute.
{{ account.fields.country.html_id }} <!-- => 'account_country' -->
9.4.20.1.12. label
Returns label of the field
{{ account.fields.country.label }} <!-- => 'Country' -->
9.4.20.1.13. to_str
Returns value of the field if used as variable
{{ account.fields.first_name }} => 'Tom'
9 %}
9.4.21.1. Methods
9.4.21.1.1. messages
Return an array of messages
{% for message in flash.messages %} <p id="flash-{{ message.type }}"> {{ message.text }} </p> {% endfor %}
9.4.22.1. Methods
9.4.22.1.1. enabled?
Returns true if you have forum functionality enabled.
{% if forum.enabled? %} <a href="/forum">Check out our forum!</a> {% endif %}
9.4.22.1.2. latest_posts
Provide useful strings for i18n support. {{ object.some_date | date: i18n.long_date }}
9.4.23.1. Methods
9.4.23.1.1. short_date
Alias for
%b %d
Dec 11
9.4.23.1.2. long_date
Alias for
%B %d, %Y
December 11, 2013
9>
9.4.24.1. Methods
9.4.24.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ invitation.errors.name | inline_errors }}
9.4.24.1.2. email
Returns email address
9.4.24.1.3. accepted?
Returns true if the invitation was accepted
9.4.24.1.4. accepted_at
Returns a date if the invitations was accepted
{{ invitation.accepted_at | date: i18n.short_date }}
9.4.24.1.5. sent_at
Returns the creation date
{{ invitation.sent_at | date: i18n.short_date }}
9.4.24.1.6. resend_url
Returns the url for resend the invitation
{{ "Resend" | update_button: invitation.resend_url}}
9.4.24.1.7. url
Returns the resource url
{{ "Delete" | delete_button: invitation.url }}
9.4.25.1. Methods
9.4.25.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ invoice.errors.name | inline_errors }}
9.4.25.1.2. friendly_id
Returns a friendly id
<td> {{ invoice.id }} </td> <td> {{ invoice.name }} </td> <td> {{ invoice.state }} </td> <td> {{ invoice.cost }} {{ invoice.currency }} </td>
9.4.25.1.3. name
String composed by month and year
9.4.25.1.4. state
9.4.25.1.5. cost
Returns a number with two decimals
23.00
9.4.25.1.6. currency
9.4.25.1.7. cost_without_vat
Returns cost withot VAT
9.4.25.1.8. vat_amount
Returns vat ammount
9.4.25.1.9. exists_pdf?
Return true if the pdf was generated
9.4.25.1.10. period_begin
{{ invoice.period_begin | date: i18n.short_date }}
9.4.25.1.11. period_end
{{ invoice.period_end | date: i18n.long_date }}
9.4.25.1.12. issued_on
{{ invoice.issued_on | date: i18n.long_date }}
9.4.25.1.13. due_on
{{ invoice.due_on | date: i18n.long_date }}
9.4.25.1.14. paid_on
{{ invoice.paid_on | date: i18n.long_date }}
9.4.25.1.15. vat_code
9.4.25.1.16. fiscal_code
9.4.25.1.17. account
Return a AccountDrop
9.4.25.1.18. buyer_account
9 %}
9 %}
9.4.25.1.21. url
Return the resource url of the invoice
{{ "Show" | link_to: invoice.url }}
9.4.25.1.22. pdf_url
Return the resource url of the invoice pdf
{{ "PDF" | link_to: invoice.pdf_url }}
9.4.26.1. Methods
9.4.26.1.1. login_url
9.4.26.1.2. user_identified?
9.4.26.1.3. session_url
9.4.26.1.4. relying_party
9.4.27.1. Methods
9.4.27.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ line_item.errors.name | inline_errors }}
9.4.27.1.2. name
{% for line_item in invoice.line_items %} <tr class="line_item {% cycle 'odd', 'even' %}"> <th>{{ line_item.name }}</th> <td>{{ line_item.description }}</td> <td>{{ line_item.quantity }}</td> <td>{{ line_item.cost }}</td> </tr> {% endfor %}
9.4.27.1.3. description
9.4.27.1.4. quantity
9.4.27.1.5. cost
9.4.28.1. Methods
9.4.28.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ message.errors.name | inline_errors }}
9.4.28.1.2. id
Returns the id of the message
9.4.28.1.3. subject
If subject is not present then either a truncated body or
(no subject) string is returned.
9.4.28.1.4. body
Body of the message
9.4.28.1.5. created_at
Returns the creation date
{{ message.created_at | date: i18n.short_date }}
9.4.28.1.6. url
URL of the message detail, points either to inbox or outbox.
9.4.28.1.7. state
Either 'read' or 'unread'
9.4.28.1.8. sender
Returns the name of the sender
9.4.28.1.9. to
Returns the name of the receiver
9.4.28.1.10. recipients
9.4.29.1. Methods
9.4.29.1.1. type
The possible types of the messages are:
- success (not used by now)
- info
- warning
- danger
9.4.29.1.2. text
9.4.30.1. Methods
9.4.30.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ metric.errors.name | inline_errors }}
9.4.30.1.2. unit
Returns the unit of the metric
This metric is measured in {{ metric.unit | pluralize }}
9.4.30.1.3. description
Returns the description of the metric
9.4.30.1.4. name
Returns the name of the metric
<h4>Metric {{ metric.name }}</h4> <p>{{ metric.description }}</p>
9.4.30.1.5. system_name
Returns the system name of this metric
<h4>Metric {{ metric.name }}</h4> <p>{{ metric.system_name }}</p>
9 %}
9 %}
9.4.30.1.8. has_parent
9.4.31.1. Methods
9.4.31.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ page.errors.name | inline_errors }}
9.4.31.1.2. title
Returns the title of the page
<title>{{ page.title }}</title>
9.4.31.1.3. system_name
Returns system name of the page
{% if page.system_name == 'my_page' %} {% include 'custom_header' %} {% endif %}
9.4.32.1. Methods
9.4.32.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ page.errors.name | inline_errors }}
9.4.32.1.2. title
9.4.32.1.3. kind
9.4.32.1.4. url
9.4.32.1.5. description
9.4.33.1. Methods
9> ======================================= -->
9.4.33.1.2. current_page
Number of the currently selected page.
9.4.33.1.3. current_offset
Items skipped so far.
9.4.33.1.4. pages
Total number of pages.
9.4.33.1.5. items
Total number of items in all pages together.
9.4.33.1.6. previous
Number of the previous page or empty.
9.4.33.1.7. next
Number of the next page or empty.
9.4.33.1.8. parts
Elements that help to render a user-friendly pagination. See the [[part-drop[part drop] for more information.
9.4.34.1. Methods
9.4.34.1.1. url
9.4.34.1.2. rel
9.4.34.1.3. current?
9.4.34.1.4. is_link
9.4.34.1.5. title
9.4.34.1.6. to_s
9.4.35.1. Methods
9.4.35.1.1. braintree_blue?
Returns whether current payment gateway is authorize.Net
9.4.35.1.3. type
Returns the type of this payment gateway.
9.4.36.1. Methods
9.4.36.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ payment_transaction.errors.name | inline_errors }}
9 %}
9.4.36.1.3. amount
Returns the amount
9.4.36.1.4. created_at
Returns the creation date
9.4.36.1.5. success?
Returns true if was success
9.4.36.1.6. message
Returns the message of the transaction
9.4.36.1.7. reference
Returns the reference
9.4.37.1. Methods
9.4.37.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ plan_feature.errors.name | inline_errors }}
9.4.37.1.2. name
Returns the name of the feature
<h2>Feature {{ feature.name }}</h2>
9.4.37.1.3. description
Returns the description of the feature
9.4.37.1.4. has_description?
Returns whether the feature has description
{% if feature.has_description? %} {{ feature.description }} {% else %} This feature has no description. {% endif %}
9.4.37.1.5. enabled?
9.4.38.1. Methods
9.4.38.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ post.errors.name | inline_errors }}
9.4.38.1.2. body
Text of the post.
9.4.38.1.3. topic
Every post belongs to a [[topic-drop[topic]
9.4.38.1.4. created_at
Date when this post created
{{ post.created_at | date: i18n.short_date }}
9.4.38.1.5. url
The url of this post within its topic
9.4.39.1. Methods
9.4.39.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ post.errors.name | inline_errors }}
9.4.39.1.2. title
9.4.39.1.3. kind
9.4.39.1.4. url
9.4.39.1.5. description
9.4.40.1. Methods
9.4.40.1.1. cost_per_unit
Returns the cost per unit of the pricing rule Example: Using pricing rule drop in liquid
<h2>Pricing rule</h2> Min value {{ pricing_rule.min }} Max value {{ pricing_rule.max }} Cost per unit {{ pricing_rule.cost_per_unit }}
9.4.40.1.2. min
Returns the minimum value of the pricing rule
9.4.40.1.3. max
Returns the maximum value of the pricing rule
9.4.40.1.4. plan
Returns plan of pricing rule
9.4.41.1. Methods
9 }}
9.4.41.1.2. payment_gateway
Returns the payment gateway associated with your organization
9.4.41.1.3. domain
Domain of your developer portal
9.4.41.1.4. timezone
Returns timezone that you use. Can be changed in your /p/admin/account/edit[administration dashboard].
9.4.41.1.5. support_email
Support email of the account
9.4.41.1.6. finance_support_email
Finance support email of the account
9.4.41.1.7. telephone_number
Returns the telephone number of the account
9 %}
9.4.41.1.9. logo_url
Return the logo url
9.4.41.1.10. multiple_services_allowed?
True if your 3scale plan allows you to manage multiple APIs as separate [service[services.
{% if provider.multiple_services_allowed? %} {% for service in provider.services %} Service {{ service.name }} is available. {% endfor %} {% endif %}
9.4.41.1.11. finance_allowed?
9 %}
9.4.41.1.13. account_plans
Returns all published account plans.
<p>We offer following account plans:</p> <ul> {% for plan in model.account_plans %} <li>{{ plan.name }} </li> {% endfor %} </ul>
9.4.41.1.14. services
Returns all defined services.
<p>You can signup to any of our services!</p> <ul> {% for service in provider.services %} <li>{{ service.name }} <a href="/signup/service/{{ service.system_name }}">Signup!</a></li> {% endfor %}
9.4.41.1.15. signups_enabled?
You can enable or disable signups in the Usage rules section of your Admin Portal.
9.4.41.1.16. account_management_enabled?
You can enable or disable account management in the Usage rules section.
9.4.42.1. Methods
9.4.42.1.1. id
9.4.42.1.2. value
9.4.42.1.3. delete_url
9.4.42.1.4. application
Example: Using request drop in liquid
<h2>Request details</h2> URI {{ request.request_uri }} Host {{ request.host }} Host and port {{ request.host_with_port }}
9.4.43.1. Methods
9.4.43.1.1. request_uri
Returns the URI of the request
9.4.43.1.2. host_with_port
Returns the host with port of the request
9.4.43.1.3. host
Returns the host part of the request URL
9.4.43.1.4. path
Returns the path part of the request URL
{% if request.path == '/' %} Welcome on a landing page! {% else %} This just an ordinary page. {% endif %}
9.4.44.1. Methods
9.4.44.1.1. name
Return internal name of the role, important for the system
9.4.44.1.2. description
Return a descriptiptive text for the role
9.4.45.1. Methods
9.4.45.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ search.errors.name | inline_errors }}
9>
9.4.45.1.3. total_found
Returns the number of matching elements
9.4.45.1.4. results
Returs an array of results for que search
9.4.46.1. Methods
9.4.46.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ service.errors.name | inline_errors }}
9.4.46.1.2. name
Returns the name of the service
9.4.46.1.3. system_name
Returns the system name of the service
{% case service.system_name %} {% when 'api' %} API is our newest service! {% when 'old' %} Unfortunately we dont allow more signups to our old service. {% endcase %}
9.4.46.1.4. description
Returns the description of the service
9.4.46.1.5. subscribed?
Returns whether the service is subscribed
{% if service.subscribed? %} <p>You already subscribed this service.</p> {% endif %}
9 %}
9.4.46.1.7. subscribable?
9.4.46.1.8. subscribe_url
9 %}
9>
9.4.46.1.11. plans
Returns the application plans of the service
9.4.46.1.12. features
Returns the visible features of the service
{% if service.features.size > 0 %} <p>{{ service.name }} has following features:</p> <ul> {% for feature in service.features %} <li>{{ feature.name }}</li> {% endfor %} </ul> {% else %} <p>Unfortunately, {{ service.name }} currently has no features.</p> {% endif %}
9.4.46.1.13. apps_identifier
Depending on the authentication mode set, returns either 'ID', 'API key' or 'Client ID' for OAuth authentication.
{{ service.application_key_name }}
9.4.46.1.14. backend_version
9.4.46.1.15. referrer_filters_required?
9.4.46.1.16. metrics
Returns the metrics of the service
<p>On {{ service.name }} we measure following metrics:</p> <ul> {% for metric in service.metrics %} <li>{{ metric.name }}</li> {% endfor %} </ul>
9.4.46.1.17. support_email
Support email of the service
9.4.47.1. Methods
9.4.47.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ service_contract.errors.name | inline_errors }}
9.4.47.1.2. id
9.4.47.1.3. can_change_plan?
Returns true if any form of change is possible
9.4.47.1.4. trial?
Returns true if the contract is still in the trial period.
Note: If you change the trial period length of a plan, it does not affect the existing contracts.
9.4.47.1.5. live?
9.4.47.1.6. state
There are three possible states:
- pending - live - suspended
9.4.47.1.7. remaining_trial_period_days
Number of day still left in the trial period.
9.4.47.1.8. plan
Returns the plan of the contract
9.4.47.1.9. plan_change_permission_name
Returns name of the allowed action
9.4.47.1.10. plan_change_permission_warning
Returns a warning messenger of the allowed action
9.4.47.1.11. contract
9.4.47.1.12. name
9.4.47.1.13. system_name
9.4.47.1.14. change_plan_url
9.4.47.1.15. service
9.4.47.1.16. applications
9.4.47.1.17. can
Exposes specific rights of the current user for that subscription.
{% if subscription.can.change_plan? %} ... {% endif %}
9.4.48.1. Methods
9.4.48.1.1. selected?
Returns whether the plan is selected
{% if plan.selected? %} <p>You will signup to {{ plan.name }}</p> {% endif %}
9.4.48.1.2. bought?
Returns whether the plan is bought
{% if plan.bought? %} <p>You are on this plan already!</p> {% endif %}
9.4.48.1.3. features
Returns the visible features of the plan
{% if plan == my_free_plan %} <p>These plans are the same.</p> {% else %} <p>These plans are not the same.</p> {% endif %}
9.4.48.1.4. setup_fee
Returns the setup fee of the plan
9.4.48.1.5. name
Returns the name of the plan
<h2>We offer you a new {{ plan.name }} plan!</h2>
9.4.48.1.6. system_name
Returns the system name of the plan
{% for plan in available_plans %} {% if plan.system_name == 'my_free_plan' %} <p>You will buy our only free plan!</p> {% endif %} {% endfor %}
9.4.48.1.7. id
Returns the plan id
9.4.48.1.8. free?
The plan is free if it is not 'paid' (see the 'paid?' method)
{% if plan.free? %} <p>This plan is free of charge.</p> {% else %} <p>Plan costs</p> Setup fee {{ plan.setup_fee }} Flat cost {{ plan.flat_cost }} {% endif %}
9.4.48.1.9. paid?
The plan is 'paid' when it has non-zero fixed or setup fee or there are some pricing rules present
{% if plan.paid? %} <p>this plan is a paid one.</p> {% else %} <p>this plan is a free one.</p> {% endif %}
9.4.48.1.10. approval_required?
Returns whether the plan requires approval?
{% if plan.approval_required? %} <p>This plan requires approval.</p> {% endif %}
9.4.48.1.11. flat_cost
Returns the monthly fixed fee of the plan
9.4.48.1.12. service
Example: Using service plan drop in liquid
<p class="notice">The examples for plan drop apply here</p> Service of this plan {{ plan.service.name }}
9.4.49.1. Methods
9.4.49.1.1. full_name
9.4.49.1.2. to_str
9.4.50.1. Methods
9.4.50.1.1. month
Returns current month (1-12)
9.4.50.1.2. day
Returns current day of the month (1-31)
9.4.50.1.3. year
Returns current year Example: Create dynamic copyright
©{{ today.year }}
9.4.50.1.4. beginning_of_month
Returns date of beginning of current month
This month began on {{ today.beginning_of_month | date: '%A' }}
9.4.51.1. Methods
9.4.51.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ topic.errors.name | inline_errors }}
9.4.51.1.2. title
9.4.51.1.3. kind
9.4.51.1.4. url
9.4.51.1.5. description
9.4.52.1. Methods
9.4.52.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ topic.errors.name | inline_errors }}
9.4.52.1.2. title
Name of the topic. Submitted when first post to the thread is posted.
9.4.52.1.3. url
9.4.53.1. Methods
9.4.53.1.1. to_s
9.4.53.1.2. to_str
9.4.53.1.3. title
9?'.
9.4.53.1.5. current?
True if the URL’s path is the the same as of the current. Parameters and other components are not taken into account. See also '#active?'.
{% assign url = urls.messages_inbox %} <!-- => --> <!-- Current page: --> {{ url.current? }} => true <!-- Current page: --> {{ url.current? }} => false
9.4.53.1.6. active?
True if the current page is in the same menu structure as this URL. See also '#current?'.
{% assign url = urls.messages_inbox %} <!-- => --> <!-- Current page: --> {{ url.active? }} => true <!-- Current page: --> {{ url.active? }} => true <!-- Current page: --> {{ url.active? }} => false
9.4.54.1. Methods
9.4.54.1.1. provider
9.4.54.1.2. cas_login
<a href="{{ urls.signup }}">signup here</a> <a href="{{ urls.service_subscription }}">subscribe to a service here</a>
9.4.54.1.3. new_application
9.4.54.1.4. signup
URL of a signup page. Accessible for all.
<a href="{{ urls.signup }}?{{ service_plan | param_filter }}&{{ app_plan | param_filter }}" >Signup Now!</a>
9.4.54.1.5. search
URL to which all the search requests should be sent
<form action="{{ urls.search }}" method="get"> </form>
9.4.54.1.6. login
9.4.54.1.7. logout
9.4.54.1.8. forgot_password
9.4.54.1.9. service_subscription
URL to a service subscription page. Only for logged in users.
<a href="{{ urls.service_subscription }}?{{ service_plan | param_filter }}" > Subscribe to service {{ service.name }} </a>
9.4.54.1.10. compose_message
URL to a page that allows the developer contact provider via the internal messaging system.
9.4.54.1.11. messages_outbox
URL to the list of messages sent by a developer.
9.4.54.1.12. messages_trash
9.4.54.1.13. empty_messages_trash
9.4.54.1.14. credit_card_terms
9.4.54.1.15. credit_card_privacy
9.4.54.1.16. credit_card_refunds
9.4.54.1.17. users
9.4.54.1.18. personal_details
URL or Nil if user account management is disabled (check your Usage rules).
9.4.54.1.19. access_details
A page with API key(s) and other authentication info. Differs depending on the authentication strategy.
9.4.54.1.20. payment_details
9.4.54.1.21. new_invitation
Page to invite new users
9.4.54.1.22. invitations
List of all the sent invitations
9.4.54.1.23. dashboard
9.4.54.1.24. applications
9.4.54.1.25. api_access_details
9.4.54.1.26. services
9.4.54.1.27. messages_inbox
URL to the list of received messages.
9.4.54.1.28. stats
9.4.54.1.29. account_overview
9.4.54.1.30. account_plans
9.4.54.1.31. invoices
Example: Using usage limit drop in liquid
You cannot do more than {{ limit.value }} {{ limit.metric.unit }}s per {{ limit.period }}
9.4.55.1. Methods
9.4.55.1.1. period
Returns the period of the usage limit
9.4.55.1.2. metric
Usually
hits but can be any custom method.
9.4.55.1.3. value
Returns the value of the usage limit
<h2>User {{ user.display_name }}</h2> Account {{ user.account.name }} Username {{ user.username }} Email {{ user.email }} Website {{ user.website }}
9.4.56.1. Methods
9.4.56.1.1. errors
If a form of this model is rendered after unsuccesfull submit, this returns" errors that occured.
{{ user.errors.name | inline_errors }}
9.4.56.1.2. admin?
Returns whether the user is an admin.
{% if user.admin? %} <p>You are an admin of your account.</p> {% endif %}
9.4.56.1.3. username
Returns the username of the user, html escaped.
9.4.56.1.4. account
Returns the account of the user.
9.4.56.1.5. name
Returns the first and surname of the user.
9.4.56.1.6. email
Returns the email of the user.
9.4.56.1.7. password_required?
This method will return
true for users using the builtin Developer Portal authentication mechanisms and
false for those that are authenticated via Janrain, CAS or other single-sign-on method.
{% if user.password_required? %} {% endif %}
9.4.56.1.8. sections
Returns the list of sections the user has access to.
{% if user.sections.size > 0 %} <p>You can access following sections of our portal:</p> <ul> {% for section in user.sections %} <li>{{ section }}</li> {% endfor %} </ul> {% endif %}
9.4.56.1.9. role
Returns the role of the user
9.4.56.1.10. roles_collection
Retuns a list of available roles for the user
{% for role in user.roles_collection %} <li> <label for="user_role_{{ role.key }}"> {{ role.text }} </label> </li> {% endfor %}
9.4.56.1.11. url
Return the resource url of the user
{{ 'Delete' | delete_button: user.url }}
9.4.56.1.12. edit_url
Return the url to edit the user
{{ 'Edit' | link_to: user.edit_url, title: 'Edit', class: 'action edit' }}
9.4.56.1.13. can
Give access to permission methods
{% if user.can.be_managed? %} <!-- do something --> {% endif %}
9.4.56.1.14. extra_fields
Returns non-hidden extra fields with values for this user Example: Print all extra fields
{% for field in user.extra_fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.56.1.15. fields
Returns all fields with values for this user Example: Print all fields
{% for field in user.fields %} {{ field.label }}: {{ field.value }} {% endfor %}
9.4.56.1.16. builtin_fields
Returns all builtin fields with values for this user
9.6.1.1. error_class filter
Outputs error class if argument is not empty Example: Using error_class to show output an error class
9.6.1.2. inline_errors filter
Outputs error fields inline in paragraph Example: Using inline_errors to show errors inline
{{ form.errors.description | inline_errors }}
9.6.2.1. to_param filter
Converts a supplied drop to URL parameter if possible. Example: Using to_param filter in liquid
<h2>Signup to a service</h2> <a href="{{ urls.signup }}?{{ service | to_param }}">Signup to {{ service.name }}</a>
9.6.3.1. group_by filter
Group collection by some key Example: Group applications by service
{% assign grouped = applications | group_by: 'service' %} {% for group in grouped %} Service: {{ group[0 }} {% for app in group[1] %} Application: {{ app.name }} {% endfor %} {% endfor %}
9.6.3.2. any filter
True if any string in the collection equals to the parameter Example: Are there any pending apps of the current account?
{% assign has_pending_apps = current_account.applications | map: 'state' | any: 'live' %}
9.6.3.3. stylesheet_link_tag filter
Stylesheet link
9.6.3.4. javascript_include_tag filter
Javascript include tag
9.6.3.5. image_tag filter
Outputs an tag using the parameters as its
src attribute.
{{ '' | image_tag }} ## =>
9.6.3.6. mail_to filter
Converts email address to a 'mailto' link.
{{ 'me@there.is' | mail_to }} ## => <a href="mailto:me@there.is">me@there.is</a>
9.6.3.7. html_safe filter
Marks content as HTML safe so that it is not escaped.
9.6.3.8. pluralize filter
Convert word to plural form
9.6.3.15. link_to filter
Create link from given text
{{ "See your App keys" | link_to:'/my-app-keys' }}
Chapter_22<<.
Chapter 11..
11.
11_23<<
Having created the backbone of your layout, proceed to customizing the code for signup.
11.3. Step 1:The loop
In order to retrieve all the information about the services that you need to construct the proper signup link, you have to loop through the service objects. Services are a part of the model object.
{% for service in provider.services %} . . . {% endfor %}
11.
11 %}
11 12..
12.1. CMS overview
The CMS consists of a few elements:
- Left menu with access to Content, Drafts, Redirects, Groups, Feature Visibility, ActiveDocs, Legal Terms, Settings and Liquid documentation.
- The main area containing details of the sections above.
12_25<<_26<<
There’s also a filter feature, which serves not only as a search field but allows you to limit the elements shown to only stylesheets, JavaScript, or any other types specified.
12_28<<
- Text editor for the layout template.
- Save draft, publish current version, and revert to the last published state.
- Switch the text editor between the draft and published versions, list the version history, and launch the pop-up editor.
12.
12.4.1. Note
The editor will come pre-filled with standard portlet code using some custom liquid tags. You can try editing the generated structure, but be careful. When in doubt, just leave the code as it is or refer to the portal formatting tags reference.
12._29<<
Create a group and give it access to the section you created.
_31<< Audience > Account > Field Definitions. Add a field to the Account section, and mark it as hidden so it will not be displayed on the signup page or anywhere else on the portal.
. . 14..
14:
14.2. Step 2: Enable all possible default plans
Application plans
Optionally, if you have account and service plans enabled, choose default plans for those too
Account plans (optional)
Service plans (optional)
14_38<<
Chapter. (question mark icon (?) in the top right corner) → 3scale API Docs section..
16.1. Terms and Conditions
This part of the workflow is easy to set up in the Admin Portal by following the steps below.
Go to Audience > Developer Portal > Signup,_39<<_40<<.!