Class: VoucherifySdk::MetadataSchemasApi
- Inherits:
-
Object
- Object
- VoucherifySdk::MetadataSchemasApi
- Defined in:
- lib/VoucherifySdk/api/metadata_schemas_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_metadata_schema(resource, opts = {}) ⇒ MetadataSchemasGetResponseBody
Get Metadata Schema Retrieves a metadata schema per resource type.
-
#initialize(api_client = ApiClient.default) ⇒ MetadataSchemasApi
constructor
A new instance of MetadataSchemasApi.
-
#list_metadata_schemas(opts = {}) ⇒ MetadataSchemasListResponseBody
List Metadata Schemas Retrieve metadata schema definitions.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ MetadataSchemasApi
Returns a new instance of MetadataSchemasApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/metadata_schemas_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/VoucherifySdk/api/metadata_schemas_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_metadata_schema(resource, opts = {}) ⇒ MetadataSchemasGetResponseBody
Get Metadata Schema Retrieves a metadata schema per resource type. # Resource types ## Standard You can retrieve metadata schemas for the standard metadata schema definitions listed below. Add one of these types as the resource path parameter. - campaign - customer - earning_rule - loyalty_tier - order - order_item - product - promotion_tier - publication - redemption - reward - voucher ## Custom If you have defined a [custom metadata schema](support.voucherify.io/article/99-schema-validation-metadata#add-metadata), provide its name in the resource field to retrieve its details. 📘 Management API If you have Management API enabled, you can also use the Get Metadata Schemas endpoint to retrieve a metadata schema using its ID.
27 28 29 30 |
# File 'lib/VoucherifySdk/api/metadata_schemas_api.rb', line 27 def (resource, opts = {}) data, _status_code, _headers = (resource, opts) data end |
#list_metadata_schemas(opts = {}) ⇒ MetadataSchemasListResponseBody
List Metadata Schemas Retrieve metadata schema definitions. 📘 Management API If you have Management API enabled, you can also use the List Metadata Schemas endpoint to list all metadata schemas.
85 86 87 88 |
# File 'lib/VoucherifySdk/api/metadata_schemas_api.rb', line 85 def (opts = {}) data, _status_code, _headers = (opts) data end |