Skip to content

Commit bb373af

Browse files
author
Stanislav Kolotinskiy
committed
Expose user_license_credits_consumed from executions model
1 parent 5f992da commit bb373af

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/travis/api/v3/models/executions.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module Travis::API::V3
22
class Models::Execution
33
attr_reader :id, :os, :instance_size, :arch, :virtualization_type, :queue, :job_id, :repository_id, :owner_id,
4-
:owner_type, :plan_id, :sender_id, :credits_consumed, :started_at, :finished_at, :created_at,
5-
:updated_at
4+
:owner_type, :plan_id, :sender_id, :credits_consumed, :user_license_credits_consumed, :started_at,
5+
:finished_at, :created_at, :updated_at
66

77
def initialize(attributes = {})
88
@id = attributes.fetch('id')
@@ -18,6 +18,7 @@ def initialize(attributes = {})
1818
@plan_id = attributes.fetch('plan_id')
1919
@sender_id = attributes.fetch('sender_id')
2020
@credits_consumed = attributes.fetch('credits_consumed')
21+
@user_license_credits_consumed = attributes.fetch('user_license_credits_consumed')
2122
@started_at = attributes.fetch('started_at')
2223
@finished_at = attributes.fetch('finished_at')
2324
@created_at = attributes.fetch('created_at')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module Travis::API::V3
22
class Renderer::Execution < ModelRenderer
33
representation :minimal, :id, :os, :instance_size, :arch, :virtualization_type, :queue, :job_id,
4-
:repository_id, :owner_id, :owner_type, :plan_id, :sender_id, :credits_consumed, :started_at,
5-
:finished_at, :created_at, :updated_at
4+
:repository_id, :owner_id, :owner_type, :plan_id, :sender_id, :credits_consumed,
5+
:user_license_credits_consumed, :started_at, :finished_at, :created_at, :updated_at
66
representation :standard, *representations[:minimal]
77
end
88
end

0 commit comments

Comments
 (0)