ripe / com.ripe.android.api / SizeAPI

SizeAPI

interface SizeAPI : BaseAPI

The interface for the Size API.

Inherited Properties

owner

abstract val owner: Ripe

The Ripe instance that is using the API.

Functions

getSizesAsync

open fun getSizesAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>

Provides a list of all the available size scales. This can be used to know what scales are available for size conversions.

nativeToSizeAsync

open fun nativeToSizeAsync(scale: String, value: Int, gender: String, options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>

Converts a size value in the specified scale to the corresponding native size. The available scales, genders and sizes can be obtained with the method getPriceAsync.

nativeToSizeBAsync

open fun nativeToSizeBAsync(scales: List<String>, values: List<Int>, genders: List<String>, options: Map<String, Any> = HashMap()): Deferred<List<Map<String, Any>>?>

Converts multiple size values to the corresponding native size. The available scales, genders and sizes can be obtained with the method getPriceAsync.

sizeToNativeAsync

open fun sizeToNativeAsync(scale: String, value: Double, gender: String, options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>

Converts a size value from the native scale to the corresponding value in the specified scale. The available scales, genders and sizes can be obtained with the method getSizesAsync.

sizeToNativeBAsync

open fun sizeToNativeBAsync(scales: List<String>, values: List<Double>, genders: List<String>, options: Map<String, Any> = HashMap()): Deferred<List<Map<String, Any>>?>

Converts multiple size values from the native scale to the corresponding values in the specified scales. The available scales, genders and sizes can be obtained with the method getSizesAsync.

Inherited Functions

getImageUrl

open fun getImageUrl(options: Map<String, Any> = HashMap()): String

Returns the url of a composition for the current configuration.

getPriceAsync

open fun getPriceAsync(options: Map<String, Any> = HashMap()): Deferred<Map<String, Any>?>

Retrieves the price for current configuration. Returns a Deferred object that will be completed asynchronously.

getUrl

open fun getUrl(): String

Helper method that retrieves the base API URL from the owner's options.

Inheritors

RipeAPI

class RipeAPI : BaseAPI, BrandAPI, BuildAPI, LocaleAPI, SizeAPI

The API class to be instantiated. Implements all the API interfaces.