PHP Class WC_Connect_Service_Schemas_Store, woocommerce-connect-client

Afficher le fichier Open project: Automattic/woocommerce-connect-client Class Usage Examples

Protected Properties

Свойство Type Description
$api_client WC_Connect_API_Client
$logger WC_Connect_Logger

Méthodes publiques

Méthode Description
__construct ( WC_Connect_API_Client $api_client, WC_Connect_Logger $logger )
fetch_service_schemas_from_connect_server ( )
get_all_service_ids_of_type ( string $type ) : array Returns all service ids of a specific type (e.g. shipping)
get_last_fetch_timestamp ( )
get_packages_schema ( ) : object | null Returns packages schema
get_predefined_packages_schema ( )
get_predefined_packages_schema_for_service ( $service_id )
get_service_schema_by_id ( $service_id ) : object | null Returns a particular service's schema given its id
get_service_schema_by_id_or_instance_id ( string $id_or_instance_id ) : object | null Returns a service's schema given an id or shipping zone instance.
get_service_schema_by_instance_id ( string $instance_id ) : object | null Returns a service's schema given its shipping zone instance
get_service_schemas ( )

Méthodes protégées

Méthode Description
maybe_update_heartbeat ( )
update_last_fetch_timestamp ( )
update_service_schemas ( $service_schemas )

Method Details

__construct() public méthode

public __construct ( WC_Connect_API_Client $api_client, WC_Connect_Logger $logger )
$api_client WC_Connect_API_Client
$logger WC_Connect_Logger

fetch_service_schemas_from_connect_server() public méthode

get_all_service_ids_of_type() public méthode

Returns all service ids of a specific type (e.g. shipping)
public get_all_service_ids_of_type ( string $type ) : array
$type string The type of services to return
Résultat array An array of that type's service ids, or an empty array if no such type is known

get_last_fetch_timestamp() public méthode

get_packages_schema() public méthode

Returns packages schema
public get_packages_schema ( ) : object | null
Résultat object | null Packages schema on success, null on failure

get_predefined_packages_schema() public méthode

get_predefined_packages_schema_for_service() public méthode

get_service_schema_by_id() public méthode

Returns a particular service's schema given its id
public get_service_schema_by_id ( $service_id ) : object | null
Résultat object | null The service schema or null if no such id was found

get_service_schema_by_id_or_instance_id() public méthode

Returns a service's schema given an id or shipping zone instance.
public get_service_schema_by_id_or_instance_id ( string $id_or_instance_id ) : object | null
$id_or_instance_id string String ID or numeric instance ID.
Résultat object | null Service schema on success, null on failure

get_service_schema_by_instance_id() public méthode

Returns a service's schema given its shipping zone instance
public get_service_schema_by_instance_id ( string $instance_id ) : object | null
$instance_id string The shipping zone instance id for which to return the schema
Résultat object | null The service schema or null if no such instance was found

get_service_schemas() public méthode

public get_service_schemas ( )

maybe_update_heartbeat() protected méthode

protected maybe_update_heartbeat ( )

update_last_fetch_timestamp() protected méthode

update_service_schemas() protected méthode

protected update_service_schemas ( $service_schemas )

Property Details

$api_client protected_oe property

protected WC_Connect_API_Client $api_client
Résultat WC_Connect_API_Client

$logger protected_oe property

protected WC_Connect_Logger $logger
Résultat WC_Connect_Logger