-
-
Save batasrki/999394 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class EngineVariant | |
def api_representation | |
{ engine: engine, locale: locale } | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Subscription | |
def api_representation | |
{ | |
name: name, | |
schedule: schedule.try(:api_representation), | |
queries: queries.to_a, | |
engine_variants: engine_variants.map(&:api_representation), | |
url_fragments: url_fragments.map(&:api_representation) | |
} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SubscriptionSchedule | |
def api_representation | |
{ | |
interval: interval, | |
start_date: start_date | |
} | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class URLFragment | |
def api_representation | |
{ | |
type: type, | |
value: value, | |
name: name | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment