{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
module StripeAPI.Types.Item where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qualified Data.Aeson as Data.Aeson.Types
import qualified Data.Aeson as Data.Aeson.Types.FromJSON
import qualified Data.Aeson as Data.Aeson.Types.Internal
import qualified Data.Aeson as Data.Aeson.Types.ToJSON
import qualified Data.ByteString.Char8
import qualified Data.ByteString.Char8 as Data.ByteString.Internal
import qualified Data.Functor
import qualified Data.Scientific
import qualified Data.Text
import qualified Data.Text.Internal
import qualified Data.Time.Calendar as Data.Time.Calendar.Days
import qualified Data.Time.LocalTime as Data.Time.LocalTime.Internal.ZonedTime
import qualified GHC.Base
import qualified GHC.Classes
import qualified GHC.Int
import qualified GHC.Show
import qualified GHC.Types
import qualified StripeAPI.Common
import StripeAPI.TypeAlias
import {-# SOURCE #-} StripeAPI.Types.DeletedProduct
import {-# SOURCE #-} StripeAPI.Types.LineItemsDiscountAmount
import {-# SOURCE #-} StripeAPI.Types.LineItemsTaxAmount
import {-# SOURCE #-} StripeAPI.Types.Price
import {-# SOURCE #-} StripeAPI.Types.PriceTier
import {-# SOURCE #-} StripeAPI.Types.Product
import {-# SOURCE #-} StripeAPI.Types.Recurring
import {-# SOURCE #-} StripeAPI.Types.TransformQuantity
import qualified Prelude as GHC.Integer.Type
import qualified Prelude as GHC.Maybe
data Item = Item
{
Item -> Int
itemAmountSubtotal :: GHC.Types.Int,
Item -> Int
itemAmountTotal :: GHC.Types.Int,
Item -> Text
itemCurrency :: Data.Text.Internal.Text,
Item -> Text
itemDescription :: Data.Text.Internal.Text,
Item -> Maybe [LineItemsDiscountAmount]
itemDiscounts :: (GHC.Maybe.Maybe ([LineItemsDiscountAmount])),
Item -> Text
itemId :: Data.Text.Internal.Text,
Item -> Maybe ItemPrice'
itemPrice :: (GHC.Maybe.Maybe ItemPrice'),
Item -> Maybe Int
itemQuantity :: (GHC.Maybe.Maybe GHC.Types.Int),
Item -> Maybe [LineItemsTaxAmount]
itemTaxes :: (GHC.Maybe.Maybe ([LineItemsTaxAmount]))
}
deriving
( Int -> Item -> ShowS
[Item] -> ShowS
Item -> String
(Int -> Item -> ShowS)
-> (Item -> String) -> ([Item] -> ShowS) -> Show Item
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Item] -> ShowS
$cshowList :: [Item] -> ShowS
show :: Item -> String
$cshow :: Item -> String
showsPrec :: Int -> Item -> ShowS
$cshowsPrec :: Int -> Item -> ShowS
GHC.Show.Show,
Item -> Item -> Bool
(Item -> Item -> Bool) -> (Item -> Item -> Bool) -> Eq Item
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Item -> Item -> Bool
$c/= :: Item -> Item -> Bool
== :: Item -> Item -> Bool
$c== :: Item -> Item -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON Item where
toJSON :: Item -> Value
toJSON Item
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"amount_subtotal" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Int
itemAmountSubtotal Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"amount_total" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Int
itemAmountTotal Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemCurrency Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemDescription Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"discounts" Text -> Maybe [LineItemsDiscountAmount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe [LineItemsDiscountAmount]
itemDiscounts Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemId Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"price" Text -> Maybe ItemPrice' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe ItemPrice'
itemPrice Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"quantity" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe Int
itemQuantity Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"taxes" Text -> Maybe [LineItemsTaxAmount] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe [LineItemsTaxAmount]
itemTaxes Item
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Value -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"item" Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: Item -> Encoding
toEncoding Item
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"amount_subtotal" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Int
itemAmountSubtotal Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"amount_total" Text -> Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Int
itemAmountTotal Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemCurrency Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"description" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemDescription Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"discounts" Text -> Maybe [LineItemsDiscountAmount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe [LineItemsDiscountAmount]
itemDiscounts Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Text
itemId Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"price" Text -> Maybe ItemPrice' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe ItemPrice'
itemPrice Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"quantity" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe Int
itemQuantity Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"taxes" Text -> Maybe [LineItemsTaxAmount] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Item -> Maybe [LineItemsTaxAmount]
itemTaxes Item
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"object" Text -> Value -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= Text -> Value
Data.Aeson.Types.Internal.String Text
"item"))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON Item where
parseJSON :: Value -> Parser Item
parseJSON = String -> (Object -> Parser Item) -> Value -> Parser Item
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"Item" (\Object
obj -> (((((((((Int
-> Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser
(Int
-> Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Int
-> Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item
Item Parser
(Int
-> Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser Int
-> Parser
(Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_subtotal")) Parser
(Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser Int
-> Parser
(Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Int
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"amount_total")) Parser
(Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser Text
-> Parser
(Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"currency")) Parser
(Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser Text
-> Parser
(Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"description")) Parser
(Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser (Maybe [LineItemsDiscountAmount])
-> Parser
(Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [LineItemsDiscountAmount])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"discounts")) Parser
(Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item)
-> Parser Text
-> Parser
(Maybe ItemPrice'
-> Maybe Int -> Maybe [LineItemsTaxAmount] -> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Data.Aeson.Types.FromJSON..: Text
"id")) Parser
(Maybe ItemPrice'
-> Maybe Int -> Maybe [LineItemsTaxAmount] -> Item)
-> Parser (Maybe ItemPrice')
-> Parser (Maybe Int -> Maybe [LineItemsTaxAmount] -> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"price")) Parser (Maybe Int -> Maybe [LineItemsTaxAmount] -> Item)
-> Parser (Maybe Int)
-> Parser (Maybe [LineItemsTaxAmount] -> Item)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"quantity")) Parser (Maybe [LineItemsTaxAmount] -> Item)
-> Parser (Maybe [LineItemsTaxAmount]) -> Parser Item
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [LineItemsTaxAmount])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"taxes"))
mkItem ::
GHC.Types.Int ->
GHC.Types.Int ->
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
Data.Text.Internal.Text ->
Item
mkItem :: Int -> Int -> Text -> Text -> Text -> Item
mkItem Int
itemAmountSubtotal Int
itemAmountTotal Text
itemCurrency Text
itemDescription Text
itemId =
Item :: Int
-> Int
-> Text
-> Text
-> Maybe [LineItemsDiscountAmount]
-> Text
-> Maybe ItemPrice'
-> Maybe Int
-> Maybe [LineItemsTaxAmount]
-> Item
Item
{ itemAmountSubtotal :: Int
itemAmountSubtotal = Int
itemAmountSubtotal,
itemAmountTotal :: Int
itemAmountTotal = Int
itemAmountTotal,
itemCurrency :: Text
itemCurrency = Text
itemCurrency,
itemDescription :: Text
itemDescription = Text
itemDescription,
itemDiscounts :: Maybe [LineItemsDiscountAmount]
itemDiscounts = Maybe [LineItemsDiscountAmount]
forall a. Maybe a
GHC.Maybe.Nothing,
itemId :: Text
itemId = Text
itemId,
itemPrice :: Maybe ItemPrice'
itemPrice = Maybe ItemPrice'
forall a. Maybe a
GHC.Maybe.Nothing,
itemQuantity :: Maybe Int
itemQuantity = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
itemTaxes :: Maybe [LineItemsTaxAmount]
itemTaxes = Maybe [LineItemsTaxAmount]
forall a. Maybe a
GHC.Maybe.Nothing
}
data ItemPrice' = ItemPrice'
{
ItemPrice' -> Maybe Bool
itemPrice'Active :: (GHC.Maybe.Maybe GHC.Types.Bool),
ItemPrice' -> Maybe ItemPrice'BillingScheme'
itemPrice'BillingScheme :: (GHC.Maybe.Maybe ItemPrice'BillingScheme'),
ItemPrice' -> Maybe Int
itemPrice'Created :: (GHC.Maybe.Maybe GHC.Types.Int),
ItemPrice' -> Maybe Text
itemPrice'Currency :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ItemPrice' -> Maybe Text
itemPrice'Id :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ItemPrice' -> Maybe Bool
itemPrice'Livemode :: (GHC.Maybe.Maybe GHC.Types.Bool),
ItemPrice' -> Maybe Text
itemPrice'LookupKey :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ItemPrice' -> Maybe Object
itemPrice'Metadata :: (GHC.Maybe.Maybe Data.Aeson.Types.Internal.Object),
ItemPrice' -> Maybe Text
itemPrice'Nickname :: (GHC.Maybe.Maybe Data.Text.Internal.Text),
ItemPrice' -> Maybe ItemPrice'Object'
itemPrice'Object :: (GHC.Maybe.Maybe ItemPrice'Object'),
ItemPrice' -> Maybe ItemPrice'Product'Variants
itemPrice'Product :: (GHC.Maybe.Maybe ItemPrice'Product'Variants),
ItemPrice' -> Maybe ItemPrice'Recurring'
itemPrice'Recurring :: (GHC.Maybe.Maybe ItemPrice'Recurring'),
ItemPrice' -> Maybe ItemPrice'TaxBehavior'
itemPrice'TaxBehavior :: (GHC.Maybe.Maybe ItemPrice'TaxBehavior'),
ItemPrice' -> Maybe [PriceTier]
itemPrice'Tiers :: (GHC.Maybe.Maybe ([PriceTier])),
ItemPrice' -> Maybe ItemPrice'TiersMode'
itemPrice'TiersMode :: (GHC.Maybe.Maybe ItemPrice'TiersMode'),
ItemPrice' -> Maybe ItemPrice'TransformQuantity'
itemPrice'TransformQuantity :: (GHC.Maybe.Maybe ItemPrice'TransformQuantity'),
ItemPrice' -> Maybe ItemPrice'Type'
itemPrice'Type :: (GHC.Maybe.Maybe ItemPrice'Type'),
ItemPrice' -> Maybe Int
itemPrice'UnitAmount :: (GHC.Maybe.Maybe GHC.Types.Int),
ItemPrice' -> Maybe Text
itemPrice'UnitAmountDecimal :: (GHC.Maybe.Maybe Data.Text.Internal.Text)
}
deriving
( Int -> ItemPrice' -> ShowS
[ItemPrice'] -> ShowS
ItemPrice' -> String
(Int -> ItemPrice' -> ShowS)
-> (ItemPrice' -> String)
-> ([ItemPrice'] -> ShowS)
-> Show ItemPrice'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'] -> ShowS
$cshowList :: [ItemPrice'] -> ShowS
show :: ItemPrice' -> String
$cshow :: ItemPrice' -> String
showsPrec :: Int -> ItemPrice' -> ShowS
$cshowsPrec :: Int -> ItemPrice' -> ShowS
GHC.Show.Show,
ItemPrice' -> ItemPrice' -> Bool
(ItemPrice' -> ItemPrice' -> Bool)
-> (ItemPrice' -> ItemPrice' -> Bool) -> Eq ItemPrice'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice' -> ItemPrice' -> Bool
$c/= :: ItemPrice' -> ItemPrice' -> Bool
== :: ItemPrice' -> ItemPrice' -> Bool
$c== :: ItemPrice' -> ItemPrice' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice' where
toJSON :: ItemPrice' -> Value
toJSON ItemPrice'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"active" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Bool
itemPrice'Active ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"billing_scheme" Text -> Maybe ItemPrice'BillingScheme' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'BillingScheme'
itemPrice'BillingScheme ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"created" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Int
itemPrice'Created ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"currency" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Currency ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"id" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Id ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"livemode" Text -> Maybe Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Bool
itemPrice'Livemode ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"lookup_key" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'LookupKey ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"metadata" Text -> Maybe Object -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Object
itemPrice'Metadata ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"nickname" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Nickname ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"object" Text -> Maybe ItemPrice'Object' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Object'
itemPrice'Object ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"product" Text -> Maybe ItemPrice'Product'Variants -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Product'Variants
itemPrice'Product ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"recurring" Text -> Maybe ItemPrice'Recurring' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Recurring'
itemPrice'Recurring ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tax_behavior" Text -> Maybe ItemPrice'TaxBehavior' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TaxBehavior'
itemPrice'TaxBehavior ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tiers" Text -> Maybe [PriceTier] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe [PriceTier]
itemPrice'Tiers ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"tiers_mode" Text -> Maybe ItemPrice'TiersMode' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TiersMode'
itemPrice'TiersMode ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"transform_quantity" Text -> Maybe ItemPrice'TransformQuantity' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TransformQuantity'
itemPrice'TransformQuantity ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"type" Text -> Maybe ItemPrice'Type' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Type'
itemPrice'Type ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"unit_amount" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Int
itemPrice'UnitAmount ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"unit_amount_decimal" Text -> Maybe Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'UnitAmountDecimal ItemPrice'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: ItemPrice' -> Encoding
toEncoding ItemPrice'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"active" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Bool
itemPrice'Active ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"billing_scheme" Text -> Maybe ItemPrice'BillingScheme' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'BillingScheme'
itemPrice'BillingScheme ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"created" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Int
itemPrice'Created ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"currency" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Currency ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"id" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Id ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"livemode" Text -> Maybe Bool -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Bool
itemPrice'Livemode ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"lookup_key" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'LookupKey ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"metadata" Text -> Maybe Object -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Object
itemPrice'Metadata ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"nickname" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'Nickname ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"object" Text -> Maybe ItemPrice'Object' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Object'
itemPrice'Object ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"product" Text -> Maybe ItemPrice'Product'Variants -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Product'Variants
itemPrice'Product ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"recurring" Text -> Maybe ItemPrice'Recurring' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Recurring'
itemPrice'Recurring ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tax_behavior" Text -> Maybe ItemPrice'TaxBehavior' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TaxBehavior'
itemPrice'TaxBehavior ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tiers" Text -> Maybe [PriceTier] -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe [PriceTier]
itemPrice'Tiers ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"tiers_mode" Text -> Maybe ItemPrice'TiersMode' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TiersMode'
itemPrice'TiersMode ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"transform_quantity" Text -> Maybe ItemPrice'TransformQuantity' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'TransformQuantity'
itemPrice'TransformQuantity ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"type" Text -> Maybe ItemPrice'Type' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe ItemPrice'Type'
itemPrice'Type ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"unit_amount" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Int
itemPrice'UnitAmount ItemPrice'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"unit_amount_decimal" Text -> Maybe Text -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice' -> Maybe Text
itemPrice'UnitAmountDecimal ItemPrice'
obj)))))))))))))))))))
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice' where
parseJSON :: Value -> Parser ItemPrice'
parseJSON = String
-> (Object -> Parser ItemPrice') -> Value -> Parser ItemPrice'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"ItemPrice'" (\Object
obj -> (((((((((((((((((((Maybe Bool
-> Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser
(Maybe Bool
-> Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Bool
-> Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice'
ItemPrice' Parser
(Maybe Bool
-> Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Bool)
-> Parser
(Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"active")) Parser
(Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'BillingScheme')
-> Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'BillingScheme')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"billing_scheme")) Parser
(Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Int)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"created")) Parser
(Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"currency")) Parser
(Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Text)
-> Parser
(Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"id")) Parser
(Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Bool)
-> Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"livemode")) Parser
(Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Text)
-> Parser
(Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"lookup_key")) Parser
(Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Object)
-> Parser
(Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Object)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"metadata")) Parser
(Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe Text)
-> Parser
(Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"nickname")) Parser
(Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'Object')
-> Parser
(Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Object')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"object")) Parser
(Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'Product'Variants)
-> Parser
(Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Product'Variants)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"product")) Parser
(Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'Recurring')
-> Parser
(Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Recurring')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"recurring")) Parser
(Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'TaxBehavior')
-> Parser
(Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'TaxBehavior')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tax_behavior")) Parser
(Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe [PriceTier])
-> Parser
(Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe [PriceTier])
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tiers")) Parser
(Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice')
-> Parser (Maybe ItemPrice'TiersMode')
-> Parser
(Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type' -> Maybe Int -> Maybe Text -> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'TiersMode')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"tiers_mode")) Parser
(Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type' -> Maybe Int -> Maybe Text -> ItemPrice')
-> Parser (Maybe ItemPrice'TransformQuantity')
-> Parser
(Maybe ItemPrice'Type' -> Maybe Int -> Maybe Text -> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'TransformQuantity')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"transform_quantity")) Parser
(Maybe ItemPrice'Type' -> Maybe Int -> Maybe Text -> ItemPrice')
-> Parser (Maybe ItemPrice'Type')
-> Parser (Maybe Int -> Maybe Text -> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Type')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"type")) Parser (Maybe Int -> Maybe Text -> ItemPrice')
-> Parser (Maybe Int) -> Parser (Maybe Text -> ItemPrice')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"unit_amount")) Parser (Maybe Text -> ItemPrice')
-> Parser (Maybe Text) -> Parser ItemPrice'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"unit_amount_decimal"))
mkItemPrice' :: ItemPrice'
mkItemPrice' :: ItemPrice'
mkItemPrice' =
ItemPrice' :: Maybe Bool
-> Maybe ItemPrice'BillingScheme'
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Object
-> Maybe Text
-> Maybe ItemPrice'Object'
-> Maybe ItemPrice'Product'Variants
-> Maybe ItemPrice'Recurring'
-> Maybe ItemPrice'TaxBehavior'
-> Maybe [PriceTier]
-> Maybe ItemPrice'TiersMode'
-> Maybe ItemPrice'TransformQuantity'
-> Maybe ItemPrice'Type'
-> Maybe Int
-> Maybe Text
-> ItemPrice'
ItemPrice'
{ itemPrice'Active :: Maybe Bool
itemPrice'Active = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'BillingScheme :: Maybe ItemPrice'BillingScheme'
itemPrice'BillingScheme = Maybe ItemPrice'BillingScheme'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Created :: Maybe Int
itemPrice'Created = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Currency :: Maybe Text
itemPrice'Currency = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Id :: Maybe Text
itemPrice'Id = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Livemode :: Maybe Bool
itemPrice'Livemode = Maybe Bool
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'LookupKey :: Maybe Text
itemPrice'LookupKey = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Metadata :: Maybe Object
itemPrice'Metadata = Maybe Object
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Nickname :: Maybe Text
itemPrice'Nickname = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Object :: Maybe ItemPrice'Object'
itemPrice'Object = Maybe ItemPrice'Object'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Product :: Maybe ItemPrice'Product'Variants
itemPrice'Product = Maybe ItemPrice'Product'Variants
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Recurring :: Maybe ItemPrice'Recurring'
itemPrice'Recurring = Maybe ItemPrice'Recurring'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'TaxBehavior :: Maybe ItemPrice'TaxBehavior'
itemPrice'TaxBehavior = Maybe ItemPrice'TaxBehavior'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Tiers :: Maybe [PriceTier]
itemPrice'Tiers = Maybe [PriceTier]
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'TiersMode :: Maybe ItemPrice'TiersMode'
itemPrice'TiersMode = Maybe ItemPrice'TiersMode'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'TransformQuantity :: Maybe ItemPrice'TransformQuantity'
itemPrice'TransformQuantity = Maybe ItemPrice'TransformQuantity'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Type :: Maybe ItemPrice'Type'
itemPrice'Type = Maybe ItemPrice'Type'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'UnitAmount :: Maybe Int
itemPrice'UnitAmount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'UnitAmountDecimal :: Maybe Text
itemPrice'UnitAmountDecimal = Maybe Text
forall a. Maybe a
GHC.Maybe.Nothing
}
data ItemPrice'BillingScheme'
=
ItemPrice'BillingScheme'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'BillingScheme'Typed Data.Text.Internal.Text
|
ItemPrice'BillingScheme'EnumPerUnit
|
ItemPrice'BillingScheme'EnumTiered
deriving (Int -> ItemPrice'BillingScheme' -> ShowS
[ItemPrice'BillingScheme'] -> ShowS
ItemPrice'BillingScheme' -> String
(Int -> ItemPrice'BillingScheme' -> ShowS)
-> (ItemPrice'BillingScheme' -> String)
-> ([ItemPrice'BillingScheme'] -> ShowS)
-> Show ItemPrice'BillingScheme'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'BillingScheme'] -> ShowS
$cshowList :: [ItemPrice'BillingScheme'] -> ShowS
show :: ItemPrice'BillingScheme' -> String
$cshow :: ItemPrice'BillingScheme' -> String
showsPrec :: Int -> ItemPrice'BillingScheme' -> ShowS
$cshowsPrec :: Int -> ItemPrice'BillingScheme' -> ShowS
GHC.Show.Show, ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool
(ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool)
-> (ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool)
-> Eq ItemPrice'BillingScheme'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool
$c/= :: ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool
== :: ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool
$c== :: ItemPrice'BillingScheme' -> ItemPrice'BillingScheme' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'BillingScheme' where
toJSON :: ItemPrice'BillingScheme' -> Value
toJSON (ItemPrice'BillingScheme'Other Value
val) = Value
val
toJSON (ItemPrice'BillingScheme'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'BillingScheme'
ItemPrice'BillingScheme'EnumPerUnit) = Value
"per_unit"
toJSON (ItemPrice'BillingScheme'
ItemPrice'BillingScheme'EnumTiered) = Value
"tiered"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'BillingScheme' where
parseJSON :: Value -> Parser ItemPrice'BillingScheme'
parseJSON Value
val =
ItemPrice'BillingScheme' -> Parser ItemPrice'BillingScheme'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"per_unit" -> ItemPrice'BillingScheme'
ItemPrice'BillingScheme'EnumPerUnit
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"tiered" -> ItemPrice'BillingScheme'
ItemPrice'BillingScheme'EnumTiered
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'BillingScheme'
ItemPrice'BillingScheme'Other Value
val
)
data ItemPrice'Object'
=
ItemPrice'Object'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'Object'Typed Data.Text.Internal.Text
|
ItemPrice'Object'EnumPrice
deriving (Int -> ItemPrice'Object' -> ShowS
[ItemPrice'Object'] -> ShowS
ItemPrice'Object' -> String
(Int -> ItemPrice'Object' -> ShowS)
-> (ItemPrice'Object' -> String)
-> ([ItemPrice'Object'] -> ShowS)
-> Show ItemPrice'Object'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Object'] -> ShowS
$cshowList :: [ItemPrice'Object'] -> ShowS
show :: ItemPrice'Object' -> String
$cshow :: ItemPrice'Object' -> String
showsPrec :: Int -> ItemPrice'Object' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Object' -> ShowS
GHC.Show.Show, ItemPrice'Object' -> ItemPrice'Object' -> Bool
(ItemPrice'Object' -> ItemPrice'Object' -> Bool)
-> (ItemPrice'Object' -> ItemPrice'Object' -> Bool)
-> Eq ItemPrice'Object'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Object' -> ItemPrice'Object' -> Bool
$c/= :: ItemPrice'Object' -> ItemPrice'Object' -> Bool
== :: ItemPrice'Object' -> ItemPrice'Object' -> Bool
$c== :: ItemPrice'Object' -> ItemPrice'Object' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Object' where
toJSON :: ItemPrice'Object' -> Value
toJSON (ItemPrice'Object'Other Value
val) = Value
val
toJSON (ItemPrice'Object'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'Object'
ItemPrice'Object'EnumPrice) = Value
"price"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Object' where
parseJSON :: Value -> Parser ItemPrice'Object'
parseJSON Value
val =
ItemPrice'Object' -> Parser ItemPrice'Object'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"price" -> ItemPrice'Object'
ItemPrice'Object'EnumPrice
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'Object'
ItemPrice'Object'Other Value
val
)
data ItemPrice'Product'Variants
= ItemPrice'Product'Text Data.Text.Internal.Text
| ItemPrice'Product'Product Product
| ItemPrice'Product'DeletedProduct DeletedProduct
deriving (Int -> ItemPrice'Product'Variants -> ShowS
[ItemPrice'Product'Variants] -> ShowS
ItemPrice'Product'Variants -> String
(Int -> ItemPrice'Product'Variants -> ShowS)
-> (ItemPrice'Product'Variants -> String)
-> ([ItemPrice'Product'Variants] -> ShowS)
-> Show ItemPrice'Product'Variants
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Product'Variants] -> ShowS
$cshowList :: [ItemPrice'Product'Variants] -> ShowS
show :: ItemPrice'Product'Variants -> String
$cshow :: ItemPrice'Product'Variants -> String
showsPrec :: Int -> ItemPrice'Product'Variants -> ShowS
$cshowsPrec :: Int -> ItemPrice'Product'Variants -> ShowS
GHC.Show.Show, ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool
(ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool)
-> (ItemPrice'Product'Variants
-> ItemPrice'Product'Variants -> Bool)
-> Eq ItemPrice'Product'Variants
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool
$c/= :: ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool
== :: ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool
$c== :: ItemPrice'Product'Variants -> ItemPrice'Product'Variants -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Product'Variants where
toJSON :: ItemPrice'Product'Variants -> Value
toJSON (ItemPrice'Product'Text Text
a) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
a
toJSON (ItemPrice'Product'Product Product
a) = Product -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Product
a
toJSON (ItemPrice'Product'DeletedProduct DeletedProduct
a) = DeletedProduct -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON DeletedProduct
a
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Product'Variants where
parseJSON :: Value -> Parser ItemPrice'Product'Variants
parseJSON Value
val = case (Text -> ItemPrice'Product'Variants
ItemPrice'Product'Text (Text -> ItemPrice'Product'Variants)
-> Result Text -> Result ItemPrice'Product'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Text
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((Product -> ItemPrice'Product'Variants
ItemPrice'Product'Product (Product -> ItemPrice'Product'Variants)
-> Result Product -> Result ItemPrice'Product'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result Product
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> ((DeletedProduct -> ItemPrice'Product'Variants
ItemPrice'Product'DeletedProduct (DeletedProduct -> ItemPrice'Product'Variants)
-> Result DeletedProduct -> Result ItemPrice'Product'Variants
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Data.Functor.<$> Value -> Result DeletedProduct
forall a. FromJSON a => Value -> Result a
Data.Aeson.Types.FromJSON.fromJSON Value
val) Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
-> Result ItemPrice'Product'Variants
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
GHC.Base.<|> String -> Result ItemPrice'Product'Variants
forall a. String -> Result a
Data.Aeson.Types.Internal.Error String
"No variant matched")) of
Data.Aeson.Types.Internal.Success ItemPrice'Product'Variants
a -> ItemPrice'Product'Variants -> Parser ItemPrice'Product'Variants
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure ItemPrice'Product'Variants
a
Data.Aeson.Types.Internal.Error String
a -> String -> Parser ItemPrice'Product'Variants
forall (m :: * -> *) a. MonadFail m => String -> m a
Control.Monad.Fail.fail String
a
data ItemPrice'Recurring' = ItemPrice'Recurring'
{
ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'AggregateUsage'
itemPrice'Recurring'AggregateUsage :: (GHC.Maybe.Maybe ItemPrice'Recurring'AggregateUsage'),
ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'Interval'
itemPrice'Recurring'Interval :: (GHC.Maybe.Maybe ItemPrice'Recurring'Interval'),
ItemPrice'Recurring' -> Maybe Int
itemPrice'Recurring'IntervalCount :: (GHC.Maybe.Maybe GHC.Types.Int),
ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'UsageType'
itemPrice'Recurring'UsageType :: (GHC.Maybe.Maybe ItemPrice'Recurring'UsageType')
}
deriving
( Int -> ItemPrice'Recurring' -> ShowS
[ItemPrice'Recurring'] -> ShowS
ItemPrice'Recurring' -> String
(Int -> ItemPrice'Recurring' -> ShowS)
-> (ItemPrice'Recurring' -> String)
-> ([ItemPrice'Recurring'] -> ShowS)
-> Show ItemPrice'Recurring'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Recurring'] -> ShowS
$cshowList :: [ItemPrice'Recurring'] -> ShowS
show :: ItemPrice'Recurring' -> String
$cshow :: ItemPrice'Recurring' -> String
showsPrec :: Int -> ItemPrice'Recurring' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Recurring' -> ShowS
GHC.Show.Show,
ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool
(ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool)
-> (ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool)
-> Eq ItemPrice'Recurring'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool
$c/= :: ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool
== :: ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool
$c== :: ItemPrice'Recurring' -> ItemPrice'Recurring' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Recurring' where
toJSON :: ItemPrice'Recurring' -> Value
toJSON ItemPrice'Recurring'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"aggregate_usage" Text -> Maybe ItemPrice'Recurring'AggregateUsage' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'AggregateUsage'
itemPrice'Recurring'AggregateUsage ItemPrice'Recurring'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"interval" Text -> Maybe ItemPrice'Recurring'Interval' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'Interval'
itemPrice'Recurring'Interval ItemPrice'Recurring'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"interval_count" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe Int
itemPrice'Recurring'IntervalCount ItemPrice'Recurring'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"usage_type" Text -> Maybe ItemPrice'Recurring'UsageType' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'UsageType'
itemPrice'Recurring'UsageType ItemPrice'Recurring'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: ItemPrice'Recurring' -> Encoding
toEncoding ItemPrice'Recurring'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"aggregate_usage" Text -> Maybe ItemPrice'Recurring'AggregateUsage' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'AggregateUsage'
itemPrice'Recurring'AggregateUsage ItemPrice'Recurring'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"interval" Text -> Maybe ItemPrice'Recurring'Interval' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'Interval'
itemPrice'Recurring'Interval ItemPrice'Recurring'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> ((Text
"interval_count" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe Int
itemPrice'Recurring'IntervalCount ItemPrice'Recurring'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"usage_type" Text -> Maybe ItemPrice'Recurring'UsageType' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'Recurring' -> Maybe ItemPrice'Recurring'UsageType'
itemPrice'Recurring'UsageType ItemPrice'Recurring'
obj))))
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Recurring' where
parseJSON :: Value -> Parser ItemPrice'Recurring'
parseJSON = String
-> (Object -> Parser ItemPrice'Recurring')
-> Value
-> Parser ItemPrice'Recurring'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"ItemPrice'Recurring'" (\Object
obj -> ((((Maybe ItemPrice'Recurring'AggregateUsage'
-> Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring')
-> Parser
(Maybe ItemPrice'Recurring'AggregateUsage'
-> Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe ItemPrice'Recurring'AggregateUsage'
-> Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'
ItemPrice'Recurring' Parser
(Maybe ItemPrice'Recurring'AggregateUsage'
-> Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring')
-> Parser (Maybe ItemPrice'Recurring'AggregateUsage')
-> Parser
(Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object
-> Text -> Parser (Maybe ItemPrice'Recurring'AggregateUsage')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"aggregate_usage")) Parser
(Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring')
-> Parser (Maybe ItemPrice'Recurring'Interval')
-> Parser
(Maybe Int
-> Maybe ItemPrice'Recurring'UsageType' -> ItemPrice'Recurring')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Recurring'Interval')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"interval")) Parser
(Maybe Int
-> Maybe ItemPrice'Recurring'UsageType' -> ItemPrice'Recurring')
-> Parser (Maybe Int)
-> Parser
(Maybe ItemPrice'Recurring'UsageType' -> ItemPrice'Recurring')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"interval_count")) Parser
(Maybe ItemPrice'Recurring'UsageType' -> ItemPrice'Recurring')
-> Parser (Maybe ItemPrice'Recurring'UsageType')
-> Parser ItemPrice'Recurring'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'Recurring'UsageType')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"usage_type"))
mkItemPrice'Recurring' :: ItemPrice'Recurring'
mkItemPrice'Recurring' :: ItemPrice'Recurring'
mkItemPrice'Recurring' =
ItemPrice'Recurring' :: Maybe ItemPrice'Recurring'AggregateUsage'
-> Maybe ItemPrice'Recurring'Interval'
-> Maybe Int
-> Maybe ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'
ItemPrice'Recurring'
{ itemPrice'Recurring'AggregateUsage :: Maybe ItemPrice'Recurring'AggregateUsage'
itemPrice'Recurring'AggregateUsage = Maybe ItemPrice'Recurring'AggregateUsage'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Recurring'Interval :: Maybe ItemPrice'Recurring'Interval'
itemPrice'Recurring'Interval = Maybe ItemPrice'Recurring'Interval'
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Recurring'IntervalCount :: Maybe Int
itemPrice'Recurring'IntervalCount = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'Recurring'UsageType :: Maybe ItemPrice'Recurring'UsageType'
itemPrice'Recurring'UsageType = Maybe ItemPrice'Recurring'UsageType'
forall a. Maybe a
GHC.Maybe.Nothing
}
data ItemPrice'Recurring'AggregateUsage'
=
ItemPrice'Recurring'AggregateUsage'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'Recurring'AggregateUsage'Typed Data.Text.Internal.Text
|
ItemPrice'Recurring'AggregateUsage'EnumLastDuringPeriod
|
ItemPrice'Recurring'AggregateUsage'EnumLastEver
|
ItemPrice'Recurring'AggregateUsage'EnumMax
|
ItemPrice'Recurring'AggregateUsage'EnumSum
deriving (Int -> ItemPrice'Recurring'AggregateUsage' -> ShowS
[ItemPrice'Recurring'AggregateUsage'] -> ShowS
ItemPrice'Recurring'AggregateUsage' -> String
(Int -> ItemPrice'Recurring'AggregateUsage' -> ShowS)
-> (ItemPrice'Recurring'AggregateUsage' -> String)
-> ([ItemPrice'Recurring'AggregateUsage'] -> ShowS)
-> Show ItemPrice'Recurring'AggregateUsage'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Recurring'AggregateUsage'] -> ShowS
$cshowList :: [ItemPrice'Recurring'AggregateUsage'] -> ShowS
show :: ItemPrice'Recurring'AggregateUsage' -> String
$cshow :: ItemPrice'Recurring'AggregateUsage' -> String
showsPrec :: Int -> ItemPrice'Recurring'AggregateUsage' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Recurring'AggregateUsage' -> ShowS
GHC.Show.Show, ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool
(ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool)
-> (ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool)
-> Eq ItemPrice'Recurring'AggregateUsage'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool
$c/= :: ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool
== :: ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool
$c== :: ItemPrice'Recurring'AggregateUsage'
-> ItemPrice'Recurring'AggregateUsage' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Recurring'AggregateUsage' where
toJSON :: ItemPrice'Recurring'AggregateUsage' -> Value
toJSON (ItemPrice'Recurring'AggregateUsage'Other Value
val) = Value
val
toJSON (ItemPrice'Recurring'AggregateUsage'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumLastDuringPeriod) = Value
"last_during_period"
toJSON (ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumLastEver) = Value
"last_ever"
toJSON (ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumMax) = Value
"max"
toJSON (ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumSum) = Value
"sum"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Recurring'AggregateUsage' where
parseJSON :: Value -> Parser ItemPrice'Recurring'AggregateUsage'
parseJSON Value
val =
ItemPrice'Recurring'AggregateUsage'
-> Parser ItemPrice'Recurring'AggregateUsage'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"last_during_period" -> ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumLastDuringPeriod
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"last_ever" -> ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumLastEver
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"max" -> ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumMax
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"sum" -> ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'EnumSum
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'Recurring'AggregateUsage'
ItemPrice'Recurring'AggregateUsage'Other Value
val
)
data ItemPrice'Recurring'Interval'
=
ItemPrice'Recurring'Interval'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'Recurring'Interval'Typed Data.Text.Internal.Text
|
ItemPrice'Recurring'Interval'EnumDay
|
ItemPrice'Recurring'Interval'EnumMonth
|
ItemPrice'Recurring'Interval'EnumWeek
|
ItemPrice'Recurring'Interval'EnumYear
deriving (Int -> ItemPrice'Recurring'Interval' -> ShowS
[ItemPrice'Recurring'Interval'] -> ShowS
ItemPrice'Recurring'Interval' -> String
(Int -> ItemPrice'Recurring'Interval' -> ShowS)
-> (ItemPrice'Recurring'Interval' -> String)
-> ([ItemPrice'Recurring'Interval'] -> ShowS)
-> Show ItemPrice'Recurring'Interval'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Recurring'Interval'] -> ShowS
$cshowList :: [ItemPrice'Recurring'Interval'] -> ShowS
show :: ItemPrice'Recurring'Interval' -> String
$cshow :: ItemPrice'Recurring'Interval' -> String
showsPrec :: Int -> ItemPrice'Recurring'Interval' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Recurring'Interval' -> ShowS
GHC.Show.Show, ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool
(ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool)
-> (ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool)
-> Eq ItemPrice'Recurring'Interval'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool
$c/= :: ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool
== :: ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool
$c== :: ItemPrice'Recurring'Interval'
-> ItemPrice'Recurring'Interval' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Recurring'Interval' where
toJSON :: ItemPrice'Recurring'Interval' -> Value
toJSON (ItemPrice'Recurring'Interval'Other Value
val) = Value
val
toJSON (ItemPrice'Recurring'Interval'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumDay) = Value
"day"
toJSON (ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumMonth) = Value
"month"
toJSON (ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumWeek) = Value
"week"
toJSON (ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumYear) = Value
"year"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Recurring'Interval' where
parseJSON :: Value -> Parser ItemPrice'Recurring'Interval'
parseJSON Value
val =
ItemPrice'Recurring'Interval'
-> Parser ItemPrice'Recurring'Interval'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"day" -> ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumDay
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"month" -> ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumMonth
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"week" -> ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumWeek
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"year" -> ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'EnumYear
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'Recurring'Interval'
ItemPrice'Recurring'Interval'Other Value
val
)
data ItemPrice'Recurring'UsageType'
=
ItemPrice'Recurring'UsageType'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'Recurring'UsageType'Typed Data.Text.Internal.Text
|
ItemPrice'Recurring'UsageType'EnumLicensed
|
ItemPrice'Recurring'UsageType'EnumMetered
deriving (Int -> ItemPrice'Recurring'UsageType' -> ShowS
[ItemPrice'Recurring'UsageType'] -> ShowS
ItemPrice'Recurring'UsageType' -> String
(Int -> ItemPrice'Recurring'UsageType' -> ShowS)
-> (ItemPrice'Recurring'UsageType' -> String)
-> ([ItemPrice'Recurring'UsageType'] -> ShowS)
-> Show ItemPrice'Recurring'UsageType'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Recurring'UsageType'] -> ShowS
$cshowList :: [ItemPrice'Recurring'UsageType'] -> ShowS
show :: ItemPrice'Recurring'UsageType' -> String
$cshow :: ItemPrice'Recurring'UsageType' -> String
showsPrec :: Int -> ItemPrice'Recurring'UsageType' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Recurring'UsageType' -> ShowS
GHC.Show.Show, ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool
(ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool)
-> (ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool)
-> Eq ItemPrice'Recurring'UsageType'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool
$c/= :: ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool
== :: ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool
$c== :: ItemPrice'Recurring'UsageType'
-> ItemPrice'Recurring'UsageType' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Recurring'UsageType' where
toJSON :: ItemPrice'Recurring'UsageType' -> Value
toJSON (ItemPrice'Recurring'UsageType'Other Value
val) = Value
val
toJSON (ItemPrice'Recurring'UsageType'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'Recurring'UsageType'
ItemPrice'Recurring'UsageType'EnumLicensed) = Value
"licensed"
toJSON (ItemPrice'Recurring'UsageType'
ItemPrice'Recurring'UsageType'EnumMetered) = Value
"metered"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Recurring'UsageType' where
parseJSON :: Value -> Parser ItemPrice'Recurring'UsageType'
parseJSON Value
val =
ItemPrice'Recurring'UsageType'
-> Parser ItemPrice'Recurring'UsageType'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"licensed" -> ItemPrice'Recurring'UsageType'
ItemPrice'Recurring'UsageType'EnumLicensed
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"metered" -> ItemPrice'Recurring'UsageType'
ItemPrice'Recurring'UsageType'EnumMetered
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'Recurring'UsageType'
ItemPrice'Recurring'UsageType'Other Value
val
)
data ItemPrice'TaxBehavior'
=
ItemPrice'TaxBehavior'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'TaxBehavior'Typed Data.Text.Internal.Text
|
ItemPrice'TaxBehavior'EnumExclusive
|
ItemPrice'TaxBehavior'EnumInclusive
|
ItemPrice'TaxBehavior'EnumUnspecified
deriving (Int -> ItemPrice'TaxBehavior' -> ShowS
[ItemPrice'TaxBehavior'] -> ShowS
ItemPrice'TaxBehavior' -> String
(Int -> ItemPrice'TaxBehavior' -> ShowS)
-> (ItemPrice'TaxBehavior' -> String)
-> ([ItemPrice'TaxBehavior'] -> ShowS)
-> Show ItemPrice'TaxBehavior'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'TaxBehavior'] -> ShowS
$cshowList :: [ItemPrice'TaxBehavior'] -> ShowS
show :: ItemPrice'TaxBehavior' -> String
$cshow :: ItemPrice'TaxBehavior' -> String
showsPrec :: Int -> ItemPrice'TaxBehavior' -> ShowS
$cshowsPrec :: Int -> ItemPrice'TaxBehavior' -> ShowS
GHC.Show.Show, ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool
(ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool)
-> (ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool)
-> Eq ItemPrice'TaxBehavior'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool
$c/= :: ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool
== :: ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool
$c== :: ItemPrice'TaxBehavior' -> ItemPrice'TaxBehavior' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'TaxBehavior' where
toJSON :: ItemPrice'TaxBehavior' -> Value
toJSON (ItemPrice'TaxBehavior'Other Value
val) = Value
val
toJSON (ItemPrice'TaxBehavior'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumExclusive) = Value
"exclusive"
toJSON (ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumInclusive) = Value
"inclusive"
toJSON (ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumUnspecified) = Value
"unspecified"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'TaxBehavior' where
parseJSON :: Value -> Parser ItemPrice'TaxBehavior'
parseJSON Value
val =
ItemPrice'TaxBehavior' -> Parser ItemPrice'TaxBehavior'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"exclusive" -> ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumExclusive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"inclusive" -> ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumInclusive
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"unspecified" -> ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'EnumUnspecified
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'TaxBehavior'
ItemPrice'TaxBehavior'Other Value
val
)
data ItemPrice'TiersMode'
=
ItemPrice'TiersMode'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'TiersMode'Typed Data.Text.Internal.Text
|
ItemPrice'TiersMode'EnumGraduated
|
ItemPrice'TiersMode'EnumVolume
deriving (Int -> ItemPrice'TiersMode' -> ShowS
[ItemPrice'TiersMode'] -> ShowS
ItemPrice'TiersMode' -> String
(Int -> ItemPrice'TiersMode' -> ShowS)
-> (ItemPrice'TiersMode' -> String)
-> ([ItemPrice'TiersMode'] -> ShowS)
-> Show ItemPrice'TiersMode'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'TiersMode'] -> ShowS
$cshowList :: [ItemPrice'TiersMode'] -> ShowS
show :: ItemPrice'TiersMode' -> String
$cshow :: ItemPrice'TiersMode' -> String
showsPrec :: Int -> ItemPrice'TiersMode' -> ShowS
$cshowsPrec :: Int -> ItemPrice'TiersMode' -> ShowS
GHC.Show.Show, ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool
(ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool)
-> (ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool)
-> Eq ItemPrice'TiersMode'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool
$c/= :: ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool
== :: ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool
$c== :: ItemPrice'TiersMode' -> ItemPrice'TiersMode' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'TiersMode' where
toJSON :: ItemPrice'TiersMode' -> Value
toJSON (ItemPrice'TiersMode'Other Value
val) = Value
val
toJSON (ItemPrice'TiersMode'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'TiersMode'
ItemPrice'TiersMode'EnumGraduated) = Value
"graduated"
toJSON (ItemPrice'TiersMode'
ItemPrice'TiersMode'EnumVolume) = Value
"volume"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'TiersMode' where
parseJSON :: Value -> Parser ItemPrice'TiersMode'
parseJSON Value
val =
ItemPrice'TiersMode' -> Parser ItemPrice'TiersMode'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"graduated" -> ItemPrice'TiersMode'
ItemPrice'TiersMode'EnumGraduated
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"volume" -> ItemPrice'TiersMode'
ItemPrice'TiersMode'EnumVolume
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'TiersMode'
ItemPrice'TiersMode'Other Value
val
)
data ItemPrice'TransformQuantity' = ItemPrice'TransformQuantity'
{
ItemPrice'TransformQuantity' -> Maybe Int
itemPrice'TransformQuantity'DivideBy :: (GHC.Maybe.Maybe GHC.Types.Int),
ItemPrice'TransformQuantity'
-> Maybe ItemPrice'TransformQuantity'Round'
itemPrice'TransformQuantity'Round :: (GHC.Maybe.Maybe ItemPrice'TransformQuantity'Round')
}
deriving
( Int -> ItemPrice'TransformQuantity' -> ShowS
[ItemPrice'TransformQuantity'] -> ShowS
ItemPrice'TransformQuantity' -> String
(Int -> ItemPrice'TransformQuantity' -> ShowS)
-> (ItemPrice'TransformQuantity' -> String)
-> ([ItemPrice'TransformQuantity'] -> ShowS)
-> Show ItemPrice'TransformQuantity'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'TransformQuantity'] -> ShowS
$cshowList :: [ItemPrice'TransformQuantity'] -> ShowS
show :: ItemPrice'TransformQuantity' -> String
$cshow :: ItemPrice'TransformQuantity' -> String
showsPrec :: Int -> ItemPrice'TransformQuantity' -> ShowS
$cshowsPrec :: Int -> ItemPrice'TransformQuantity' -> ShowS
GHC.Show.Show,
ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool
(ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool)
-> (ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool)
-> Eq ItemPrice'TransformQuantity'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool
$c/= :: ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool
== :: ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool
$c== :: ItemPrice'TransformQuantity'
-> ItemPrice'TransformQuantity' -> Bool
GHC.Classes.Eq
)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'TransformQuantity' where
toJSON :: ItemPrice'TransformQuantity' -> Value
toJSON ItemPrice'TransformQuantity'
obj = [Pair] -> Value
Data.Aeson.Types.Internal.object (Text
"divide_by" Text -> Maybe Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'TransformQuantity' -> Maybe Int
itemPrice'TransformQuantity'DivideBy ItemPrice'TransformQuantity'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: Text
"round" Text -> Maybe ItemPrice'TransformQuantity'Round' -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'TransformQuantity'
-> Maybe ItemPrice'TransformQuantity'Round'
itemPrice'TransformQuantity'Round ItemPrice'TransformQuantity'
obj Pair -> [Pair] -> [Pair]
forall a. a -> [a] -> [a]
: [Pair]
forall a. Monoid a => a
GHC.Base.mempty)
toEncoding :: ItemPrice'TransformQuantity' -> Encoding
toEncoding ItemPrice'TransformQuantity'
obj = Series -> Encoding
Data.Aeson.Encoding.Internal.pairs ((Text
"divide_by" Text -> Maybe Int -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'TransformQuantity' -> Maybe Int
itemPrice'TransformQuantity'DivideBy ItemPrice'TransformQuantity'
obj) Series -> Series -> Series
forall a. Semigroup a => a -> a -> a
GHC.Base.<> (Text
"round" Text -> Maybe ItemPrice'TransformQuantity'Round' -> Series
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Data.Aeson.Types.ToJSON..= ItemPrice'TransformQuantity'
-> Maybe ItemPrice'TransformQuantity'Round'
itemPrice'TransformQuantity'Round ItemPrice'TransformQuantity'
obj))
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'TransformQuantity' where
parseJSON :: Value -> Parser ItemPrice'TransformQuantity'
parseJSON = String
-> (Object -> Parser ItemPrice'TransformQuantity')
-> Value
-> Parser ItemPrice'TransformQuantity'
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.Aeson.Types.FromJSON.withObject String
"ItemPrice'TransformQuantity'" (\Object
obj -> ((Maybe Int
-> Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity')
-> Parser
(Maybe Int
-> Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity')
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure Maybe Int
-> Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'
ItemPrice'TransformQuantity' Parser
(Maybe Int
-> Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity')
-> Parser (Maybe Int)
-> Parser
(Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity')
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"divide_by")) Parser
(Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity')
-> Parser (Maybe ItemPrice'TransformQuantity'Round')
-> Parser ItemPrice'TransformQuantity'
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
GHC.Base.<*> (Object
obj Object -> Text -> Parser (Maybe ItemPrice'TransformQuantity'Round')
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Data.Aeson.Types.FromJSON..:? Text
"round"))
mkItemPrice'TransformQuantity' :: ItemPrice'TransformQuantity'
mkItemPrice'TransformQuantity' :: ItemPrice'TransformQuantity'
mkItemPrice'TransformQuantity' =
ItemPrice'TransformQuantity' :: Maybe Int
-> Maybe ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'
ItemPrice'TransformQuantity'
{ itemPrice'TransformQuantity'DivideBy :: Maybe Int
itemPrice'TransformQuantity'DivideBy = Maybe Int
forall a. Maybe a
GHC.Maybe.Nothing,
itemPrice'TransformQuantity'Round :: Maybe ItemPrice'TransformQuantity'Round'
itemPrice'TransformQuantity'Round = Maybe ItemPrice'TransformQuantity'Round'
forall a. Maybe a
GHC.Maybe.Nothing
}
data ItemPrice'TransformQuantity'Round'
=
ItemPrice'TransformQuantity'Round'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'TransformQuantity'Round'Typed Data.Text.Internal.Text
|
ItemPrice'TransformQuantity'Round'EnumDown
|
ItemPrice'TransformQuantity'Round'EnumUp
deriving (Int -> ItemPrice'TransformQuantity'Round' -> ShowS
[ItemPrice'TransformQuantity'Round'] -> ShowS
ItemPrice'TransformQuantity'Round' -> String
(Int -> ItemPrice'TransformQuantity'Round' -> ShowS)
-> (ItemPrice'TransformQuantity'Round' -> String)
-> ([ItemPrice'TransformQuantity'Round'] -> ShowS)
-> Show ItemPrice'TransformQuantity'Round'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'TransformQuantity'Round'] -> ShowS
$cshowList :: [ItemPrice'TransformQuantity'Round'] -> ShowS
show :: ItemPrice'TransformQuantity'Round' -> String
$cshow :: ItemPrice'TransformQuantity'Round' -> String
showsPrec :: Int -> ItemPrice'TransformQuantity'Round' -> ShowS
$cshowsPrec :: Int -> ItemPrice'TransformQuantity'Round' -> ShowS
GHC.Show.Show, ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool
(ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool)
-> (ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool)
-> Eq ItemPrice'TransformQuantity'Round'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool
$c/= :: ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool
== :: ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool
$c== :: ItemPrice'TransformQuantity'Round'
-> ItemPrice'TransformQuantity'Round' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'TransformQuantity'Round' where
toJSON :: ItemPrice'TransformQuantity'Round' -> Value
toJSON (ItemPrice'TransformQuantity'Round'Other Value
val) = Value
val
toJSON (ItemPrice'TransformQuantity'Round'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'TransformQuantity'Round'
ItemPrice'TransformQuantity'Round'EnumDown) = Value
"down"
toJSON (ItemPrice'TransformQuantity'Round'
ItemPrice'TransformQuantity'Round'EnumUp) = Value
"up"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'TransformQuantity'Round' where
parseJSON :: Value -> Parser ItemPrice'TransformQuantity'Round'
parseJSON Value
val =
ItemPrice'TransformQuantity'Round'
-> Parser ItemPrice'TransformQuantity'Round'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"down" -> ItemPrice'TransformQuantity'Round'
ItemPrice'TransformQuantity'Round'EnumDown
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"up" -> ItemPrice'TransformQuantity'Round'
ItemPrice'TransformQuantity'Round'EnumUp
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'TransformQuantity'Round'
ItemPrice'TransformQuantity'Round'Other Value
val
)
data ItemPrice'Type'
=
ItemPrice'Type'Other Data.Aeson.Types.Internal.Value
|
ItemPrice'Type'Typed Data.Text.Internal.Text
|
ItemPrice'Type'EnumOneTime
|
ItemPrice'Type'EnumRecurring
deriving (Int -> ItemPrice'Type' -> ShowS
[ItemPrice'Type'] -> ShowS
ItemPrice'Type' -> String
(Int -> ItemPrice'Type' -> ShowS)
-> (ItemPrice'Type' -> String)
-> ([ItemPrice'Type'] -> ShowS)
-> Show ItemPrice'Type'
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ItemPrice'Type'] -> ShowS
$cshowList :: [ItemPrice'Type'] -> ShowS
show :: ItemPrice'Type' -> String
$cshow :: ItemPrice'Type' -> String
showsPrec :: Int -> ItemPrice'Type' -> ShowS
$cshowsPrec :: Int -> ItemPrice'Type' -> ShowS
GHC.Show.Show, ItemPrice'Type' -> ItemPrice'Type' -> Bool
(ItemPrice'Type' -> ItemPrice'Type' -> Bool)
-> (ItemPrice'Type' -> ItemPrice'Type' -> Bool)
-> Eq ItemPrice'Type'
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ItemPrice'Type' -> ItemPrice'Type' -> Bool
$c/= :: ItemPrice'Type' -> ItemPrice'Type' -> Bool
== :: ItemPrice'Type' -> ItemPrice'Type' -> Bool
$c== :: ItemPrice'Type' -> ItemPrice'Type' -> Bool
GHC.Classes.Eq)
instance Data.Aeson.Types.ToJSON.ToJSON ItemPrice'Type' where
toJSON :: ItemPrice'Type' -> Value
toJSON (ItemPrice'Type'Other Value
val) = Value
val
toJSON (ItemPrice'Type'Typed Text
val) = Text -> Value
forall a. ToJSON a => a -> Value
Data.Aeson.Types.ToJSON.toJSON Text
val
toJSON (ItemPrice'Type'
ItemPrice'Type'EnumOneTime) = Value
"one_time"
toJSON (ItemPrice'Type'
ItemPrice'Type'EnumRecurring) = Value
"recurring"
instance Data.Aeson.Types.FromJSON.FromJSON ItemPrice'Type' where
parseJSON :: Value -> Parser ItemPrice'Type'
parseJSON Value
val =
ItemPrice'Type' -> Parser ItemPrice'Type'
forall (f :: * -> *) a. Applicative f => a -> f a
GHC.Base.pure
( if
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"one_time" -> ItemPrice'Type'
ItemPrice'Type'EnumOneTime
| Value
val Value -> Value -> Bool
forall a. Eq a => a -> a -> Bool
GHC.Classes.== Value
"recurring" -> ItemPrice'Type'
ItemPrice'Type'EnumRecurring
| Bool
GHC.Base.otherwise -> Value -> ItemPrice'Type'
ItemPrice'Type'Other Value
val
)