@seamapi/nextlove-sdk-generator
Advanced tools
Comparing version 1.14.4 to 1.14.5
@@ -64,3 +64,3 @@ import { endpoints_returning_deprecated_action_attempt } from "../../lib/endpoint-rules.js"; | ||
has_return_value | ||
? ` Seam::${return_resource},\n '${return_path}',` | ||
? ` Seam::Resources::${return_resource},\n '${return_path}',` | ||
: [], | ||
@@ -67,0 +67,0 @@ ` body: {${parameters |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
class ResourceError < BaseResource | ||
attr_accessor :error_code, :message | ||
module Resources | ||
class ResourceError < BaseResource | ||
attr_accessor :error_code, :message | ||
date_accessor :created_at | ||
date_accessor :created_at | ||
end | ||
end | ||
end\n`; | ||
//# sourceMappingURL=resource_error.rb.template.js.map |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
module ResourceErrorsSupport | ||
def errors | ||
@errors_converted ||= @errors.is_a?(Array) ? Seam::ResourceError.load_from_response(@errors) : [] | ||
module Resources | ||
module ResourceErrorsSupport | ||
def errors | ||
@errors_converted ||= @errors.is_a?(Array) ? Seam::Resources::ResourceError.load_from_response(@errors) : [] | ||
end | ||
end | ||
@@ -8,0 +10,0 @@ end |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
class ResourceWarning < BaseResource | ||
attr_accessor :warning_code, :message | ||
module Resources | ||
class ResourceWarning < BaseResource | ||
attr_accessor :warning_code, :message | ||
date_accessor :created_at | ||
date_accessor :created_at | ||
end | ||
end | ||
end\n`; | ||
//# sourceMappingURL=resource_warning.rb.template.js.map |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
module ResourceWarningsSupport | ||
def warnings | ||
@warnings_converted ||= @warnings.is_a?(Array) ? Seam::ResourceWarning.load_from_response(@warnings) : [] | ||
module Resources | ||
module ResourceWarningsSupport | ||
def warnings | ||
@warnings_converted ||= @warnings.is_a?(Array) ? Seam::Resources::ResourceWarning.load_from_response(@warnings) : [] | ||
end | ||
end | ||
@@ -8,0 +10,0 @@ end |
@@ -9,9 +9,9 @@ export default ({ pascal_name, attrs, date_attrs, }) => { | ||
const date_accessors = date_attrs.length > 0 | ||
? ` date_accessor ${date_attrs.map((attr) => `:${attr}`).join(", ")}` | ||
? ` date_accessor ${date_attrs.map((attr) => `:${attr}`).join(", ")}` | ||
: ""; | ||
const resource_errors_support = has_errors_attr | ||
? " include Seam::ResourceErrorsSupport" | ||
? " include Seam::Resources::ResourceErrorsSupport" | ||
: ""; | ||
const resource_warnings_support = has_warnings_attr | ||
? " include Seam::ResourceWarningsSupport" | ||
? " include Seam::Resources::ResourceWarningsSupport" | ||
: ""; | ||
@@ -21,4 +21,5 @@ return `# frozen_string_literal: true | ||
module Seam | ||
class ${pascal_name} < BaseResource | ||
attr_accessor ${attr_accessors} | ||
module Resources | ||
class ${pascal_name} < BaseResource | ||
attr_accessor ${attr_accessors} | ||
@@ -29,2 +30,3 @@ ${date_accessors} | ||
${resource_warnings_support} | ||
end | ||
end | ||
@@ -31,0 +33,0 @@ end\n`; |
{ | ||
"name": "@seamapi/nextlove-sdk-generator", | ||
"version": "1.14.4", | ||
"version": "1.14.5", | ||
"description": "Utilities for building NextLove SDK Generators", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -108,3 +108,3 @@ import { endpoints_returning_deprecated_action_attempt } from "lib/endpoint-rules.js" | ||
has_return_value | ||
? ` Seam::${return_resource},\n '${return_path}',` | ||
? ` Seam::Resources::${return_resource},\n '${return_path}',` | ||
: [], | ||
@@ -111,0 +111,0 @@ ` body: {${parameters |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
class ResourceError < BaseResource | ||
attr_accessor :error_code, :message | ||
module Resources | ||
class ResourceError < BaseResource | ||
attr_accessor :error_code, :message | ||
date_accessor :created_at | ||
date_accessor :created_at | ||
end | ||
end | ||
end\n` |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
module ResourceErrorsSupport | ||
def errors | ||
@errors_converted ||= @errors.is_a?(Array) ? Seam::ResourceError.load_from_response(@errors) : [] | ||
module Resources | ||
module ResourceErrorsSupport | ||
def errors | ||
@errors_converted ||= @errors.is_a?(Array) ? Seam::Resources::ResourceError.load_from_response(@errors) : [] | ||
end | ||
end | ||
end | ||
end\n` |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
class ResourceWarning < BaseResource | ||
attr_accessor :warning_code, :message | ||
module Resources | ||
class ResourceWarning < BaseResource | ||
attr_accessor :warning_code, :message | ||
date_accessor :created_at | ||
date_accessor :created_at | ||
end | ||
end | ||
end\n` |
export default () => `# frozen_string_literal: true | ||
module Seam | ||
module ResourceWarningsSupport | ||
def warnings | ||
@warnings_converted ||= @warnings.is_a?(Array) ? Seam::ResourceWarning.load_from_response(@warnings) : [] | ||
module Resources | ||
module ResourceWarningsSupport | ||
def warnings | ||
@warnings_converted ||= @warnings.is_a?(Array) ? Seam::Resources::ResourceWarning.load_from_response(@warnings) : [] | ||
end | ||
end | ||
end | ||
end\n` |
@@ -21,10 +21,10 @@ export default ({ | ||
date_attrs.length > 0 | ||
? ` date_accessor ${date_attrs.map((attr) => `:${attr}`).join(", ")}` | ||
? ` date_accessor ${date_attrs.map((attr) => `:${attr}`).join(", ")}` | ||
: "" | ||
const resource_errors_support = has_errors_attr | ||
? " include Seam::ResourceErrorsSupport" | ||
? " include Seam::Resources::ResourceErrorsSupport" | ||
: "" | ||
const resource_warnings_support = has_warnings_attr | ||
? " include Seam::ResourceWarningsSupport" | ||
? " include Seam::Resources::ResourceWarningsSupport" | ||
: "" | ||
@@ -35,4 +35,5 @@ | ||
module Seam | ||
class ${pascal_name} < BaseResource | ||
attr_accessor ${attr_accessors} | ||
module Resources | ||
class ${pascal_name} < BaseResource | ||
attr_accessor ${attr_accessors} | ||
@@ -43,4 +44,5 @@ ${date_accessors} | ||
${resource_warnings_support} | ||
end | ||
end | ||
end\n` | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
654191
8252