Class: VoucherifySdk::ManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/VoucherifySdk/api/management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ManagementApi

Returns a new instance of ManagementApi.



19
20
21
# File 'lib/VoucherifySdk/api/management_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/VoucherifySdk/api/management_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#assign_user(project_id, opts = {}) ⇒ ManagementProjectsUsersAssignResponseBody

Assign User Assigns a user to a given project. The user must be an existing user in Voucherify. 🚧 Correct Use of Data To avoid errors, use the role key with either id or login keys.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



28
29
30
31
# File 'lib/VoucherifySdk/api/management_api.rb', line 28

def assign_user(project_id, opts = {})
  data, _status_code, _headers = assign_user_with_http_info(project_id, opts)
  data
end

#create_brand(project_id, opts = {}) ⇒ ManagementProjectsBrandingCreateResponseBody

Create Brand Creates a new brand configuration. You can have only one brand configured for a project. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



94
95
96
97
# File 'lib/VoucherifySdk/api/management_api.rb', line 94

def create_brand(project_id, opts = {})
  data, _status_code, _headers = create_brand_with_http_info(project_id, opts)
  data
end

#create_custom_event_schema(project_id, opts = {}) ⇒ ManagementProjectsCustomEventSchemasCreateResponseBody

Create Custom Event Schema Creates a custom event schema. The properties object is required, but it can be empty, however. This object is for optional custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



160
161
162
163
# File 'lib/VoucherifySdk/api/management_api.rb', line 160

def create_custom_event_schema(project_id, opts = {})
  data, _status_code, _headers = create_custom_event_schema_with_http_info(project_id, opts)
  data
end

#create_metadata_schema(project_id, opts = {}) ⇒ ManagementProjectsMetadataSchemasCreateResponseBody

Create Metadata Schema Creates a new metadata (custom attribute) schema. The schema consists of a set of key-value pairs to customize Voucherify resources. You can nest your object within a standard metadata schema, e.g. within a campaign or customer schema. However, your nested object cannot include another nested object. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



226
227
228
229
# File 'lib/VoucherifySdk/api/management_api.rb', line 226

def (project_id, opts = {})
  data, _status_code, _headers = (project_id, opts)
  data
end

#create_project(opts = {}) ⇒ ManagementProjectsCreateResponseBody

Create Project Creates a new project. You can add users, specify the cluster, timezone, currency, and other details. All owners are added to the project by default.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



291
292
293
294
# File 'lib/VoucherifySdk/api/management_api.rb', line 291

def create_project(opts = {})
  data, _status_code, _headers = create_project_with_http_info(opts)
  data
end

#create_stacking_rules(project_id, opts = {}) ⇒ ManagementProjectsStackingRulesCreateResponseBody

Create Stacking Rules Overwrites the default stacking rules. If new stacking rules have been created for the project earlier (e.g. in the user interface), it returns an error. Use Update Stacking Rules endpoint to change the rules. 📘 Stacking Rules Documentation Read [the Stacking Rules article](support.voucherify.io/article/604-stacking-rules) to learn how they work.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



356
357
358
359
# File 'lib/VoucherifySdk/api/management_api.rb', line 356

def create_stacking_rules(project_id, opts = {})
  data, _status_code, _headers = create_stacking_rules_with_http_info(project_id, opts)
  data
end

#create_webhook(project_id, opts = {}) ⇒ ManagementProjectsWebhooksCreateResponseBody

Create Webhook Creates a new webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-01 article to learn how webhooks work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



422
423
424
425
# File 'lib/VoucherifySdk/api/management_api.rb', line 422

def create_webhook(project_id, opts = {})
  data, _status_code, _headers = create_webhook_with_http_info(project_id, opts)
  data
end

#delete_brand(project_id, branding_id, opts = {}) ⇒ nil

Delete Brand Deletes permanently a brand configuration.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • branding_id (String)

    Provide the unique identifier of the brand configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


488
489
490
491
# File 'lib/VoucherifySdk/api/management_api.rb', line 488

def delete_brand(project_id, branding_id, opts = {})
  delete_brand_with_http_info(project_id, branding_id, opts)
  nil
end

#delete_custom_event_schema(project_id, custom_event_schema_id, opts = {}) ⇒ nil

Delete Custom Event Schema Deletes permanently the custom event schema with its custom properties (metadata). 📘 Custom Event Documentation Read [Custom Events](support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • custom_event_schema_id (String)

    Provide the unique identifier of the custom event schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


547
548
549
550
# File 'lib/VoucherifySdk/api/management_api.rb', line 547

def delete_custom_event_schema(project_id, custom_event_schema_id, opts = {})
  delete_custom_event_schema_with_http_info(project_id, custom_event_schema_id, opts)
  nil
end

#delete_metadata_schema(project_id, metadata_schema_id, opts = {}) ⇒ nil

Delete Metadata Schema Deletes permanently the metadata schema. In standard metadata schemas, this endpoint removes permanently all definitions. The standard metadata schemas are: - Campaign - Voucher - Publication - Redemption - Product - Customer - Order - Order line item - Loyalty Tier - Promotion Tier - Earning rule - Reward If you want to delete only one definition, use the Update Metadata Schema endpoint. In the request, provide the deleted: true pair in the definition object. This definition will be moved to Removed definitions. If you want to create a new standard metadata schema, use the Create Metadata Schema endpoint. 🚧 Metadata Purging This endpoint deletes permanently the metadata schemas only. However, it does not purge the metadata from associated entities, so the metadata added to those entities will remain. If you want to purge metadata from the entities: 1. Remove all the definitions you want to purge. You can do this either in Voucherify Project Settings > Metadata Schema tab or with the Update Metadata Schema endpoint. 2. In Voucherify Project Settings > Metadata Schema tab, go to the relevant metadata schema. 3. In Removed definitions, click the bin button next to the definitions whose metadata you want to purge from entities. Note: - This is an asynchronous action. You will be notified when it has been completed. - You cannot purge metadata for the Redemption and Publication schemas. 4. Use the Delete Metadata Schema request to delete the metadata schema from Voucherify. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • metadata_schema_id (String)

    Provide the unique identifier of the metadata schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


606
607
608
609
# File 'lib/VoucherifySdk/api/management_api.rb', line 606

def (project_id, , opts = {})
  (project_id, , opts)
  nil
end

#delete_project(project_id, opts = {}) ⇒ nil

Delete Project Deletes an existing project. The users currently using the deleted project will be automatically logged out. 🚧 Sandbox Project The sandbox project cannot be deleted.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


664
665
666
667
# File 'lib/VoucherifySdk/api/management_api.rb', line 664

def delete_project(project_id, opts = {})
  delete_project_with_http_info(project_id, opts)
  nil
end

#delete_stacking_rules(project_id, stacking_rules_id, opts = {}) ⇒ nil

Delete Stacking Rules Deletes permanently the current settings for the stacking rules. The stacking rules are restored to default values. 📘 Stacking Rules Documentation Read [the Stacking Rules article](support.voucherify.io/article/604-stacking-rules) to learn how they work.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • stacking_rules_id (String)

    Provide the unique identifier of the stacking rules.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


722
723
724
725
# File 'lib/VoucherifySdk/api/management_api.rb', line 722

def delete_stacking_rules(project_id, stacking_rules_id, opts = {})
  delete_stacking_rules_with_http_info(project_id, stacking_rules_id, opts)
  nil
end

#delete_webhook(project_id, webhook_id, opts = {}) ⇒ nil

Delete Webhook Deletes a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • webhook_id (String)

    Provide the unique identifier of the webhook configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


781
782
783
784
# File 'lib/VoucherifySdk/api/management_api.rb', line 781

def delete_webhook(project_id, webhook_id, opts = {})
  delete_webhook_with_http_info(project_id, webhook_id, opts)
  nil
end

#get_brand(project_id, branding_id, opts = {}) ⇒ ManagementProjectsBrandingGetResponseBody

Get Brand Retrieves a brand configuration.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • branding_id (String)

    Provide the unique identifier of the brand configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



840
841
842
843
# File 'lib/VoucherifySdk/api/management_api.rb', line 840

def get_brand(project_id, branding_id, opts = {})
  data, _status_code, _headers = get_brand_with_http_info(project_id, branding_id, opts)
  data
end

#get_custom_event_schema(project_id, custom_event_schema_id, opts = {}) ⇒ ManagementProjectsCustomEventSchemasGetResponseBody

Get Custom Event Schema Retrieves a custom event schema. 📘 Custom Event Documentation Read [Custom Events](support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • custom_event_schema_id (String)

    Provide the unique identifier of the custom event schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



901
902
903
904
# File 'lib/VoucherifySdk/api/management_api.rb', line 901

def get_custom_event_schema(project_id, custom_event_schema_id, opts = {})
  data, _status_code, _headers = get_custom_event_schema_with_http_info(project_id, custom_event_schema_id, opts)
  data
end

#get_metadata_schema1(project_id, metadata_schema_id, opts = {}) ⇒ ManagementProjectsMetadataSchemasGetResponseBody

Get Metadata Schema Retrieves a metadata schema. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • metadata_schema_id (String)

    Provide the unique identifier of the metadata schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



962
963
964
965
# File 'lib/VoucherifySdk/api/management_api.rb', line 962

def (project_id, , opts = {})
  data, _status_code, _headers = (project_id, , opts)
  data
end

#get_project(project_id, opts = {}) ⇒ ManagementProjectsGetResponseBody

Get Project Retrieves an existing project.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1022
1023
1024
1025
# File 'lib/VoucherifySdk/api/management_api.rb', line 1022

def get_project(project_id, opts = {})
  data, _status_code, _headers = get_project_with_http_info(project_id, opts)
  data
end

#get_stacking_rules(project_id, stacking_rules_id, opts = {}) ⇒ ManagementProjectsStackingRulesGetResponseBody

Get Stacking Rules Retrieves the stacking rules for the project. 📘 Stacking Rules Documentation Read [the Stacking Rules article](support.voucherify.io/article/604-stacking-rules) to learn how they work.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • stacking_rules_id (String)

    Provide the unique identifier of the stacking rules.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1082
1083
1084
1085
# File 'lib/VoucherifySdk/api/management_api.rb', line 1082

def get_stacking_rules(project_id, stacking_rules_id, opts = {})
  data, _status_code, _headers = get_stacking_rules_with_http_info(project_id, stacking_rules_id, opts)
  data
end

#get_user(project_id, user_id, opts = {}) ⇒ ManagementProjectsUsersGetUserResponseBody

Get User Retrieves the project users details.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • user_id (String)

    Provide the unique identifier of the user. Alternatively, provide the users login.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1143
1144
1145
1146
# File 'lib/VoucherifySdk/api/management_api.rb', line 1143

def get_user(project_id, user_id, opts = {})
  data, _status_code, _headers = get_user_with_http_info(project_id, user_id, opts)
  data
end

#get_webhook(project_id, webhook_id, opts = {}) ⇒ ManagementProjectsWebhooksGetResponseBody

Get Webhook Retrieves a webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • webhook_id (String)

    Provide the unique identifier of the webhook configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1204
1205
1206
1207
# File 'lib/VoucherifySdk/api/management_api.rb', line 1204

def get_webhook(project_id, webhook_id, opts = {})
  data, _status_code, _headers = get_webhook_with_http_info(project_id, webhook_id, opts)
  data
end

#invite_user(opts = {}) ⇒ nil

Invite a New User Sends an invitation to an email address that has not been used yet as a Voucherify user login. You can specify the projects to which the invited user will be assigned and define their roles.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


1264
1265
1266
1267
# File 'lib/VoucherifySdk/api/management_api.rb', line 1264

def invite_user(opts = {})
  invite_user_with_http_info(opts)
  nil
end

#list_brands(project_id, opts = {}) ⇒ ManagementProjectsBrandingListResponseBody

List Brands Lists all brand configurations. Because a project can have only one brand, it always returns a list with one item. This endpoint can be used to retrieve the brand configuration created with the Voucherify Dashboard and the ID.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1326
1327
1328
1329
# File 'lib/VoucherifySdk/api/management_api.rb', line 1326

def list_brands(project_id, opts = {})
  data, _status_code, _headers = list_brands_with_http_info(project_id, opts)
  data
end

#list_custom_event_schemas(project_id, opts = {}) ⇒ ManagementProjectsCustomEventSchemasListResponseBody

List Custom Event Schemas Lists all custom event schemas available in the project. 📘 Custom Event Documentation Read [Custom Events](support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1385
1386
1387
1388
# File 'lib/VoucherifySdk/api/management_api.rb', line 1385

def list_custom_event_schemas(project_id, opts = {})
  data, _status_code, _headers = list_custom_event_schemas_with_http_info(project_id, opts)
  data
end

#list_metadata_schemas1(project_id, opts = {}) ⇒ ManagementProjectsMetadataSchemasListResponseBody

List Metadata Schemas Lists all metadata schemas available in the project. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1444
1445
1446
1447
# File 'lib/VoucherifySdk/api/management_api.rb', line 1444

def (project_id, opts = {})
  data, _status_code, _headers = (project_id, opts)
  data
end

#list_projects(opts = {}) ⇒ ManagementProjectsListResponseBody

List Projects Lists all projects for the organization. The endpoint does not require any query parameters.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1502
1503
1504
1505
# File 'lib/VoucherifySdk/api/management_api.rb', line 1502

def list_projects(opts = {})
  data, _status_code, _headers = list_projects_with_http_info(opts)
  data
end

#list_stacking_rules(project_id, opts = {}) ⇒ ManagementProjectsStackingRulesListResponseBody

List Stacking Rules Lists all stacking rules. Returns always a list with one item. This endpoint can be used to retrieve the default stacking rules. The default stacking rules do not have an ID that could be used with the Get Stacking Rules or Update Stacking Rules endpoints. 📘 Stacking Rules Documentation Read [the Stacking Rules article](support.voucherify.io/article/604-stacking-rules) to learn how they work.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1560
1561
1562
1563
# File 'lib/VoucherifySdk/api/management_api.rb', line 1560

def list_stacking_rules(project_id, opts = {})
  data, _status_code, _headers = list_stacking_rules_with_http_info(project_id, opts)
  data
end

#list_users(project_id, opts = {}) ⇒ ManagementProjectsUsersListResponseBody

List Users Lists all users assigned to the project.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1619
1620
1621
1622
# File 'lib/VoucherifySdk/api/management_api.rb', line 1619

def list_users(project_id, opts = {})
  data, _status_code, _headers = list_users_with_http_info(project_id, opts)
  data
end

#list_webhooks(project_id, opts = {}) ⇒ ManagementProjectsWebhooksListResponseBody

List Webhooks Lists all webhook configurations for the project. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1678
1679
1680
1681
# File 'lib/VoucherifySdk/api/management_api.rb', line 1678

def list_webhooks(project_id, opts = {})
  data, _status_code, _headers = list_webhooks_with_http_info(project_id, opts)
  data
end

#management_copy_campaign_template(project_id, campaign_template_id, opts = {}) ⇒ ManagementProjectsTemplatesCampaignsCopyCreateResponseBody

Copy Campaign Template to a Project Copies a campaign template to another project. The resources, like validation rules or products, will not be copied to the destination project yet. When the template is used to create a new campaign or add a new promotion tier, the resources will be created in the destination project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • campaign_template_id (String)

    Provide the unique identifier of the campaign template.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1739
1740
1741
1742
# File 'lib/VoucherifySdk/api/management_api.rb', line 1739

def management_copy_campaign_template(project_id, campaign_template_id, opts = {})
  data, _status_code, _headers = management_copy_campaign_template_with_http_info(project_id, campaign_template_id, opts)
  data
end

#management_list_campaign_templates(project_id, opts = {}) ⇒ ManagementProjectsTemplatesCampaignsListResponseBody

List Campaign Templates Lists all campaign templates available in the project. 👍 List Campaign Templates This endpoint works in the same way as the List Campaign Templates endpoint. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    Limits the number of objects to be returned. The limit can range between 1 and 100 items. If no limit is set, it returns 10 items.

  • :starting_after_id (String)

    A cursor for pagination. It retrieves the campaign templates created after a template with the given ID.

  • :order (ParameterTemplatesList)

    Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.

  • :include_total (Boolean)

    If set to true, the response returns the number of all campaign templates, regardless of the applied filters or limits. Set to false by default.

  • :filters (ParameterFiltersListTemplates)

    Filters for listing templates.

Returns:



1810
1811
1812
1813
# File 'lib/VoucherifySdk/api/management_api.rb', line 1810

def management_list_campaign_templates(project_id, opts = {})
  data, _status_code, _headers = management_list_campaign_templates_with_http_info(project_id, opts)
  data
end

#unassign_user(project_id, user_id, opts = {}) ⇒ nil

Unassign User Unassigns the user from the project. If the user is currently logged in, they are automatically logged out. If the user is assigned to only one project, they cannot be unassigned from that project.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • user_id (String)

    Provide the unique identifier of the user. Alternatively, provide the users login.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1880
1881
1882
1883
# File 'lib/VoucherifySdk/api/management_api.rb', line 1880

def unassign_user(project_id, user_id, opts = {})
  unassign_user_with_http_info(project_id, user_id, opts)
  nil
end

#update_brand(project_id, branding_id, opts = {}) ⇒ ManagementProjectsBrandingUpdateResponseBody

Update Brand Updates a brand configuration. Only the fields sent in the request will be updated. The fields omitted in the request will remain unchanged. 📘 White Labelling The white labelling settings which can be found in Project Settings > Brand Details and which are available only for Enterprise clients as a separate service can be configured only in the user interface.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • branding_id (String)

    Provide the unique identifier of the brand configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1940
1941
1942
1943
# File 'lib/VoucherifySdk/api/management_api.rb', line 1940

def update_brand(project_id, branding_id, opts = {})
  data, _status_code, _headers = update_brand_with_http_info(project_id, branding_id, opts)
  data
end

#update_custom_event_schema(project_id, custom_event_schema_id, opts = {}) ⇒ ManagementProjectsCustomEventSchemasUpdateResponseBody

Update Custom Event Schema Updates a custom event schema. With this request, you can: - Add a non-existing property to a custom event schema. - Update an existing property. In the request, you can provide only those properties you want to add or update. Definitions omitted in the request remain unchanged. 👍 Additional Notes - You can change the type of an existing property, e.g. from string to number. - You can remove a custom property with this endpoint by providing deleted: true in the request. However, you cannot permanently remove an event definition or its property with this endpoint. 📘 Custom Event Documentation Read [Custom Events](support.voucherify.io/article/111-custom-events) article to learn how custom events work in Voucherify. Read also the details about the Track Custom Event endpoint and the Custom Event Object.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • custom_event_schema_id (String)

    Provide the unique identifier of the custom event schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2008
2009
2010
2011
# File 'lib/VoucherifySdk/api/management_api.rb', line 2008

def update_custom_event_schema(project_id, custom_event_schema_id, opts = {})
  data, _status_code, _headers = update_custom_event_schema_with_http_info(project_id, custom_event_schema_id, opts)
  data
end

#update_metadata_schema(project_id, metadata_schema_id, opts = {}) ⇒ ManagementProjectsMetadataSchemasUpdateResponseBody

Update Metadata Schema Updates a metadata schema. With this request, you can: - Add a non-existing attribute definition to the metadata schema. - Update an existing attribute definition by overwriting its current values. In the request, you can provide only those definitions you want to add or update. Definitions omitted in the request remain unchanged. However, if you want to update a definition, you will have to add all its current key-value pairs as well. Only the pairs sent in the request are saved for this definition. This means that the key-value pairs that are not sent in a request are restored to default values. For example, if your definition has an array with values and it is not sent in an update request, the array values will be deleted. 👍 Additional Notes - You cannot change the type of an existing schema, e.g. from string to number. - You can remove a definition with this endpoint by providing deleted: true in the request. It will be moved to the Removed definitions section in the user interface. However, you cannot permanently remove a definition with this endpoint. 📘 Metadata Documentation Read the Getting Started with Metadata articles to learn how metadata work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • metadata_schema_id (String)

    Provide the unique identifier of the metadata schema.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2076
2077
2078
2079
# File 'lib/VoucherifySdk/api/management_api.rb', line 2076

def (project_id, , opts = {})
  data, _status_code, _headers = (project_id, , opts)
  data
end

#update_project(project_id, opts = {}) ⇒ ManagementProjectsUpdateResponseBody

Update Project Updates an existing project. You can add or modify settings for timezone, currency, notifications, and other details. Only the fields sent in the request will be updated.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2143
2144
2145
2146
# File 'lib/VoucherifySdk/api/management_api.rb', line 2143

def update_project(project_id, opts = {})
  data, _status_code, _headers = update_project_with_http_info(project_id, opts)
  data
end

#update_stacking_rules(project_id, stacking_rules_id, opts = {}) ⇒ ManagementProjectsStackingRulesUpdateResponseBody

Update Stacking Rules Updates the stacking rules. Only the provided fields will be updated. However, if you update an array, the content of the array is overwritten. This means that if you want to add new values to an array and retain existing ones, you need to provide both the existing and new values in the request. 📘 Stacking Rules Documentation Read [the Stacking Rules article](support.voucherify.io/article/604-stacking-rules) to learn how they work.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • stacking_rules_id (String)

    Provide the unique identifier of the stacking rules.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2210
2211
2212
2213
# File 'lib/VoucherifySdk/api/management_api.rb', line 2210

def update_stacking_rules(project_id, stacking_rules_id, opts = {})
  data, _status_code, _headers = update_stacking_rules_with_http_info(project_id, stacking_rules_id, opts)
  data
end

#update_user(project_id, user_id, opts = {}) ⇒ ManagementProjectsUsersUpdateRoleResponseBody

Update User Updates the users role.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • user_id (String)

    Provide the unique identifier of the user. Alternatively, provide the users login.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2278
2279
2280
2281
# File 'lib/VoucherifySdk/api/management_api.rb', line 2278

def update_user(project_id, user_id, opts = {})
  data, _status_code, _headers = update_user_with_http_info(project_id, user_id, opts)
  data
end

#update_webhook(project_id, webhook_id, opts = {}) ⇒ ManagementProjectsWebhooksUpdateResponseBody

Update Webhook Updates a webhook configuration. The events listed in the request are overwritten. If you want to add more events, provide also the events that are already in the webhook configuration. 📘 Webhook Documentation Read Webhooks v2024-01-1 article to learn how webhooks work in Voucherify.

Parameters:

  • project_id (String)

    Provide the unique identifier of the project.

  • webhook_id (String)

    Provide the unique identifier of the webhook configuration.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



2346
2347
2348
2349
# File 'lib/VoucherifySdk/api/management_api.rb', line 2346

def update_webhook(project_id, webhook_id, opts = {})
  data, _status_code, _headers = update_webhook_with_http_info(project_id, webhook_id, opts)
  data
end