Class: ShopifyAPI::ApiVersion::Release
Constant Summary
collapse
- FORMAT =
/^\d{4}-\d{2}$/.freeze
- API_PREFIX =
'/admin/api/'
Instance Method Summary
collapse
#<=>, #==, clear_defined_versions, coerce_to_version, define_version, #hash, #inspect, latest_stable_version, #to_s
#define_known_versions
Constructor Details
#initialize(version_number) ⇒ Release
Returns a new instance of Release.
93
94
95
96
97
98
|
# File 'lib/shopify_api/api_version.rb', line 93
def initialize(version_number)
raise InvalidVersion, version_number unless version_number.match(FORMAT)
@version_name = version_number
@url = "#{API_PREFIX}#{version_number}/"
@numeric_version = version_number.tr('-', '').to_i
end
|
Instance Method Details
#construct_api_path(path) ⇒ Object
104
105
106
|
# File 'lib/shopify_api/api_version.rb', line 104
def construct_api_path(path)
"#{@url}#{path}"
end
|
#construct_graphql_path ⇒ Object
108
109
110
|
# File 'lib/shopify_api/api_version.rb', line 108
def construct_graphql_path
construct_api_path('graphql.json')
end
|
#stable? ⇒ Boolean
100
101
102
|
# File 'lib/shopify_api/api_version.rb', line 100
def stable?
true
end
|