Skip to content

Commit

Permalink
APP-1935 Show image/general data storage costs on invoice (viamroboti…
Browse files Browse the repository at this point in the history
…cs#462)

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
ehhong and github-actions[bot] authored Apr 23, 2024
1 parent cf260f4 commit d22fafd
Show file tree
Hide file tree
Showing 12 changed files with 213 additions and 118 deletions.
195 changes: 110 additions & 85 deletions app/v1/billing.pb.go

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions component/board/v1/board.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/encoder/v1/encoder.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/gantry/v1/gantry.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions component/gripper/v1/gripper.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions gen/js/app/v1/billing_pb.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,12 @@ export class GetCurrentMonthUsageResponse extends jspb.Message {
getPerMachineUsageCost(): number;
setPerMachineUsageCost(value: number): void;

getBinaryDataCloudStorageUsageCost(): number;
setBinaryDataCloudStorageUsageCost(value: number): void;

getOtherCloudStorageUsageCost(): number;
setOtherCloudStorageUsageCost(value: number): void;

serializeBinary(): Uint8Array;
toObject(includeInstance?: boolean): GetCurrentMonthUsageResponse.AsObject;
static toObject(includeInstance: boolean, msg: GetCurrentMonthUsageResponse): GetCurrentMonthUsageResponse.AsObject;
Expand All @@ -251,6 +257,8 @@ export namespace GetCurrentMonthUsageResponse {
totalUsageWithDiscount: number,
totalUsageWithoutDiscount: number,
perMachineUsageCost: number,
binaryDataCloudStorageUsageCost: number,
otherCloudStorageUsageCost: number,
}
}

Expand Down
62 changes: 61 additions & 1 deletion gen/js/app/v1/billing_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,9 @@ proto.viam.app.v1.GetCurrentMonthUsageResponse.toObject = function(includeInstan
discountAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 8, 0.0),
totalUsageWithDiscount: jspb.Message.getFloatingPointFieldWithDefault(msg, 9, 0.0),
totalUsageWithoutDiscount: jspb.Message.getFloatingPointFieldWithDefault(msg, 10, 0.0),
perMachineUsageCost: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0)
perMachineUsageCost: jspb.Message.getFloatingPointFieldWithDefault(msg, 11, 0.0),
binaryDataCloudStorageUsageCost: jspb.Message.getFloatingPointFieldWithDefault(msg, 12, 0.0),
otherCloudStorageUsageCost: jspb.Message.getFloatingPointFieldWithDefault(msg, 13, 0.0)
};

if (includeInstance) {
Expand Down Expand Up @@ -1753,6 +1755,14 @@ proto.viam.app.v1.GetCurrentMonthUsageResponse.deserializeBinaryFromReader = fun
var value = /** @type {number} */ (reader.readDouble());
msg.setPerMachineUsageCost(value);
break;
case 12:
var value = /** @type {number} */ (reader.readDouble());
msg.setBinaryDataCloudStorageUsageCost(value);
break;
case 13:
var value = /** @type {number} */ (reader.readDouble());
msg.setOtherCloudStorageUsageCost(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -1861,6 +1871,20 @@ proto.viam.app.v1.GetCurrentMonthUsageResponse.serializeBinaryToWriter = functio
f
);
}
f = message.getBinaryDataCloudStorageUsageCost();
if (f !== 0.0) {
writer.writeDouble(
12,
f
);
}
f = message.getOtherCloudStorageUsageCost();
if (f !== 0.0) {
writer.writeDouble(
13,
f
);
}
};


Expand Down Expand Up @@ -2100,6 +2124,42 @@ proto.viam.app.v1.GetCurrentMonthUsageResponse.prototype.setPerMachineUsageCost
};


/**
* optional double binary_data_cloud_storage_usage_cost = 12;
* @return {number}
*/
proto.viam.app.v1.GetCurrentMonthUsageResponse.prototype.getBinaryDataCloudStorageUsageCost = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 12, 0.0));
};


/**
* @param {number} value
* @return {!proto.viam.app.v1.GetCurrentMonthUsageResponse} returns this
*/
proto.viam.app.v1.GetCurrentMonthUsageResponse.prototype.setBinaryDataCloudStorageUsageCost = function(value) {
return jspb.Message.setProto3FloatField(this, 12, value);
};


/**
* optional double other_cloud_storage_usage_cost = 13;
* @return {number}
*/
proto.viam.app.v1.GetCurrentMonthUsageResponse.prototype.getOtherCloudStorageUsageCost = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 13, 0.0));
};


/**
* @param {number} value
* @return {!proto.viam.app.v1.GetCurrentMonthUsageResponse} returns this
*/
proto.viam.app.v1.GetCurrentMonthUsageResponse.prototype.setOtherCloudStorageUsageCost = function(value) {
return jspb.Message.setProto3FloatField(this, 13, value);
};





Expand Down
2 changes: 2 additions & 0 deletions proto/viam/app/v1/billing.proto
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ message GetCurrentMonthUsageResponse {
double total_usage_with_discount = 9;
double total_usage_without_discount = 10;
double per_machine_usage_cost = 11;
double binary_data_cloud_storage_usage_cost = 12;
double other_cloud_storage_usage_cost = 13;
}

message GetOrgBillingInformationRequest {
Expand Down
6 changes: 3 additions & 3 deletions service/datamanager/v1/data_manager.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions service/navigation/v1/navigation.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions service/sensors/v1/sensors.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d22fafd

Please sign in to comment.